print float using newlib nano lib
Hi
I built newlib nano from the sources (with addition of --enable-
#include <stdio.h>
float f1 = 12.34;
int main(void)
{
printf ("test printf\n");
printf ("float value: %f\n", f1);
return 0;
}
$arm-none-eabi-gcc -Wl,-Map=output.map -mcpu=cortex-m3 -mthumb print.c -o print.elf -Dprintf=iprintf -u _printf_float -specs=nano.specs -lc -lnosys -lc
When I try to run using qemu-system-arm, it hangs.
$qemu-system-arm -cpu cortex-m3 -nographic -serial null -monitor null -semihosting -kernel ./print.elf
qemu-arm also fails with "uncaught target signal 11 (Segmentation fault)"
(version 1.4.1)
Am I missing something?
If I use "-specs=
Thanks.
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- chengbin
- Solved:
- Last query:
- Last reply: