cancel
Showing results for 
Search instead for 
Did you mean: 

how iadd .o file link in ld file ?

Hhaon.1
Associate II

i'm using stm32H7,i want to use ITCM/DTCM ram,so i want add .o file in stm32H7XXXXX.ld file

i try

.main_section {

. = ALIGN(4);

CORE/src/main.o(.data);

. =ALIGN(4)

}>ITCMRAM​

but gcc report error

so i want to known how fix it​?

3 REPLIES 3
Pavel A.
Evangelist III

To add .o and libraries in link script itself rather than in ld command line, use INPUT command.

Well you'll need to inter-stage any content you want to end up in RAM to FLASH, and then have code in startup.s copy it to the final destination.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Hhaon.1
Associate II

ok,thanks