This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP432P401R: SimpleLink v3.30 - Examples use wrong header file ("Board.h" instead of "ti_drivers_config.h")

Part Number: MSP432P401R

Many of the examples in the new SDK v3.30 revision - which uses Sysconfig - contain a reference to "Board.h":

/* Driver configuration */
#include <ti/drivers/Board.h>

Is it correct to assume that this is an accidental carry-over from previous (non-Sysconfig) versions of the SDK? I expect that this should have referenced the new Sysconfig generated header file:

/* Driver configuration */
#include "ti_drivers_config.h"

Thanks,
Scott

  • Hi Scott,

    Yes if you're seeing Board.h in SDK v3.30 then it is most likely an accidental carry-over from the previous SDK. Can you share which examples you have seen this in?

    Thanks,

    Alexis

  • I scanned the entire MSP432P4 SDK and found quite a few instances. I removed the "legacy" examples, which should still use Board.h. Other than that, most of these are TI Driver examples, which should all use sysconfig. I left the sys/bios (and other library) examples in the list even though I haven't checked as to whether they've been upgraded to sysconfig.

    47 #include <ti/drivers/Board.h>
    1 match in C:\ti\simplelink_msp432p4_sdk_3_30_00_13\examples\rtos\MSP_EXP432P4111\sysbios\stairstepStopMode\stairstep.c
    48 #include <ti/drivers/Board.h>
    1 match in C:\ti\simplelink_msp432p4_sdk_3_30_00_13\examples\rtos\MSP_EXP432P4111\sysbios\swi\swi.c
    48 #include <ti/drivers/Board.h>
    1 match in C:\ti\simplelink_msp432p4_sdk_3_30_00_13\examples\rtos\MSP_EXP432P4111\sysbios\uartlogging\uartlogging.c
    53 #include "Board.h"
    1 match in C:\ti\simplelink_msp432p4_sdk_3_30_00_13\examples\rtos\MSP_EXP432P4111\sysbios\uartlogging\UARTUtils.c
    51 #include "Board.h"
    1 match in C:\ti\simplelink_msp432p4_sdk_3_30_00_13\examples\rtos\MSP_EXP432P4111\tiutils\json\freertos\main_freertos.c
    50 #include <ti/drivers/Board.h>
    1 match in C:\ti\simplelink_msp432p4_sdk_3_30_00_13\examples\rtos\MSP_EXP432P4111\tiutils\json\tirtos\main_tirtos

    < This entry was edited >

  • Hi Scott,

    I looked into it and it is actually correct...although I'll admit its a bit confusing. 

    SysConfig generates the board files, so ti_drivers_config.h is a replacement for the MSP_EXP432P401R.h

    The old SDK included a local Board.h file which included headers and referenced MSP_EXP432P401R.h. In the latest SDK, instead of creating a local Board.h file that included the board files, they simply directly include the board files that SysConfig generates in the application. 

    It is also important to note that 

    /* Driver configuration */
    #include <ti/drivers/Board.h>

    is different from 

    /* Example/Board Header files */
    #include "Board.h"

    The first one is included in main_xx.c in both SDKs and that is what you're seeing in your file search.

    I hope that clears things up!

    BR,

    Alexis

  • Yes, this is a bit confusing. I'm glad to see I'm not the only one who confused "Board.h" with <ti/drivers/Board.h>.

    That said, I'm not totally clear on this since my code builds fine without including <ti/drivers/Board.h>. Looking at that file, all it includes is:

    extern void Board_init(void);

    But, this function is also extern'd in ti_drivers_config.h. And this function is defined in ti_drivers_config.c.

    Seeing them declared in ti_drivers_config.h/.c seems to clear up the mystery as to why my code build without error. But this leaves me wondering if I have to include <ti/drivers/Board.h>. And if so, why? It seems superfluous, but I don't want to mislead users by excluding it from our training solutions if it's actually required for something.

    Thanks,
    Scott 

**Attention** This is a public forum