newlib-1.18.0 arm-none-eabi and sniprintf %d bug

Stuart Longland
Fri Jan 7 00:26:00 GMT 2011

 Hi all,

I'm doing some development on an STM32F103VE microcontroller.  I've
compiled a toolchain myself (using crossdev) for the arm-none-eabi CHOST
using binutils-2.21, gcc-4.5.2 and newlib-1.18.0.  Everything seems to
work fine, except sniprintf (and snprintf).

sniprintf is fine with strings (%s).  It works fine with hexadecimal
digits (%x), however I'm finding I'm getting hard-locks with decimal
digits (%d).  The MCU enters the function, and seemingly never exits.

Unfortunately I do not have a JTAG hooked up, and I'm unsure where to
begin debugging newlib as being new to the innards of the C library, I'm
finding it difficult to trace the execution flow.

Anyone have any suggestions where to begin?

Stuart Longland (aka Redhatter, VK4MSL)      .'''.
Gentoo Linux/MIPS Cobalt and Docs Developer  '.'` :
. . . . . . . . . . . . . . . . . . . . . .   .'.'             :.'

I haven't lost my mind...'s backed up on a tape somewhere.

More information about the Newlib mailing list