I didn't see any direct answer to this question 
(while it has been addressed indirectly in a different thread since),
so I'll add an answer now.

The 256kb memory in the 5438, while physically consecutive,
is divided into three separate functional parts.
The interrupt vector table lies in the middle of it (below 0x10000),
so it divides the available program space into two independent and separate 
sections.
Th elinker is unable to split code into these two sections without help.
It tries to put everything into the .text segment, which is the lower part,
going from 0x05c00 to 0x0ff7f. Everything goes there unless forced otherwise.
The linker files for the 5438 should include segment definitions for the other 
part,
starting at 0x10000. But the linker won't put anything there unless told to do 
so.

That's what happened to you: the linker puts everythign into the text segment, 
which
ends below the vector table. Not recognizing that there is a seconf and much 
larger
free memory area available too.

You can force putting code or data there by manually putting your functions (or 
variables)
into the .fartext segment instead of the default .text segment.
The compiler needs to generate the proper calla and reta instructions (instead 
of
the previeously used 16 bit call and ret instructions) anyway.

There are other threads in this mailing list, dealing with this topic and
how to use different versions of the mspgcc or switches for near and far
data space etc.

JMGross


----- Ursprüngliche Nachricht -----
Von: Mihai Galos
An: [email protected]
Gesendet am: 08 Sep 2010 11:22:51
Betreff: [Mspgcc-users] mspgcc: region text is full

Dear all,

I am facing the following compilation problem for the TI MSP430f5438 :

C:\mspgcc\bin\..\lib\gcc-lib\msp430\3.2.3\..\..\..\..\msp430\bin\ld.exe: region 
text is full (Compiler.elf section .text)
C:\mspgcc\bin\..\lib\gcc-lib\msp430\3.2.3\..\..\..\..\msp430\bin\ld.exe: region 
text is full (Compiler.elf section .text)
C:\mspgcc\bin\..\lib\gcc-lib\msp430\3.2.3\..\..\..\..\msp430\bin\ld.exe: 
section .text [00005c00 -> 0001afc7] overlaps section .data [00005c00 -> 
00005c21]
C:\mspgcc\bin\..\lib\gcc-lib\msp430\3.2.3\..\..\..\..\msp430\bin\ld.exe: 
section .vectors [0000ff80 -> 0000ffff] overlaps section .text [00005c00 -> 
0001afc7]

this mcu has 256kB of Flash, and 0x01afc7 - 0x005c00 = 0x153C7, about 87kB. I 
don't understand why it says the code is too big.

I have manually defined __MSP430_5438__ and compiled with -mmcu=msp430x5438.

Any ideas?

Thank you in advance,
Mihai Galos



------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Mspgcc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mspgcc-users

Reply via email to