Mailing List Archive

crossdev and newlib
Hello
I've been using crossdev with an STM32F100 for a while and it works
great ... thanks to all involved.
I'm now want to use newlib. The tuple I use is arm-none-eabi. Is there
anything I should put in the Makefile of the project or changes to
crossdev to prevent multiple definition of syscalls e.g. _write. Also
is there any way to use newlib-nano. Thanks in anticipation.

Billy
Re: crossdev and newlib [ In reply to ]
On Tuesday 19 November 2013 08:27:44 billium wrote:
> I've been using crossdev with an STM32F100 for a while and it works
> great ... thanks to all involved.
> I'm now want to use newlib. The tuple I use is arm-none-eabi.

correct

> Is there
> anything I should put in the Makefile of the project or changes to
> crossdev to prevent multiple definition of syscalls e.g. _write.

most likely you're not defining one of the syscall symbols which is causing the
stub one to get linked in

if you read the libgloss arm syscalls.c, you'll see that they're all written
to assume you've got a handler installed to listen to "swi" calls. then in
your handler, you'd decode what it is the library is trying to do.

if, instead, you want to hijack _write directly, you'll need to do it for
every symbol defined in /usr/arm-none-eabi/lib/libc.a(lib_a-syscalls.o). you
can use `readelf -s` to see them.

sadly, libgloss tends to be undocumented and vary based on architecture.

> Also is there any way to use newlib-nano.

no idea what that is
-mike