23

I'm trying to use ChibiOS. The example code they provide seems to need a 'stdint.h' file. The Makefile gives the following error:

/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 couldn't find anything useful on the web.

3
  • #include_next is non-standard. Why did you try to use it rather than #include? Commented May 31, 2014 at 23:00
  • 1
    I have nothing to do with that statement. #include_next is placed in /usr/lib/gcc/arm-none-eabi/4.8/include/stdint.h which is shipped with arm-none-eabi-gcc package. Do you want me to edit that file? Commented Jun 1, 2014 at 1:18
  • Sorry, I didn't notice that. No, I wouldn't suggest editing that file. I don't know why it would use #include_next Commented Jun 1, 2014 at 1:50

4 Answers 4

31

#include_next is used to let one file augment another one with the same name. 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. I got past this problem by installing libnewlib-arm-none-eabi: sudo apt-get install libnewlib-arm-none-eabi

Sign up to request clarification or add additional context in comments.

3 Comments

use arm-none-eabi-newlib on fedora/etc
Also arm-none-eabi-newlib on Arch
arm-none-eabi-newlib on Fedora
8

Try this:

apt-get install avr-libc 

Hmm, my answer is not suited for ARM. I just wish other AVR users can get help when they meet the same question.

4 Comments

How will that help? The target is clearly ARM / STM32, not AVR.
The question is no stdint.h, and I just googled which avr-libc included. It works on my teensy project.
But stdint.h is architecture specific, and that for an 8 bit AVR is of not fit for use with a 32 bit ARM. The question is clearly tagged, and the body text clearly indicates the toolchain in use. The solution here is to correctly install the correct toolchain, and this isn't it.
@Clifford, thx for your correction. I just find stdint.h here: nongnu.org/avr-libc/user-manual/group__avr__stdint.html. You can compare with arm one.
4

Probably you forgot to specify the -ffreestanding option of GCC.

Comments

3

With the valuable help of the gcc-arm-embedded team (here), I managed to compile the ChibiOS demo program successfully.

I downloaded gcc-arm-none-eabi-4_8-2014q1 from their LaunchPad site, and it worked just fine.

1 Comment

apt-get install libc6-dev is my solution. Thank you

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.