I am developing embedded applications for the TMS470 and TMS570 using the TI code generation tools 4.9.2.
I want to control the allocation of data (and maybe code) to different sections, so that ultimately I can implement a memory management scheme for AUTOSAR Trusted and Untrusted code.
I have done this on other CPUs and toolchains, starting with some pragma like
#pragma section DATA ".data.trusted" ".bss.trusted"
or
#pragma section all "untrusted_app1"
which place all following data into a named section.
I have found
#pragma DATA_SECTION(u2, "my_data");
but these needs to be set for *every* variable. This is simply not practicable, and cannot be used with the AUTOSAR memmap.h style switching.
Does anyone know of a way to do this ? (I see the C++ version of the pragma allows this, but I am restricted to C).
Thanks
John Robinson