This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi,
I have just generated code from Halcogen for TI-FEE Driver and I have noticed that it added .sysmem section to the linker command file:
.sysmem : {} > RAM
Is the F021 Flash API or TI-FEE driver using heap? Isn't it a problem for safety applications that are restricted to using only static memory allocation?
Best Regards,
R.
Hello Ritchie,
First of all, it is not limited to Flash API or FEE driver, any example code generated by Halgogen has this (.sysmem mapped to RAM) in the command file.
The .sysmem section reserves space for dynamic memory allocation. This space is used by dynamic memory allocation routines, such as malloc(), calloc(), realloc(), or new(). If a C/C++ program does not use these functions, the compiler does not create the .sysmem section.
So now if you look into the memory map file generated (*.map), and search for .sysmem, you can't find any really, meaning it has not been actively used.
Hopefully this helps.
best regards,
David Zhou
>First of all, it is not limited to Flash API or FEE driver, any example code generated by Halgogen has this (.sysmem mapped to RAM) in the command file.
That is not true. Until I enabled FEE driver in Halcogen -> "Driver Enable" tab, the sys_link.cmd had no .sysmem section. I have checked it again to be sure of that. Enabling other drivers does not append the .sysmem line to the linker command file.
>The .sysmem section reserves space for dynamic memory allocation. This space is used by dynamic memory allocation routines, such as malloc(), calloc(), realloc(), or new(). If a C/C++ program does not use these functions, the compiler does not create the .sysmem section.
My program is not using dynamic memory allocation so I don't want this section in the linker command file.
>So now if you look into the memory map file generated (*.map), and search for .sysmem, you can't find any really, meaning it has not been actively used.
That is a helpful piece of advice. Indeed, there is no .sysmem section in the memory map file, so this is an ultimate indicator whether the section has been used or not.
Anyway, adding an unused section when enabling the FEE driver is a bug for me so it would be nice if that was fixed.
Best Regards,
Ritchie
Ritchie,
What is the version of HALCoGen you are using? I am using 4.7.1 and I tried to create a new project for 570LS1224 and with all the drivers disabled, I have .sysmem mapped to RAM.
best regards,
David Zhou
Ritchie,
Thanks. Now I have reproduced it. Here is the summary.
1) For not FREE RTOS, .sysmem is always included in .cmd file even with all drivers disabled;
2) For FREE RTOS, .system is only included in .cmd file when FEE driver is enabled.
But I think for the time being, you should be fine now since you are not using .sysmem at all. I will close this E2E thread.
best regards,
David Zhou