What is " `.text' will not fit in region `m_text' " error about ?

cancel
Showing results for 
Search instead for 
Did you mean: 

What is " `.text' will not fit in region `m_text' " error about ?

7,684 Views
burakduzgun
Contributor I

c:/freescale/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: base.elf section `.text' will not fit in region `m_text'
c:/freescale/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: region `m_text' overflowed by 5732 bytes
collect2.exe: error: ld returned 1 exit status
make: *** [base.elf] Error 1

Labels (1)
0 Kudos
3 Replies

3,242 Views
bobpaddock
Senior Contributor III

The program is 5K larger than allocated by the linker script for the Flash area.

Trying to put a 21K sized program into a 16K part.

0 Kudos

3,242 Views
burakduzgun
Contributor I

Thanks for your reply,

I can  handle this error by increasing  m_text length at linker file. 

At linker file.

m_text                (RX)  : ORIGIN = 0x00000410, LENGTH = 0x000FFBF0    --> Original line

m_text                (RX)  : ORIGIN = 0x00000410, LENGTH = 0x00101254      --> Manipulated line ( increased by 5732 )

Is this about your suggestion? 

0 Kudos

3,242 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Burak,

Yes, your code overflowed, you need increase the region of m_text .

You need check the Reference manual check the flash size of your chip .

BR

Alice

0 Kudos