I am transferring the ARM chip program from the IAR compiler to gcc.
In the source code, special IAR operators, such as __segment_begin and __segment_size , are used to get the beginning and size of specific memory segments.
Is there a way to do the same with GCC? I was looking for a GCC manual but could not find anything relevant.
More details:
The considered memory segments must be in fixed locations so that the program can correctly interact with some peripheral devices on the chip. The source code uses the __segment_begin operator to get the address of this memory and __segment_size to make sure that it does not overflow this memory.
I can achieve the same functionality by adding variables to indicate the beginning and end of these memory segments, but if GCC had similar statements that would help minimize the amount of code dependent on the compiler, I had to write and maintain.
gcc porting iar
tomsgd
source share