I’m a FreeRTOS starter.
I’d like to run the latest FreeRTOS (V10.3.1) on my TIVA Launchpad (TM4C123GH6PM).
I’m using the TI CCS (V10.0.0.00010) with the TI compiler (TI v20.2.1.LTS).
I’m reading the guide Mastering the FreeRTOS… and I understood the basic directory structure for a project using FreeRTOS.
I understood that the configuration file (FreeRTOSConfig.h) needs to be fetch from the demo.
I think that the closest demo to my platform is the CORTEX_LM3Sxxxx_Eclipse, then I get the FreeRTOS V8.2.3 and its demo.
Since this is a quite old demo I was wondering if this configuration file needs to be “modernized” to be 10.3.x compliant.
For sure I have to update the configCPU_CLOCK_HZ to be aligned with the mine. I thought to replace that line as:
#define configCPU_CLOCK_HZ (SysCtlClockGet())
What are the next steps to optimize the configuration?
I think that the stack size should be sized accordingly with the application. What is the procedure to find out this? Is the value provided by the demo fine to make a simple demo on my board?
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 80 )
What about the HEAP?
The guide reports: Projects that use a FreeRTOS version older than V9.0.0 must include a heap memory manager. From FreeRTOS V9.0.0 a heap memory manager is only required if configSUPPORT_DYNAMIC_ALLOCATION is set to 1 in FreeRTOSConfig.h, or if configSUPPORT_DYNAMIC_ALLOCATION is left undefined.
Of course I’d like to benefit of this “automatic mechanism”, so how should I updated the configuration?
Something more to suggest me?
Because the demo project is very different from the board that I have, I decided to make a project “ex-novo”:
- I made a new CCS project;
- then I added the FreeRTOS files following the structure explained in the guide using the links instead of copying the files into the project directory (under the FreeRTOS folder) - I followed this guide;
- finally I added the FreeRTOSConfig.h in the root project directory.
Of course I added the FreeRTOS and TIVAWARE paths to the compiler project and I’ve been able to compile it.
The image below shows the final project structure.