AnsweredAssumed Answered

Custom BootLoader jump to FreeRTOS application

Question asked by fifre.pascal on May 19, 2014
Latest reply on Mar 16, 2017 by Clive One
Hi all,

I've develop a specific bootloader which calling my application.
My application is based on FreeRTOS.

When the application starts after the jump, the firmware crashes in hardfault.

It works fine when I don't use the FreeRTOS scheduler.

I've tested my application (with FreeRTOS enabled) by loading it with the debugger and it works fine.

FreeRTOS starts their tasks by calling SVC.
Then, i've try also to replace the FreeRTOS scheduler starting by a simply __asm volatile ("svc 0") and I reproduce the same issue.

The application address is 0x0800C000.

Like clive suggested, I have use a system call in my bootloader :
void SVC_Handler(void)
     pFunction      Jump_To_Application;
     uint32_t      JumpAddress;

     /* Jump to user application */
     JumpAddress = *(__IO uint32_t*) (APPLICATION_ADDRESS + 4);
     Jump_To_Application = (pFunction) JumpAddress;

     /* Initialize user application's Stack Pointer */
     __set_MSP(*(__IO uint32_t*) APPLICATION_ADDRESS);


I've checked the VECT_TAB_OFFSET in system_stm32f4xx.c to set it to 0xC000.

Can anybody help me ?

Thanks a lot,