Hi all,
I’m trying to run my first FreeRTOS project.
I’m reading all the useful guides like (the book and the FAQ and other posts).
I’m using the TIVA Launchpad (TM4C123) and the TI CCS enviroment (V10.0.0.00010) with the TI compiler (TI v20.2.1.LTS).
I’m trying to run the latest FreeRTOS (V10.3.1).
I had a look to this demo that is similar to this board, from which I get the FreeRTOSConfig.h file (see my previous post).
At the moment I’m able to create a task (it should just turn a LED on), but as soon as I start the scheduler the PC jumps to the Default_Handler.
I stepped-in the code and the exact point where this happen is at the function vPortStartFirstTask().
Looks like some exception is triggered, but I can’t understand which one. To understand which was, I tried to implement the code proposed here, but this doesn’t run with my complier (it might be for GCC, I’m not sure).
Is there someone that can help me to:
- translate this code for the compiler that I’m using, or
- make a GCC project build (this is not my priority)?
- I tried to make a project using the same configuration except selecting the GCC compiler (GNU v9.2.1 Linaro), but I get a lot of errors related to the linking phase
I use the heap_4 as memory model with the following configuration:
#define configMINIMAL_STACK_SIZE ( ( uint16_t ) 100 )
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 10 * 1024 ) )
#define configCHECK_FOR_STACK_OVERFLOW 2
I also defined the exceptions handler in the startup code using the CMSIS style:
...
void PendSV_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
void SysTick_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
void SysTick_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
...
I updated the vector table as well:
...
SVC_Handler, /* SVCall handler */
DebugMon_Handler, /* Debug monitor handler */
0, /* Reserved */
PendSV_Handler, /* The PendSV handler */
SysTick_Handler, /* The SysTick handler */
...
And I added these defines to the FreeRTOSConfig.h file:
#define vPortSVCHandler SVC_Handler
#define xPortPendSVHandler PendSV_Handler
#define xPortSysTickHandler SysTick_Handler
I really hope that someone could help me to solve this, because all I tried failed.
Best regards,
AGA