Part Number:CC2650EM-7ID-RD
Hello,
I developed my project based on the Project Zero example. The functionalities are all functioning as intended and now is the time to implement OAD in the off-chip manner.
Because my project uses an external FRAM instead of a FLASH, the NO_COPY define has been put to avoid checking images in the external flash (for the moment. When my driver is ready, I'll disable the define).
That means that the following code is run without conditions:
// Load address of reset function from the fixed location of the image's // reset vector and jump. asm(" MOV R0, #0x1010 "); asm(" LDR R1, [R0, #0x4] "); // Reset the stack pointer, asm(" LDR SP, [R0, #0x0] "); // And jump. asm(" BX R1 ");
After being sure that I followed the CC2640 OAD guide, specifically the chapter 8.4, I tried to merge the BIM_extFlash, the project zero application as well as the stack project in one hex file and uploaded the resulting file to my SmartRF06 board with the CC2650EM. I was know expecting a broadcast of my application, but nothing.
When loading again the BIM_extFlash project on the target processor, I followed step by step the execution of the program. After the execution of the code (displayed in the previous part of this message), I was sure that the "BX R1" instruction branched to the Reset vector of my application (Value in the register was the same as the one in the map file of the application). But then, execution continues until it arrives to some part where it branches to the current address (doing an infinite loop).
I have a question that may help me in my problem resolution. How to do to attach the debugger to a running process? I tried to do it with my bim_extFlash project, but I got an error saying that the endianness is not correct.
I would be more than happy to provide more information if needed.
Thank you in advance for your help and have a great day.
Kevin
Edit #1: I pushed the code on the internal flash using SmartRF Flash Programmer 2 and relaunched the BIM_extFlash code on the target using the debugger of CCS. I breakpointed through the code execution and can confirm that the code listed above redirects correctly to the ResetISR of the project_zero application that I pushed via Flash Programmer 2. It appears however that the the loop arrives when there is a branching to the symbol __TI_auto_init. I don't know what this exactly does and why it could potentially loop indefinitely.