Showing results for 
Search instead for 
Did you mean: 

STM32MP1 userspace GPIO control


Hello everyone,


I was attempting to migrate my existing raspberry pi application for GPIO control to the STM32MP157 but I encountered a roadblock. I was using gpiod to drive the pins from the userspace app but the following guide:

doesn't mention gpiod C API at all in section 3. Is it possible to use gpiod instead of the character device? How do I add the gpiod library to the toolchain for cross compilation?



ST Employee


did you have a look to ?

I'm not expert on SW, but it seems you should migrate your C code to libgpiod.


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

The GPIOLib overview that you provided states that libgpiod is supported so I investigated little further and here is what I found:

My code was using libgpiod library version < 2, but newer distributions (like openstlinux-6.1) have updated to version > 2. The libgpiod2 API is completely different. I followed the examples to migrate to new version:

But thanks for directions, it helped me to zero in on my problem.