Does it possible to specify via IDE in MCU setting, RAM section what is not initialised at all ?
.data_SRAM4 0x30040000 (NOLOAD) : ALIGN(32)
If there is no data defined in that section, it will not be initialised or zero'd. In fact, if it is not defined at all, then the startup code will not even know about it.
What are you trying to achieve?
Hi Con !
I would like to reserve some area of SRAM memory what is persist over MCU reboot.
So no any startup initialization shouldn't touch those area.
But I still would like to allocate some variables in this section and initialize those from my code.
Does it possible to have some trick or manual modification of exported linker files are only option ?
I think you want a NOINIT rather than a NOLOAD. And fortunately, MCUXpresso automatically creates .noinit sections in every RAM region you define. So, using the cr_section_macros.h and assuming your memory region is called SRAM_NOINIT, you can simply write
__NOINIT(SRAM_NOINIT) unsigned int preserved_across_boot;
and this will place preserved_across_boot into SRAM_NOINIT that is not initialised or zero filled.
Looks like I should study this automatic linker file generation in more details.
Could you point me to the latest documentation about it.
I should be able to put some code to SRAMX area for execution and a lot of other advanced staff.
I think it should be some semiautomatic solution . Now I'm manually modify original files.
where tthose templates #include <cr_section_macros.h> are located ?
Looks like they depends from MCU type and other configurations.
Look in the User Manual - "Memory Configuration and linker scripts". Especially subsection on "Placing data into different RAM blocks using Macros" and "Freemarker Linker Script Templates"
The section macros are in the standard search path for include files. Just #include it.
The macros are not MCU type dependent. You can use YOUR names as defined in the memory configuration editor
Retrieving data ...