How to port __no_init IAR directive with specific address (@) to GCC compiler?
I am trying to port an IAR project to STM32CubeIDE and I having several problems. One of them is located in the following line of code
__no_init const char reserved_area[2048] @0x08040000 ;
#pragma required=reserved_areaIn particular, I don't know how to port that line to GCC. I think that it could be something similar to the following:
__attribute__((section("no_init")))
__attribute__((used))
const char reserved_area[2048] = (*(const char*)0x08040000);The problem is that I get the following error:
initializer element is not constantIn addition, I don't know the validity of this approach. Because, as far as I know, __attribute__((section("no_init"))) place the variable into the no_init section that may not match with the exact address that I want (0x08040000).
So, to sum up, how can I port the IAR code that I show here to GCC compiler?
