There are some limitations of the 430X model: Function need to use CALLA and RETA instead of CALL and RET. This includes precompiled library functions(!) which must, even if linked low, use RETA to return to the caller or they will return to the lower 64k and leave the upper word of the return address on the stack. Also, interrupt function entry points may only be placed in lower memory (there are only 16 bit interrupt vectors) but may then jump or call to .fartext.
If you use >64k data, registers must be saved as 32bit values on stack and not 16 bit. While the compiler should handle this for your own code, libraries may destroy the upper word of registers they save before using them locally. This includes the multiplication and division functions linked from gcclib. Also, constant data residing in .fartext require functions properly handling their pointer. This is especially important for printf and sprintf which manually inspect the stack. Personally, I don't use the .fartext extensions in my C code. I have some hand-coded assembly functions that access .fartext to read data stored there (from large tables etc - putting these into .fartext is not a problem), but my code resides completely in lower 64k. I hope by the time my code grows so large it won't fit into uppe rmemory anymore, the compiler will be advanced enough (including the libraries and their structure) to use full 430X (or at least safely use it for code). Currently, there are too many unknown pitfalls to use it in a productivity environment. JMGross ----- Ursprüngliche Nachricht ----- Von: André Gomes Gesendet am: 11 Jan 2011 15:18:58 Hi all, I'm currently working with the MSP430X tool chain to go beyond the 64KB limit of the 16bit architecture of MSP430F2617. After installing it, the compilation process works fine but after uploading the binary to a board based on the MSP430F2617 the system keeps rebooting. This only happens when using MSP430X, as when I tested with the regular MSP430 tool chain it worked perfectly (with the 64KB limitation). In fact, if I disable the .fartext support using the flags -mcode-64k and -mdata-64k it also works. Does anyone have any idea? Thanks in advance. ------------------------------------------------------------------------------ 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
