AnsweredAssumed Answered

Splitting m_text in Linker File of CW

Question asked by VIGNESH BALAJI on May 19, 2016
Latest reply on May 23, 2016 by Fiona Kuang


    I am not able to understand the listing 10 in the document.Based on what are they calculating the origin address when 0x1000 is removed from existing m_text to form a new text. I want to know how they found out the origin address of my_text????


This is the thing given in the document.



Now we need to edit linker file (.ld) to create a new segment where this function is going to be relocated. Compare listing 10 with listing 1 and notice that 0x1000 bytes were subtracted from segment ‘m_text’ to create segment ‘my_text’.



m_interrupts (rx) : ORIGIN = 0x00000000, LENGTH = 0x1E8 

m_cfmprotrom (rx) : ORIGIN = 0x00000400, LENGTH = 0x10 

m_text  (rx) : ORIGIN = 0x00000800, LENGTH = 0x1M - 0x1800 

my_text  (rx) : ORIGIN = 0x000FF000, LENGTH = 0x1000  /* New ROM Segment */ 

m_data  (rwx) : ORIGIN = 0x1FFF0000, LENGTH = 64K   

m_data2 (rwx) : ORIGIN = 0x20000000, LENGTH = 64K 



I have also attached the document.