Hi,
I'm working on CC2642 Chipset, and wrote a bootloader to jump into application and update application image, it's working fine. Recently I want to update Bootloader itself, so I tried to build a Ram loader which is sharing the same code as bootloader with different link file, and the difference is all flash addresses used in BL are replaced with RAM addresses, but it failed at bootup. After some investigation, it looks like the scheduler started with "NoRTOS_start" is not working in this situation. Here are some debugging information I did locally:
1) After jump to ram loader, there is no response in the system, and I found that it stops in function "HwiP_dispatch" every time I attach JTAG with it. But it still allows me to step into the source code, and jump to main function from "HwiP_dispatch". But it will be stuck again if I try to continue the process or even try to "Step over" a function.
2) To confirm if this is related to the NoRTOS scheduler, I did two tests:
a) Add the dead loop before "NoRTOS_start" call with a counter, like:
volatile int i = 1, counter = 0; while (i) { counter++; }
Every time I pause the JTAG, I can see the counter is changing. This means the system is still running after jump.
b) Add above code block after "NoRTOS_start", same thing happens like step 1): unless I manually step into the dead loop, the counter won't increase.
I checked the code of "NoRTOS_start", it just calls the function "HwiP_enable", no other special called.
Could you help check this issue and give me some solution?
Thanks,
Xiaofeng