This application note was created to help raise awareness of the memory limitations that exist for the 4th generation platform of controllers.
For example, the 4CT is very limited in RAM compared to other 4th generation controllers and may not be able to support large memory-intensive projects. When memory usage has been exceeded, it's possible for memory related compiler errors to occur, such as:
c:/stw/tricore toolchain/gcc_4_9_4_0/bin/../lib/gcc/tricore/4.9.4/../../../../tricore/bin/ld.exe: error: not enough memory for CSA
Memory specifications for each controller processor:
TC299 - 4CS, 4CM, 4CL
CORE0(boot): ~120KB RAM
CORE1-LS(safety): ~240KB RAM
CORE2(application): ~240KB RAM
EMEM(external RAM but on chip): ~2MB
TC399 - 4CL-AG
CORE0-LS(boot): ~240KB RAM
CORE1-LS(safety): ~240KB RAM
CORE2-LS(application): ~96KB RAM
CORE3-LS(unused): ~96KB RAM
CORE4(unused): ~96KB RAM
CORE5(unused): ~96KB RAM
EMEM(external RAM but on chip): ~5.5MB
TC367 - 4CT
CORE0-LS(application): ~192KB RAM
CORE1-LS(safety): ~192KB RAM
EMEM(external RAM but on chip): ~128KB
Note: "LS" indicates lock-step core that can be used for safety.
How to help resolve compiler errors by re-allocating memory for a logi.CAD project:
Most TSPs allow for the memory available to each core to be assigned by the linker script used. This allows both the EMEM RAM and the on CORE RAM to be assigned to specific cores. Please see the individual user manuals for additional details.
From the logi.CAD project's properties window, the highlighted text in the snapshot below is an example for what needs to be changed to re-allocate memory usage for the project. For this particular project using a 4CT controller, changing "link_c_layout_2.ld" to "link_c_layout_1.ld" for BOTH THE APPLICATION CORE AND SAFETY CORE CONFIGURATIONS will reassign memory from the safety core to the application core so that there's more memory to work with within the application core.
The applicable memory layout information from the 4CT user manual is shown below: