Hello,
Every one
In my project application, am executing FreeRtos from External ddr3 memory(arm cortex-M3).
Code executed Upto VportstartFirstTask(), after this function code is not running.
below is the VportstartFirsttask which we used in our application.
Can anyone know what could be the reason??
void vPortStartFirstTask(void)
{
/* Use the NVIC offset register to locate the stack. /
__asm volatile(ldr r0, =0xE000ED08
ldr r0, [r0]
ldr r0, [r0]
/ Set the msp back to the start of the stack. /
msr msp, r0
/ Call SVC to start the first task. */
cpsie i
svc 0
nop
)
}
we cant see where its going once code is stuck. What i feel is svc 0 line is causing the issue. i am not sure why. I think this is problem with interrupt vector table.
I have 2 projects as,
Main project (which is kind of boot loader, it does not have FreeRTOS) is running from the on-chip eNVM, which loads the binary file of second project (which has freeRTOS) into the DDR.
Then jump to the loaded binary image, which has FreeRTOS. When i am running it i am facing this issue.
If i run this project from on-chip eNVM, it works fine.
Could you please let me know what could be the reason.
When you run out of eNVM are you still using the bootloader? There have been lots of threads about using bootloaders, most of which are normally concluded by the user remapping interrupts before jumping to FreeRTOS.
On boot up the Cortex-M will read its interrupt from address 0 (or whatever memory is mapped to address zero on boot up). If you call SVC 0 before the vector table base address register has been updated to point to the vector table from the FreeRTOS image then the SVC 0 instruction will jump to the SVC handler of your bootloader instead of the SVC handler of FreeRTOS.