I want to compile and link a file (flash.c) to a specified address, for example 0x20000000, how to write the link script, and what should I do in the source file?
In fact, I want to erase and re-programming the nor flash, as you know, I can not do it because my code is running in NOR flash.
So I want to copy some code from NOR flash to RAM, and run from ram to do it.
I put all of the code about flash operation to flash.c and want to compile and link it to RAM address 0x20000000.
how to do it?