I want to create compiled code in a different address other than the default 00010074.
How can I do that?
You can adjust the linker script, but Iβm not quite sure what you are asking. What platform are you trying to compile for? Are you using the Freedom E SDK, or Freedom Studio?
I am using Freedom Studio. I am compiling C code to RISC-V and the default value of the instruction address is 00010074.
I would like the compiled code to use a different address.
This means that branches, saved values etc will also change according to the instruction address that I will assign.
Basically i would like to know, how can i add a linker script (because i currently donβt have one in my project) in order to modify it and choose the address accordingly.
Hi Michalis,
Freedom Studio uses standard GCC linker files. An example of one can be found here:
https://github.com/sifive/freedom-e-sdk/blob/master/bsp/env/coreplexip-e31-arty/scratchpad.lds
To add a linker file to a Freedom Studio Project, (optionally) copy the file into the project directory, then inform the linker about the file by selecting the Project and clicking Project β Properties β C/C++ Build β Settings β Linker β General
You can then add the file to the Script Files dialog by clicking the + button. An example is shown in the picture below:
IT WORKS!! Thank you very much!
By using linker file β¦
look into this one