Is it possible FreeRTOS App debugging?

bootflag wrote on Thursday, March 21, 2013:


Finally I’ve got my working application on FreeRTOS V7.4.0 based on STM32 compiled by IAR 6.10.

Now, I’m working with bootloader came from ST IAP example.
So,  I want to move my application from 0x0 flash to 0x8003000 flash.

My changes here:
1. Modify IAR icf file: .intvec start: 0x08003000, ROM Start: 0x080030EC, ROM End: not changed.
2. Set the Vector Table base address in main.c, prvSetupHardware() like this: NVIC_SetVectorTable( NVIC_VectTab_FLASH, 0x3000 );

And then I want to Debug with J-Link, however it stopped at vPortStartFirstTask function in portasm.s
/* Use the NVIC offset register to locate the stack. */
ldr r0, =0xE000ED08
ldr r0,
ldr r0,   --------------------------------------------------> when I execute this line then board stopped
/* Set the msp back to the start of the stack. */
msr msp, r0
/* Call SVC to start the first task. */
cpsie i
svc 0

So, my question here;
Is it possible to debug flash shifted FreeRTOS in this way? (other run-to-complete debugging is OK, but it’s not)

My plan is that if my FreeRTOS app work fine at flash 0x00803000 and then
my bootloader at 0x0 flash jumps to 0x00803000.

Please any comments
thank you

bootflag wrote on Friday, March 22, 2013:

Hello folks…

I got the answer for my questions.

The answer was already posted in this forum.

It’s long discussion for 3 days.
I read this very carefully line by line.
It’s really helpful to me that understanding RTOS and interrupt vector table.

Thank you so much dibosco & richardbarry.
I really appreciate your patience and keep this on the forum.

Sorry for my pure English and
thanks again.