`arm-none-eabi-gcc` 是否应包含 `stdio.h`?

`arm-none-eabi-gcc` 是否应包含 `stdio.h`?

我正在尝试从 TI CC3200(Cortex M4)的 SDK 构建一个简单的示例,但是当我尝试编译时它会抱怨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

查看包含目录,似乎是正确的,没有 stdio.h 文件。

#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

但是,应该有吗?或者这是 SDK 应该为特定设备提供的东西?

答案1

嗯,这很简单。我只需要安装libnewlib-arm-none-eabi,现在一切就绪了。我猜这个包基本上就是这个编译器的“libc”。

相关内容