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.

Using a custom board file with the CC1310 15.4 stack sensor example. Help!

Other Parts Discussed in Thread: CC1310

I have been trying for the past few hours to use a custom board file with the TI 15.4 stack. It appears, however, that this is no simple process since there are about a gazillion board.h files and not much in the way of instructions as to how to add my own.

I have already looked in the getting started guide for the stack, but it gives the vaguest instructions on how to make this work.

Can somebody please, please spell it out for me? All I want to do is to be able to use a preprocessor define to select my custom hardware file, without disturbing the original files in the stack. I may want to switch back to using the launchpad occasionally, so for that reason I don't want to edit the launchpad file.

  • Hi Craig,

    Your best bet is to take an already made board file and modify it to fit your needs.

    And why not just make a copy of the files that you need? You can then edit the files to your heart's content and you always have the backup of the original files. If you do change the original inadvertently, you can always re-install the TI 15.4 stack which will restore all the files to their original state.

    Also, if you are using CCS, you can take examples from the Resource Explorer (under the tools menu).

    Regards,
    Michel
  • Hi Michel,

    I can easily take a copy of the board file and rename it for my own board, that was my initial starting point. But how to I tell the example to USE that board file instead of the other once it's prepared?
  • Still haven't figured this out! 

    The whole way that example projects operate in the 15.4 stack is so awkward. There are no actual source files copied over so just to make a change without affecting the whole stack the first thing you have to do is meddle with include paths and manually copy things over.

    It also doesn't help that about 3 different board.h or Board.h files are called from different files, making it almost impossible to simply implement the example on custom hardware!

  • You can make a copy of original files and then revise on the original file directly.
  • I appreciate the suggestion, but this doesn't work if I want to have two versions of the same example running in different workspaces or projects. That's one of the reasons it's so awkward to deal with.
  • You can create different board files for different EVB in CCS IDE and you can use define to deploy different board files.
  • Could you possibly give more detail on how to achieve this with the 15.4 stack examples?
  • Hey Craig I'm sure you've already read this, and it doesn't seem very helpful, but just in case- have you read chapter 12 in the developer's guide?
  • Hi, I have already read it. That's what I was referring to in my original post, it's exceptionally unclear about how to go about the process. I haven't managed to figure it out at all from that.
  • The steps are described in chapter 12.1 of TI-15.4 Stack Embedded Developers Guide.
  • As I already mentioned in my original post (and again after that), the steps described in that chapter are so vague they are impossible to follow!

    If someone could spell it out for me I would be very grateful.

  • Using CC1310DK as an example,

    1. Create a CC1310DK folder in CCS project explorer and add related board files into the folder.

    2. Exclude original launchpad board file folder

    3.  Change "CC1310_LAUNCHXL" in Predefined Symbol to your own board define such as CC1310DK_7XD.

    4. Search "CC1310_LAUNCHXL" predefined symbol in project and add CC1310DK_7XD accordingly.

  • HI Craig,

    I was having the same problem for the past 2 days, and I managed to port the code to my custom board. 

    Initially I started with 2 CC1310 LP boards with the default configurations (only reduced the reporting interval to 1s).

    The CC1310_LAUNCHXL.h is a common file used by both the sensor and collector.

    1. In the Sensor project under Predefined Symbols I created a new define for MY_BOARD_NAME.

    2. In the CC1310_LAUNCHXL.h file,

    #ifdef MY_BOARD_NAME

    // my board defines here

    #else 

    // existing defines here

    #endif 

    3. I made a copy of existing defines to my board defines

    4. Then, in my board defines, I tested each pin and unassigned the ones which could be unassigned without an impact for the program. There were some pins which had to be assigned for the code to work properly. They are,

    #define Board_RLED IOID_6 //cant unassign
    #define Board_GLED IOID_7 //cant unassign

    /* Discrete inputs */
    #define Board_BTN1 IOID_13 //cant unassign
    #define Board_BTN2 IOID_14 //cant unassign

    /* UART Board */
    #define Board_UART_RX IOID_2 //cant unassign /* RXD */
    #define Board_UART_TX IOID_3 //cant unassign /* TXD */
    #define Board_UART_CTS cant unassign /* CTS */
    #define Board_UART_RTS cant unassign /* RTS */

    /* SPI Board */
    #define Board_SPI0_MISO IOID_8 //cant unassign /* RF1.20 */
    #define Board_SPI0_MOSI IOID_9 //cant unassign /* RF1.18 */
    #define Board_SPI0_CLK IOID_10 //cant unassign /* RF1.16 */

    /* SPI */
    #define Board_SPI_FLASH_CS IOID_20 //cant unassign

    /* Booster pack generic */
    #define Board_DIO1_RFSW IOID_1 //cant unassign

    5. Then I looked into my board and assigned those pins with the correct pins in my board. (if you dont have assign them to any unused pin)

    6. Afterwards I build the code and downloaded it to my board. It transmits data and the collector receives it.

    * Anyways I still have an issue, when the first time I click Debug to load the program and Terminate the session it continues to work. But when I power cycle my board it stops transmitting. I need to figure out this issue.