On Thu, Aug 16, 2012 at 09:46:55AM +0200, Hardy Griech wrote: > 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...
Hi Hardy, I don't have gcc-3 set up, but are you able to find the definition of WINAPI anywhere in the Cygwin-included header files? I'm surprised that this is apparently defined, but not correctly. > PS: free run of the target on close is not working for me Is this with the TI library? V2 or the open-source library? > PPS: I'ld recommend adding "__attribute__ ((format (printf, 1, 2)))" > to the printc*() declarations Good idea. This uncovered a few errors too. Cheers, Daniel -- Daniel Beer <dlb...@gmail.com> www.dlbeer.co.nz IRC: inittab (Freenode) PGP key: 2048D/160A553B ------------------------------------------------------------------------------ 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