Codesourcery's Builtin Newlib and LPC21xx(Yes I have stubs:)

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.

  1. 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)

  2. 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.

I have not tried my lpc2148 yet, but I have been updating my toolset for STM32 and installed the last CS Lite, as well as the latest OpenOCD. Trying to stratify and object orient the pile of code related to STM32. It spits out an init string on the uart and then stops…I am sure its my fault as this code and hw all worked a year ago.

I’d check the ‘LPC2100’ Group over in Yahoo, if its a common problem someone will have found it. You can check the files list there too for startup code. You didn’t mention the chip you are using. If you are using a vendors board, they should have a startup script already done.

Also this fellow is a treasure trove of ARM data:

http://gandalf.arubi.uni-kl.de/avr_proj … _projects/