I’m trying to get the newest arm-none-eabi lite version from codesourcery working. I can compile and run code that doesn’t pull in any newlib functions fine, but when I add use printf, or iprintf, or setvbuf, my code locks up. I have traced it down to data aborts in the vsprintf when using the printf type functions, and can’t remember where it was bombing out when using setvbuf, but it was also data aborts that cause the hang. Since the CS version of newlib doesn’t have debugging info by default I’m having a hard time getting the exact line of code causing the issue, but I suspect it is something to do with my linker script or startup code since it never gets to my supplied stubs, and it compiles fine (no errors about missing __sbrk or __write …). I have been searching all over the net with google just trying to find someone who has got this to work, but no luck. It really boils down to two questions.
-
has anyone gotten the newlib in codesourcery working on a lpc21xx series? Seems like everyone getting newlib to work used YARGTO or WinARM. (I’m running on Linux, so those aren’t viable options)
-
if you can answer yes to 1, could I get a copy of your linker script, and starup code? Maybe even throw in your stubs code also.