Le 20/09/2010 22:49, Mihai Galos a écrit :
Hello everybody.
I toyed around with a disassembly of an application I am building which is
about 83kB of flash.
I am using a MSP430F5438 MCU. Some functions I have manually relocated to the
section of addresses above 64KB. Now, when I try to call them, the compiler
generates CALL instructions to truncated addresses, like in the example below:
void foo(uint8_t luc_a) {return luc_a++;} // actual function address : 0x10fd3
msp430-objdump -S myfile.elf disassembles to: CALL 0x0fd3 # calling function
foo()
I am not even sure if it is a linker or a compiler problem..
Also, I would like to be able to "force" extended calls (i.e. in the whole
address space) only for some functions, and for others not. This is to save flash usage
in case of low-address residing functions.
So, basically my question is: how to make the elf file call the correct address
of function foo? :)
Regards,
Mihai
Hello, Mihai !
What compiler do you use?
According to Peter Bigot following my recent post "MSGCC3.2.3/MSPGCC4
<http://sourceforge.net/mailarchive/forum.php?thread_name=4C91E1D6.5060001%40ap3.fr&forum_name=mspgcc-users>"
must use the MSP430X branch off CVS
"If you need 20-bit address support, the MSP430X branch off CVS is your
only choice today."
But it seems that there are still some problems:
Instruction "addx" turns into "rlax"
I think as BILLW "Building MSPGCC4 from SVN
<http://sourceforge.net/mailarchive/forum.php?thread_name=B5F93770-D60E-497C-BDF3-A6A00A6C5585%40mac.com&forum_name=mspgcc-users>",
it will important to set up a wiki page available on the homepage!
This "wiki" could explain on how to choose :
- Versions of binutils (2.18, 2.19, ...)
- Versions of gcc (3.2.3, 4.4.4, ...)
- The version of libraries (CVS, TI, ...)
and report what he can no longer use, It'll be interesting and note also
the eventual compilation problems under different OS:
- Linux
- MACOS
- Windows (Cygwin)
What do you think?