I used a dirty method to do this.
sections.ld
Code: Select all
config :
{
. = ALIGN(4);
KEEP (*(.config))
} > CONFIG
tracks :
{
. = ALIGN(4);
KEEP (*(.tracks))
} > TRACKS
Code: Select all
CONFIG (RW) : org = 0x3FCC0000, len = 0x4000
TRACKS (RW) : org = 0x3FCC4000, len = 0x4000
Code: Select all
static const volatile LoggerConfig g_savedLoggerConfig __attribute__((section(".config\n\t#")));
By the way, my project is a custom Cmake project.(https://docs.espressif.com/projects/esp ... -%EF%83%81)
When I change the CMakeLists file, the memory.ld and section.ld file changes.
And I'm not sure I've literally allocated these spaces.
Any task should not automatically generate data in these fields.
I said this because when I changed the data in the area that I thought I had allocate, the wifi task was broken.
Issue fixed when i allocate data in another area of DRAM.
And it was a weird situation for me
I'm asking my question now:
How can I cleanly create variable in a specific field in DRAM ?