Hi, i’m working on STM32CubeIDE platform to program STM32F407 Discovery Kit with FreeRTOS. I set the default configuration of FREERTOS and I select TIM1 as Timebase Source as suggested. I want to test a simple blinking LED routine in the default task, but during debug the software generates Hard Fault Exception on osKernalStart() call. The exception is generated here:
void vPortStartFirstTask( void )
{
__asm volatile(
" ldr r0, =0xE000ED08 \n" /* Use the NVIC offset register to locate the stack. /
" ldr r0, [r0] \n"
" ldr r0, [r0] \n"
" msr msp, r0\n" / Set the msp back to the start of the stack. /
" cpsie i\n" / Globally enable interrupts. /
" svc 0\n" / System call to start first task. */
" nop\n"
);
}
I have read in other posts the problem could be solved by adding these lines, but in my version of FreeRTOS and STM32CubeIDE they were already present.
#define vPortSVCHandler SVC_Handler
#define xPortPendSVHandler PendSV_Handler
#define xPortSysTickHandler SysTick_Handler
Any suggestions?
Thanks for helping.
Riccardo Palma, Giacomo Melai