Hi,
I’m experiencing the issue reported by other users concerning the error undefined reference to `gpiod_ctxless_set_value’ when trying to control GPIOs.
This is my setup:
Verdin iMX8M Plus
Verdin Development Board mit HDMI Adapter
Visual Studio Code 1.79.2
Apollox 2.0.0
I followed the steps described by @lucas_a.tx in the post
https://community.toradex.com/t/cant-seem-to-find-gpiod-h-for-verdin-imx8m-plus-build/19325/15
main.cpp (248 Bytes)
Makefile (1.4 KB)
docker-compose.yml (414 Bytes)
torizonPackages.json (90 Bytes)
Nevertheless I still receive the error `gpiod_ctxless_set_value’.
If you intend to use ApolloX, as you’re using so far:
- Make sure you followed the steps here to setup ApolloX, until the
Creating a new Single Container Project
step: GitHub - toradex/torizon-experimental-torizon-ide-v2-docs: VS Code Torizon Integrated Development Environment Documentation (Choose a C++ project instead of the C# the example uses) - Add the
libgpiod
packages totorizonPackages.json
, as @hfranco.tx explained before. - Add your code to the project. The text editor might complain about
gpiod.h
not being found. If you did the steps above, ignore the warning. - Change
Makefile
so it has-lgpiod
when compiling the relevant source files. - Change
docker-compose.yaml
so that the container has access to the GPIO pins. As an example, addinggpiochip0
will look like:
devices:
- "/dev/gpiochip0:/dev/gpiochip0"
I would ask your assistance to solve this issue.