Quantcast
Channel: Tools
Viewing all articles
Browse latest Browse all 91752

Forum Post: RE: Linker output order

$
0
0

Have you considered the possibility of not having a .free_memory section at all?  If I understand your situation correctly, you don't need it.  You just need a symbol that indicates where free memory starts.  And you want that at the end of the .cinit section.  To do that requires some code in the link command file and in C.  In the link command file you need something like this:

/* in the SECTIONS directive */ .cinit > DDR_MEM (HIGH), RUN_END(free_memory) 

In C code, declare free_memory like this ...

extern unsigned char free_memory[]; 

I put the (HIGH) modifier on .cinit to make sure it is allocated at the highest address in DDR_MEM.

Thanks and regards,

-George


Viewing all articles
Browse latest Browse all 91752

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>