That's weird. And twice so. There shouldn't be any unresolved references to __MPY, even if for some unknown reason a hwmul function gets linked-in. __MPY should be known at compile(assemble)-time and replaced by a fixed address in the emitted binary. As it happens with every other hardware register. So one question is why there is an open references to __MPY at all. Either it is defined at compile time (and then the reference is immediately resoved) or it isn't defined and should cause a compiler/assembler error. Also I wonder why this is the only missing reference. A multiplication requires access to at least 3 registers (1st, 2nd operand and result), yet only one is unknown. Or is __MPY the base address and the derived offsets/registers are defined, yet the base address isn't? Then maybe there's something wrong with the header files used to build the gcclib.
The second thing is why __umulsi3hw gets linked into the project. It might be a flaw in the design of a stdlib function, or the compiler for some reason generates calls to the hwmul functions (or just one of them) despite the fact that no hwmul is available. Since you don't get any complaints about your own code, and I guess that you use normal 16 bit multiplications somewhere in your code, which generate inline code, I guess that the compiler knows that the processor has no MPY module. So the problem is likely in the stdlib. You can try the following: use the -mdisable-hwmul parameter to force the compiler to not use the hwmul at all. It won't help if the bug is already compiled into the stdlib. alternatively, write your own __umulsi3hw function by copying the code from the gcclib __mulsi3 function. The mul-functions are weak, so you can override them with your own version without a linker error. Also, you can try to look at the list file(s) generated for your code. If there's any reference to __umulsi3hw in it, you'll find by a text search. If not, it isn't the compiler which causes the problem. JMGross ----- Ursprüngliche Nachricht ----- Von: Paolo Zebelloni An: [email protected] Gesendet am: 27 Sep 2010 23:16:27 Betreff: [Mspgcc-users] 227x HW multiplier? I still can't compile my project under 4.4.4, but I have an idea: AFAIK 2274 doesn't have a HW multiplier, but at link stage I get this error (and others similar): /opt/msp430-gcc-4.4.4/lib/gcc/msp430/4.4.4/msp1/libgcc.a(_mulsi3hw.o): In function `__umulsi3hw': /home/clabs/Downloads/MSPGCC/mspgcc4-20100829/build/gcc-4.4.4- build/../gcc-4.4.4/libgcc/../gcc/config/msp430/libgcc.S:229: undefined reference to `__MPY' IMHO the problem is the reference to "__umulsi3hw", instead of a reference to "__mulsi3": this drives me to think about a wrong CPU description. Keep in mind that 3.2.3 compiles and links without any issue. Regards. ------------------------------------------------------------------------------ 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
