3

I'm trying to build a simple example from the SDK for the TI CC3200 (Cortex M4), but when I try to compile it complains about stdio.h.

make
  CC    ../main.c
../main.c:45:19: fatal error: stdio.h: No such file or directory
 #include <stdio.h>
                   ^
compilation terminated.
make: *** [obj/main.o] Error 1

Looking into the include dirs, it seems to be right, there is no stdio.h file.

#arm-none-eabi-gcc -print-search-dirs
install: /usr/lib/gcc/arm-none-eabi/4.8.2/
programs: =/usr/lib/gcc/arm-none-eabi/4.8.2/:/usr/lib/gcc/arm-none-eabi/4.8.2/:/usr/lib/gcc/arm-none-eabi/:/usr/lib/gcc/arm-none-eabi/4.8.2/:/usr/lib/gcc/arm-none-eabi/:/usr/lib/gcc/arm-none-eabi/4.8.2/../../../arm-none-eabi/bin/arm-none-eabi/4.8.2/:/usr/lib/gcc/arm-none-eabi/4.8.2/../../../arm-none-eabi/bin/
libraries: =/usr/lib/gcc/arm-none-eabi/4.8.2/:/usr/lib/gcc/arm-none-eabi/4.8.2/../../../arm-none-eabi/lib/arm-none-eabi/4.8.2/:/usr/lib/gcc/arm-none-eabi/4.8.2/../../../arm-none-eabi/lib/

# ls /usr/lib/gcc/arm-none-eabi/4.8.2/include-fixed 
limits.h  README  syslimits.h

# ls /usr/lib/gcc/arm-none-eabi/4.8.2/include/
arm_neon.h  float.h  iso646.h  mmintrin.h  stdalign.h  stdarg.h  stdbool.h  stddef.h  stdfix.h  stdint-gcc.h  stdint.h  stdnoreturn.h  tgmath.h  unwind-arm-common.h  unwind.h  varargs.h

But, should there be? Or is that something that should be provided by the SDK for the specific device?

1
  • I would say yes. stdio.h is the C standard library. It's a little hard to compile a program without it. I'm guessing it has the same function for the TI CC3200. Jul 26, 2014 at 4:18

1 Answer 1

3

Well, that was easy. I just needed to install libnewlib-arm-none-eabi and now everything works. I guess that package is basically 'libc' for this compiler.

1
  • Thank you for figuring this out and posing this answer. gcc is such a morass...
    – alexsh
    Sep 16, 2018 at 22:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .