This symbol is defined at link time. The examples pass the option -Wl,-defsym,_io_ports=0x1000 which tells the linker to define the symbol and give it the address 0x1000.
It is also possible to define that symbol in linker scripts and use:
PROVIDE(_io_ports=0x1000)
You can do this in memory.x part of the linker script. |