How to place an ASC string in flash on STM32G474 controller when using CubeIDE with GCC compiler?
Hello,
I have an issue to place a ASCII string in flash when using CubeIDE and the GCC compiler:
#define APP_INFO_ADDR_2 ".ARM.__at_0x08000200"
const uint8_t my_text[] __attribute__((section (APP_INFO_ADDR_2))) = {"Hallo"};
when I compile this code (no opimization), I get no errors, but at the hex file at address 8000200 there is no "Hallo" string located.
When I compile the same code with µVision and the Keil Compiler it works.
I also searched for this issue and the only working solution I found is, to define a separate section in the linker script and then place this string in this specific section.
But to change the linker script for this task is not my preferred way.
So the question for the community here is:
What do I need to change here to see also this ASCII string in the hex file, when using GCC and CubeIDE?
BR
