I am working on S32K116 µC with SDK RTM 3.0.0 on s32 DS 2018.R1.
As soon I created a task using FreeRTOS, the flash used increases by 20k
and as soon as I select "semaphores" from FreeRTOS setting, it increases flash size for more 20k.
I would like to know how I could optimize the flash and RAM used by SDK in the project.
I have already done below optimization:
Optimization level: for size
Would you please give me more input?
Unfortunately, the image view is not available in S32 Design, but there's other ways to see the code size for your project and manage the task size.
In the following link, you can see how to in the console the code size for your project:
Since you're using FreeRTOS you can enable the Task List view that shows the usage of the heap that each task has:
In the heap usage view you can see how much free space you have:
Also, in the FreeRTOS component you have you can set how much of the memory the heap will use:
So, knowing how much of the heap the task will use you can modify the stack usage in the xTaskCreate to fit the needs of your task.
Can you let me know how are you adding these components? I'm using the FreeRTOS example that comes with the SDK, this is the example size without modifications:
After adding a simple task this is the size:
And after adding the semaphore support this is the size:
Thank you for the reply. The difference in flash usage is interesting.
I just drag and drop a FreeRTOS component into the Prosessor Expert, generate code, and call "xTaskCreate(demoTask, "demo", configMINIMAL_STACK_SIZE, (void *) 0, tskIDLE_PRIORITY , NULL)" in the code. and nothing more.
I just checked the example code. I don't understand what is makeing this big difference. any hints or idea?
I also did the same process as you but the difference in size is around 1Kb, so I'm thinking this could be due to the software difference.
I'm using the S32 Design Studio 2.2 so you could try updating the IDE.