Hello,
I'd like to create a custom initialized data section so I've added this line to my command file:
.cmds : LOAD = FLASH, LOAD_START(_cmdsStart), LOAD_END(_cmdsEnd), PAGE = 0
Then in C my idea was to declare structures in that section like this:
#define DEFINE_COMMAND(name, execfn, desc) command name __attribute__((section(".cmds"))) = {#name, func, desc}
DEFINE_COMMAND(help, helpCmd, "Help command");
so I could then iterate from cmdsStart to cmdsEnd, much like libc does it with initializer functions.
But this doesn't seem to work. It creates the .cmds section and reserves memory of correct size, but the actual data in my .cmds section is uninitialized (all Fs).
Do you perhaps see something wrong with this?
Thank you
Jiri