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,677件の閲覧回数
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

ラベル(3)
0 件の賞賛
返信
2 返答(返信)

2,656件の閲覧回数
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,651件の閲覧回数
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 件の賞賛
返信