flok
Well-known member
Hi,
I've got this structure:
that I instantiate like:
Now becaus eof the constexpr etc I expected it to NOT be in RAM1, yet:
(output of
).
I used const etc everywhere, how come it is still in RAM1?
I've got this structure:
C++:
struct cmd_pair {
const char *const command;
const char *const parameters;
const char *const descr;
const cmd_func_t func;
enum { par_yes, par_no, par_optional } par_t;
};
that I instantiate like:
C++:
constexpr const cmd_pair cmd_pairs[] {
{ "help", "", "this help", cmd_help, cmd_pair::par_no },
{ "disassemble", "pc=/n=", "show current instruction", cmd_disassemble, cmd_pair::par_yes },
Now becaus eof the constexpr etc I expected it to NOT be in RAM1, yet:
Code:
20000d50 00000474 D _ZL9cmd_pairs.lto_priv.0
(output of
Code:
arm-none-eabi-nm -SC firmware.elf | grep ^200 | sort -k 2
I used const etc everywhere, how come it is still in RAM1?