Hehe, glad to hear your problem is fixed. And relieved that I shouldn't have to worry about running into it myself.

That is a pretty creative way to give yourself a hard time.. Of course we've all done worse at one point or another. :)




On 2010/03/31, at 5:17, Bragg Nate wrote:

Tyler and JMGross,

I appreciate both of your help in this. At the risk of making myself out to be a total idiot, I realized that like so much else in my life, this misery was self-inflicted. Hopefully humility counts for something. Also, hopefully you will find this as hilarious as I did.

Since taking on this codebase, I have learned a world about how the msp430 works, and how gcc works. When I started, I attempted to port this codebase from the Quadravox compiler. Many of the build automation done for that compiler was autogenerated, but I regardless attempted to dutifully transcribe from one set of options to the other. Most of these were easy to find, but some were more difficult.

One of the more difficult ones happened to be specifying the stack pointer, which I eventually found to be "-Wl,-- defsym=__stack=[...]". But, just to make double sure that this one really stuck, I set it to a rather... unique address - one that, you guessed it, happened to be odd. Sure enough, the compiler generated code to match, as expected. Pleased that I figured out how to set the stack pointer, I moved on... without fixing my Makefile.

TL;DR: If you want to learn a TON about how compilers work and how your target architecture works, set the stack pointer to an odd address, and then forget about it.

Also, I might humbly suggest that the compiler flags the __stack value being set to an odd address with a warning, that some other poor soul somewhere wouldn't be faced with the same experience.

Sheepishly,

Nate Bragg
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev_______________________________________________
Mspgcc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mspgcc-users


Reply via email to