Hi Jordi,

besides the problems with parameters, there is another problem with the MSP430X 
command set:
Calling functions in the FARMEM requires different function calls (CALLA 
instead of CALL) as well as different return codes (RETA instead of RET).
This is somewhat backward compatible, as it also works with a destination in 
the lower 64K.
And a normal function in TEXT segment may call a function in FARTEXT using 
CALLA. 
BUT
you cannot call a function in TEXT segment from FARTEXT, unless the destination 
function has the proper RETA return code.
While the compiler might ensure that it works with its own compiled code by 
always generating CALLA and RETA codes, the included library functions might 
not be compiled with these.
So if you call a normal printf with normal RET code from code in FARTEXT, it 
will return to the same 16 bit address in TEXT segment (which is abviously not 
the desired behaviour).

So if the linux compiler works fine and the windows is not, it might be because 
the runtime libraries are different and do not take care of the altered 
situation.

JMGross


----- Ursprüngliche Nachricht -----
Von: Jordi Soucheiron
An: GCC for MSP430 - http://mspgcc.sf.net
Gesendet am: 13 Jan 2010 09:46:03
Betreff: Re: [Mspgcc-users] Msp430x + win

Hi,
I've been trying the compiler on a msp430f2617. So far I haven't been
able to use printf using the -mdata-64k option. The same program with
the linux version of the compiler works just fine. Any thoughts on
what may cause this?


Reply via email to