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.

Cannot debug (stuck in BadRomLink exception) CC2650 SimpleBLEMulti example in IAR.

Other Parts Discussed in Thread: CC2640

In IAR EW ARm 7.40, I am trying to debug and step through the SimpleBLEMulti example on a SmartRF06 eval board using the CC2650-7ID 1.2 module.

It builds and downloads, but when I enter the debugger I am permanently stuck in the error handler:


ti_sysbios_rom_cortexm_cc26xx_CC26xx_badRomLink__E:

0x188e: 0xe7fe B.N ti_sysbios_rom_cortexm_cc26xx_CC26xx_badRomLink__E; 0x188e

This suggests the there must be something wrong with the builder or linker settings, but I can't figure it out. Anyone know what's wrong?

Additionally, I don't know if this is related, but there was an initial error where if I try to debug, an error pops up: "the debugging session could not be started. Either the debugger initialization failed or else the file..." The extra image was not built, and I don't know how to change to options to build it. I went into Project-->Options-->Debugger-->Images and unchecked "Download Extra Image". Does anyone think this is related, or can I leave it undownloaded?

  • Hi Cindy,

    It looks like there is something wrong in your build system. What version of our stack are you using? v2.0 or v2.1?
    I just built and loaded the project using IAR 7.40.2.

    Here are some suggestions for fixing your problem:
    - Try deleting <$BLE_STACK_INSTALL>\Projects\ble\SimpleBLEMulti\CC26xx\IAR\Application\CC2640\configPkg and <$BLE_STACK_INSTALL>\Projects\ble\SimpleBLEMulti\CC26xx\IAR\Config\src, where BLE_STACK_INSTALL is the location you installed your BLE stack.
    - Erase the flash of your dev board using SmartRF Flash Programmer 2
    - Rebuild the project in IAR and attempt to load again, remember that the Stack should be loaded before the app.
  • Thank you Sean,

    The problem is likely that I didn't load the stack first (silly me). However, I am now getting build errors trying to build the stack (v2.1). I tried a new install of the v2.1 stack and SimpleBLEMulti patch, but the same thing still happens. Does anyone have an idea what's wrong? Here's the build log:



    C:\ti\simplelink\ble_cc26xx_2_01_00_44423\Projects\ble\SimpleBLEMulti\CC26xx\IAR\Stack\CC2640\..\..\..\..\..\..\tools\LibSearch\libSearch.exe C:\
    ti\simplelink\ble_cc26xx_2_01_00_44423\Projects\ble\SimpleBLEMulti\CC26xx\IAR\Stack\CC2640\buildConfig.opt C:\ti\simplelink\
    ble_cc26xx_2_01_00_44423\Projects\ble\SimpleBLEMulti\CC26xx\IAR\Stack\CC2640\..\..\..\..\..\..\tools\LibSearch\parameters.xml C:\ti\simplelink\
    ble_cc26xx_2_01_00_44423\Projects\ble\SimpleBLEMulti\CC26xx\IAR\Stack\CC2640\..\..\..\..\..\Libraries\CC26xx\IAR\ C:\ti\simplelink\
    ble_cc26xx_2_01_00_44423\Projects\ble\SimpleBLEMulti\CC26xx\IAR\Stack\CC2640\..\..\Lib\CC2640Stack.a FlashROM
    <<< ERRROR >>>
    Cannot match C:\ti\simplelink\ble_cc26xx_2_01_00_44423\Projects\ble\SimpleBLEMulti\CC26xx\IAR\Stack\CC2640\buildConfig.opt to any library .opt
    file in C:\ti\simplelink\ble_cc26xx_2_01_00_44423\Projects\ble\Libraries\CC26xx\IAR
    Searched against the following defines in C:\ti\simplelink\ble_cc26xx_2_01_00_44423\Projects\ble\SimpleBLEMulti\CC26xx\IAR\Stack\CC2640\
    buildConfig.opt:
    "-DHOST_CONFIG=PERIPHERAL_CFG+CENTRAL_CFG"
    "-DCTRL_V41_CONFIG=PING_CFG+SLV_FEAT_EXCHG_CFG+CONN_PARAM_REQ_CFG+MST_SLV_CFG"
    "//-DL2CAP_CO_CHANNELS"
    "//-DGATT_NO_SERVICE_CHANGED"
    <<< /ERROR >>>
    Error while running C:\ti\simplelink\ble_cc26xx_2_01_00_44423\Projects\ble\SimpleBLEMulti\CC26xx\IAR\Stack\CC2640\..\..\..\..\..\..\tools\LibSearch\
    libSearch.exe C:\ti\simplelink\ble_cc26xx_2_01_00_44423\Projects\ble\SimpleBLEMulti\CC26xx\IAR\Stack\CC2640\buildConfig.opt C:\ti\simplelink\
    ble_cc26xx_2_01_00_44423\Projects\ble\SimpleBLEMulti\CC26xx\IAR\Stack\CC2640\..\..\..\..\..\..\tools\LibSearch\parameters.xml C:\ti\simplelink\
    ble_cc26xx_2_01_00_44423\Projects\ble\SimpleBLEMulti\CC26xx\IAR\Stack\CC2640\..\..\..\..\..\Libraries\CC26xx\IAR\ C:\ti\simplelink\
    ble_cc26xx_2_01_00_44423\Projects\ble\SimpleBLEMulti\CC26xx\IAR\Stack\CC2640\..\..\Lib\CC2640Stack.a FlashROM




    Thanks in advance!
  • Sorry to play give a mouse a cookie, but do you know what is the default program that was loaded onto the SmartRF06 Eval Board and CC2650EM module? And where to get it? I overwrote it when I downloaded the SimpleBLEMulti app.
  • Cindy,

    I am not sure exactly what application the boards ship with but my guess is SimpleBLEPeripheral. The .hex image for this project (and many others) can be found in C:\ti\simplelink\ble_cc26xx_2_01_00_44423\Accessories\HexFiles. Use SmartRF Flash Programmer 2 to re-flash the board.
  • Also to my knowledge, the Multi demo is not yet ported to v2.1, but we are working on it now.
  • Thanks Sean.

    I found the default program, which doesn't have the source. The HEX is available in this thread:

    e2e.ti.com/.../412193
  • Good to know, thank you
  • Thank you Sean,

    I tried the Multi demo with the 2.0 Stack and everything works fine now.