hi, André

For your trouble with "print" function, as Michiel say you shouldn't use this fonction (printf in libc)
It doesn't support 20 bit addressing, because it use function pointer !

==> int vuprintf(int (*func)(int), const char *fmt0, va_list ap)

It'll crash even if it's located into the lower memory space.
The compiler process function pointer with only 16 bits, and then it make "calla" with 20 bit addressing !

The generated assembly instructions look like :

Address_storage:
        .word _Function_Address_Only_16_bit_are_stored_

        calla    Address_storage                    ; cause a cash

        mov        #Address_storage, R15
        calla    @R15                                      ; cause a crash


Try another printf function your test ! for example this one => http://www.menie.org/georges/embedded/printf.c

Look at this previous post, you can find some tips :

http://sourceforge.net/mailarchive/forum.php?thread_name=4D02044A.6080502%40ap3.fr&forum_name=mspgcc-users

It's possible to use all memory MCU space !

I use MSP430X compiler for MSP430F5418 for my project since a few months, and it's about 64K, and grow up day by day ...

I put all my datas and my functions called by pointers below 64K!, and I use specific function call describe on the post !

My compiler option is : OPT_CPU = -mdata-64k

Sections in use :
ELF section .bank0section at 0xf800 10 bytes
ELF section .bank1section at 0xfa00 532 bytes
ELF section .text at 0x5c00 39404 bytes
ELF section .data at 0xf5ec 210 bytes
ELF section .romconst at 0xfe00 138 bytes
ELF section .vectors at 0xff80 128 bytes
ELF section .fartext at 0x10c00 23774 bytes

Regards, Thierry


------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Mspgcc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mspgcc-users

Reply via email to