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.

CC2640R2F: Stack library build with OAD doesn't boot into BIM

Part Number: CC2640R2F
Other Parts Discussed in Thread: CC2640

We are currently working on the OAD for CC2640R2RHB featuring stack library build and we are stuck on an issue. The Chips seems not booting into the boot loader(BIM) but just always booted into the app code.

We modified the linker cmd according to the following guide http://dev.ti.com/tirex/content/simplelink_cc2640r2_sdk_1_30_00_25/docs/blestack/ble_sw_dev_guide/html/oad/oad.html#sec-generating-oad-linker-file

And apparently all the section especially both intvec for BIM and APP are in the right place. Only one set of CCFG is linked and is from the BIM code. Checked SET_CCFG_IMAGE_VALID_CONF_IMAGE_VALID is defined as 0x1F000. I used the old OAD method (The technique employed in cc2640) to put a set of interrup vector into 0x00000000 to force it to boot into the new BIM and was successful. After downloading the BIM, I checked the memory browser, at 0x1FFEC it shows 0x0001f000 and at 0x50003FEC it is also 0x0001F000.

The development platform we are using is CCS7.0 and with SDKcc2640r2_sdk_1.00.00.22

Could you please help to suggest something I should check or provide us a demo code for the above purpose?

 

By the way, I am confused on another issue regarding the stack library build. Is it true that when we use stack library build there should be no page alignment required between the app and the stack? So in this build configuration the ICALL_STACK0_ADDR, ICALL_STACK0_START and ICALL_RAM_START will have no use? I found that multiple occasion inside the APP code still rely on these definitions like the ble_user_config.c . Inside of ccs_compiler_defines.bcfg and ccs_linker_defines.cmd all these are still defined even in the stack library build, if I remove any of these, the app simply doesn’t build correctly. However from the guide provide in the above link, the linker command relys on the ICALL_STACK0_START to distinguish rather it is stack build or stack library build. Could you help to explain how all these definition should be handled correctly?