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.

CC2650MODA: Project Zero- Stack Image is not getting uploaded in CC2650MODA while debugging

Part Number: CC2650MODA


Hello,

I have developed a custom application which is developed from the Project Zero file for CC2650Launchpad from simple link academy 1.11. I have tested my application with CC2650launchapad and it worked fine.

I am using CCS 7.2.0, BLE stack 2.2.1, and ti compiler 5.2.6.

Then I changed the board file to support CC2650MODA and tried to debug the code using debug option. While performing that my code got stuck in a loop. After debugging and with the help of the e2e community, I figured out that it is due to the stack image is not getting uploaded in CC2650MODA.

When I uploaded the Application and stack image using Flash programmer into CC2650MODA. It was working fine.

I need to debug my code. How can I upload both stack and application images into MCU using debug option in CCS?

  • Hi Jamalkhan,

    Have you followed all the steps in our document on how to accomplish this task? https://www.ti.com/lit/an/swra534a/swra534a.pdf

    Best,

    Nate

  • Yes, I have followed the steps as per the document and made necessary changes.


    /* Same RF Configuration as 7x7 EM */
    #define CC2650EM_5XD
    //#define CC2650EM_7ID

    /* Mapping of pins to board signals using general board aliases
     *      <board signal alias>        <pin mapping>
     */

    /* Discrete outputs */
    #define Board_RLED                  PIN_UNASSIGNED
    #define Board_GLED                  PIN_UNASSIGNED
    #define Board_LED_ON                1
    #define Board_LED_OFF               0

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

    /* UART Board */
    #define Board_UART_RX               IOID_1          /* RXD  */
    #define Board_UART_TX               IOID_0          /* TXD  */
    #define Board_UART_CTS              PIN_UNASSIGNED         /* CTS  */
    #define Board_UART_RTS              PIN_UNASSIGNED         /* RTS */

    /* SPI Board */
    #define Board_SPI0_MISO             IOID_10          /* RF1.20 */
    #define Board_SPI0_MOSI             IOID_11          /* RF1.18 */
    #define Board_SPI0_CLK              IOID_12         /* RF1.16 */
    #define Board_SPI0_CSN              PIN_UNASSIGNED
    #define Board_SPI1_MISO             PIN_UNASSIGNED
    #define Board_SPI1_MOSI             PIN_UNASSIGNED
    #define Board_SPI1_CLK              PIN_UNASSIGNED
    #define Board_SPI1_CSN              PIN_UNASSIGNED
    #define POT_CS                      IOID_2
    #define POT_SHDN                    IOID_8
    #define POT_RS                      IOID_7
    //#define Touch_IN                    IOID_5
    /* I2C */
    #define Board_I2C0_SCL0             IOID_3
    #define Board_I2C0_SDA0             IOID_4
    /* SPI */
    #define Board_FLASH_CS_ON           0
    #define Board_FLASH_CS_OFF          1

    /* Booster pack generic */
    #define Board_DIO0                  PIN_UNASSIGNED
    #define Board_DIO1_RFSW             PIN_UNASSIGNED
    #define Board_DIO12                 PIN_UNASSIGNED
    #define Board_DIO15                 PIN_UNASSIGNED
    #define Board_DIO16_TDO             PIN_UNASSIGNED
    #define Board_DIO17_TDI             PIN_UNASSIGNED
    #define Board_DIO21                 PIN_UNASSIGNED
    #define Board_DIO22                 PIN_UNASSIGNED

    #define Board_DIO07_ANALOG          PIN_UNASSIGNED
    #define Board_DIO08_ANALOG          PIN_UNASSIGNED
    #define Board_DIO09_ANALOG          IOID_9
    #define Board_DIO10_ANALOG          PIN_UNASSIGNED
    #define Board_DIO11_ANALOG          PIN_UNASSIGNED
    #define Board_DIO12_ANALOG          PIN_UNASSIGNED
    #define Board_DIO13_ANALOG          PIN_UNASSIGNED
    #define Board_DIO14_ANALOG          PIN_UNASSIGNED

    /* Booster pack LCD (430BOOST - Sharp96 Rev 1.1) */
    #define Board_LCD_CS                PIN_UNASSIGNED // SPI chip select
    #define Board_LCD_EXTCOMIN          PIN_UNASSIGNED // External COM inversion
    #define Board_LCD_ENABLE            PIN_UNASSIGNED // LCD enable
    #define Board_LCD_POWER             PIN_UNASSIGNED // LCD power control
    #define Board_LCD_CS_ON             1
    #define Board_LCD_CS_OFF            0

    /* PWM outputs */
    #define Board_PWMPIN0                       Board_RLED
    #define Board_PWMPIN1                       Board_GLED
    #define Board_PWMPIN2                       PIN_UNASSIGNED
    #define Board_PWMPIN3                       PIN_UNASSIGNED
    #define Board_PWMPIN4                       PIN_UNASSIGNED
    #define Board_PWMPIN5                       PIN_UNASSIGNED
    #define Board_PWMPIN6                       PIN_UNASSIGNED
    #define Board_PWMPIN7                       PIN_UNASSIGNED

  • How about the GPIOInit table on page 6?

    Best,

    Nate

  • yeah I have done that as per the document says for my custom application,

    const PIN_Config BoardGpioInitTable[] = {

    //    Board_RLED   | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX,         /* LED initially off             */
    //    Board_GLED   | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX,         /* LED initially off             */
        Board_BTN1   | PIN_INPUT_EN | PIN_PULLDOWN | PIN_IRQ_BOTHEDGES | PIN_HYSTERESIS,            /* Button is active low          */
        Board_BTN2   | PIN_INPUT_EN | PIN_PULLDOWN | PIN_IRQ_BOTHEDGES | PIN_HYSTERESIS,            /* Button is active low          */
        POT_CS | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL | PIN_DRVSTR_MIN, /* External flash chip select    */
        POT_RS | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL | PIN_DRVSTR_MIN,
        POT_SHDN | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL | PIN_DRVSTR_MIN,
        Board_UART_RX | PIN_INPUT_EN | PIN_PULLDOWN,                                              /* UART RX via debugger back channel */
        Board_UART_TX | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL,                        /* UART TX via debugger back channel */
        Board_SPI0_MOSI | PIN_INPUT_EN | PIN_PULLDOWN,                                            /* SPI master out - slave in */
        Board_SPI0_MISO | PIN_INPUT_EN | PIN_PULLDOWN,                                            /* SPI master in - slave out */
        Board_SPI0_CLK | PIN_INPUT_EN | PIN_PULLDOWN,                                             /* SPI clock */

        PIN_TERMINATE
    };

    When I upload the app and stack image using Flash programmer, it is completely working fine. Am I missing something?

  • Hi Jamalkhan,

    Are you flashing the stack library to your device too? I would recommend doing a mass erase on your device using Flash Programmer 2,opening a clean workspace in CCS, loading in the stack library and application projects, running a build->clean on both, then debugging the stack library and debugging the application project. Let me know if this works.

    Best,

    Nate