Other Parts Discussed in Thread: RM48L950, HALCOGEN
Hello,
I have used Halcogen to successfully generate HAL drivers for the RM48L950 MCU (using the GNU tools option) and have successfully compiled and run some basic examples (SCI, etc.) However, I am now attempting to use dynamic memory and am modifying a "newlib_stubs.c" file I've created (this is a common practice to define stub functions for things like _sbrk()). I need to write a bit of code that accesses and returns the main stack pointer (MSP) using something like http://pastebin.com/0F62Mrb6 but can't seem to get it to work (I keep getting printouts of stack and heap collision over STDERR whenever I attempt to do anything involving dynamic memory allocation at runtime.)
Any ideas?
EDIT: Link to my code and build workspace so far: https://github.com/Aghosh993/HerculesWorkspace