简体   繁体   English

Debian上没有stdint.h文件

[英]no stdint.h file on Debian

I'm trying to use Chibios. 我正在尝试使用Chibios。 The example code they provide seems to need stdint.h file. 他们提供的示例代码似乎需要stdint.h文件。 The Makefile gives the following error: Makefile出现以下错误:

/usr/lib/gcc/arm-none-eabi/4.8/include/stdint.h:9:26: fatal error: stdint.h: No such file or directory
 # include_next <stdint.h>
                          ^
compilation terminated.
../../os/ports/GCC/ARMCMx/rules.mk:182: recipe for target 'build/obj/crt0.o' failed
make: *** [build/obj/crt0.o] Error 1

I could find nothing useful in the web. 我在网络上找不到任何有用的东西。

#include_next is used to let one file augment another one with the same name. #include_next用于使一个文件扩充另一个具有相同名称的文件。 In this case, it seems the "other one" is not available. 在这种情况下,似乎“另一个”不可用。

I got the same error trying to compile my code using the gcc-arm package in Linux Mint, gcc-arm-none-eabi. 我在尝试使用Linux Mint中的gcc-arm软件包gcc-arm-none-eabi编译代码时遇到了相同的错误。 I got past this problem by installing libnewlib-arm-none-eabi: sudo apt-get install libnewlib-arm-none-eabi 我通过安装libnewlib-arm-none-eabi克服了这个问题: sudo apt-get install libnewlib-arm-none-eabi

try this: 尝试这个:

apt-get install avr-libc

Hmm, my answer is not suit for ARM, just wish other avr users can get help when they meet the same question. 嗯,我的答案不适合ARM,只是希望其他AVR用户在遇到相同问题时能获得帮助。

With valuable helps of gcc-arm-embedded team ( here ) I managed to compile Chibios demo program successfully. 在gcc-arm嵌入式团队的宝贵帮助下( 此处 ),我成功地编译了Chibios演示程序。 I downloaded gcc-arm-none-eabi-4_8-2014q1 from their launchpad site and it worked just fine. 我从他们的启动板站点下载了gcc-arm-none-eabi-4_8-2014q1,它工作得很好。

可能您忘记了指定gcc的-ffreestanding选项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM