Arguments not working in C with Newlib 2.2.0

84 views
Skip to first unread message

yggdra...@gmail.com

unread,
Jul 17, 2015, 2:07:33 PM7/17/15
to bareme...@googlegroups.com
Has anyone had a chance to try out the args.c program with Newlib 2.2.0? When I run it in QEMU I get an interrupt 13.














Could the issue be how I compiled it? I noticed in some instances there were more flags that I needed to send to GCC, but this is how I'm compiling this right now:

gcc
-I newlib/newlib-2.2.0/newlib/libc/include/ -c src/BareMetal-OS/programs/args.c -o src/BareMetal-OS/programs/args.o -DBAREMETAL
ld
-T src/BareMetal-OS/programs/app.ld -o bin/args.app src/BareMetal-OS/programs/args.o newlib/crt0.o src/BareMetal-OS/programs/libBareMetal.o newlib/libc.a newlib/libm.a

Ian Seyler

unread,
Jul 20, 2015, 4:18:20 PM7/20/15
to bareme...@googlegroups.com, yggdra...@gmail.com
Looks like a compile issue as it works for me. You don't need to include libBareMetal for this program.

gcc -I newlib-2.2.0/newlib/libc/include/ -c args.c -o args.o
ld -T app.ld -o args.app crt0.o args.o libc.a

-Ian

Reply all
Reply to author
Forward
0 new messages