On 14.08.2012 23:00, Daniel Beer wrote: : >> One "funny" remark from my side: mspdebug would have been compilable out >> of the box under cygwin, if I'd used the "correct" compiler: gcc-4 >> (4.5.3) produces invalid (?) code which makes mspdebug crash with >> segmentation fault (with gdb one can see that "device" is changed by >> printc_dbg() (tilib.c:622, "mspdebug tilib"). Perhaps one has to use >> the correct compiler options? > > That's strange. At this point, MSP430.DLL will be up and running, so > could be due to problems linking a Cygwin binary with a "native" one > perhaps. :
After struggling around with mspdebug which even crashed with gcc-3 under some circumstances, I've found out, that the DLL function declarations are wrong. For cygwin all need a __stdcall prefix. Otherwise the stack would become corrupted because the caller does not clean up. Now it's even working with gcc-4... Hardy PS: free run of the target on close is not working for me PPS: I'ld recommend adding "__attribute__ ((format (printf, 1, 2)))" to the printc*() declarations ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Mspgcc-users mailing list Mspgcc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mspgcc-users