Embedded Systems in Linux: fatal error: asm/types.h: No such file or directory

Currently, I am working on programming Embedded C in Linux environment. I am trying to read input data from a joystick. Before, when I created a header file joystick.h with all definitions and I initialized the joystick inside the main function (the header file is not compiled). Everything was okay and smooth.

However, when I refactored the code by putting initialization in joystick.c (which included joystick.h) and call the initialization function in main() from joystick.h. There was an error "fatal error: asm/types.h: No such file or directory". This error happened after creating joystick.c file because the joystick.c was added to Makefile to compile.

I tried several ways to fix this such as:

  • add "export ARCH=x86_64"
  • change asm -> asm-generic Those did not work.

So how can I fix this error?

Best regards, Huy Nguyen.

7

Related questions 10 " causes "error: asm/io.h: No such file or directory"">"#include <asm/io.h>" causes "error: asm/io.h: No such file or directory" 19 module compiling : asm/linkage.h file not found 7 what is asm stand for in linux/include/asm Related questions 10 " causes "error: asm/io.h: No such file or directory"">"#include <asm/io.h>" causes "error: asm/io.h: No such file or directory" 19 module compiling : asm/linkage.h file not found 7 what is asm stand for in linux/include/asm 49 asm/errno.h: No such file or directory 0 error compiling asm binary format does not support any special symbol types 24 sys/types.h: No such file or directory 0 Issue on Creating module? 1 inline asm type mismatch 0 No directory as /usr/src/linux-2.x/include/asm-i386/unistd.h 2 fatal error asm/bitsperlong.h No such file or directory Load 7 more related questions Show fewer related questions

Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like