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
I followed the steps described by @lucas_a.tx in the post
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 Projectstep: 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
torizonPackages.json, as @hfranco.tx explained before.
- Add your code to the project. The text editor might complain about
gpiod.hnot being found. If you did the steps above, ignore the warning.
Makefileso it has
-lgpiodwhen compiling the relevant source files.
docker-compose.yamlso that the container has access to the GPIO pins. As an example, adding
gpiochip0will look like:
devices: - "/dev/gpiochip0:/dev/gpiochip0"
I would ask your assistance to solve this issue.