How to build .c file that include "gpiod.h" by using i.MX8M Plus SDK ?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How to build .c file that include "gpiod.h" by using i.MX8M Plus SDK ?

2,676 次查看
Jimmychea
Contributor III

Hi,

In my coding, i will include "gpiod.h" in my .c file, but when i try cross compile it, terminal will pop out the error "unable locate the "gpiod.h"". So my question is how to install the library gpiod into SDK in order able to build my .c file.

 

Thanks

0 项奖励
回复
2 回复数

2,655 次查看
Sanket_Parekh
NXP TechSupport
NXP TechSupport

Hello @Jimmychea 

I hope you are doing well.

->Please make sure the gpio.c file has the below line including the library file.
#include "gpio.h"

->One can also try to add a relative path into the .c file
for example:- #include "../file/file2/gpio.h"

->If the gpio.h is a global header file then please change the format as given below.
#include <gpio.h>

->Please make sure to add the code to the makefile.

->Please make sure to use the header files for x86 when cross-compiling instead of the aarch64 headers.

Please refer to the below link for more detail.
https://community.nxp.com/pwmxy87654/attachments/pwmxy87654/kinetis/60106/1/Getting%20Started%20with...

Thanks & Regards.

Sanket Parekh

0 项奖励
回复

2,650 次查看
Jimmychea
Contributor III

include "linux/gpio.h" this should be able to use it in doing the linux kernel driver development, for what i want is actually using the GPIO on user space (high level API). Thanks

0 项奖励
回复