Hello all =)
im working with the following setup:
- Verdin AM62 1GB WB IT (V1.1A)
- Verdin Development Board (V1.1F)
- Torizon 6
- Host-System Win 10
I’m just starting with the whole docker and torizon stuff. I’m currently at the point where I have build and flashed a Torizon-Image onto the SOM and can build and deploy a C++ Hello-World application inside a Docker container. I’m also able to toggle the GPIOs via CLI on the target.
The next goal it is to toggle a GPIO via C++ application.
To controll the GPIO I’m using the following tutorials/threads:
I know the Docker container has to get access to the GPIO device, like it’s described in this Docker run command. So I’ve tried to add --device /dev/gpiochip0:/dev/gpiochip0 or --device /dev/gpiochip0 to the auto generated file task.json where the Docker run command is defined, so on execution the access will be granted to the container. Here’s a snipped:
{
"label": "build-debug-arm64",
"detail": "Build a debug version of the application for arm64 using\nthe toolchain from the SDK container.",
"command": "DOCKER_HOST=",
"type": "shell",
"args": [
"docker",
"run",
"--rm",
"-it",
"--device",
"/dev/gpiochip0:/dev/gpiochip0",
"-v",
"${workspaceFolder}:${config:torizon_app_root}",
"cross-toolchain-arm64-sc-docker-gpio",
"make",
"ARCH=arm64",
"CC=aarch64-linux-gnu-g++",
"debug"
],
"problemMatcher": [
"$gcc"
],
"icon": {
"id": "flame",
"color": "terminal.ansiYellow"
},
"dependsOrder": "sequence",
"dependsOn": [
"build-makedir-arm64"
]
}
The problem is: i get this error message if the Debug process is trying to execute the task:
Executing task: DOCKER_HOST= docker run --rm -it --device /dev/gpiochip0:/dev/gpiochip0 -v /home/buwe/Projekte/Verdin-AM62/Docker/scDockerGPIO:/home/torizon/app cross-toolchain-arm64-sc-docker-gpio make ARCH=arm64 CC=aarch64-linux-gnu-g++ debug
docker: Error response from daemon: error gathering device information while adding custom device "/dev/gpiochip0": no such file or directory.
The terminal process "/usr/bin/bash '-c', 'DOCKER_HOST= docker run --rm -it --device /dev/gpiochip0:/dev/gpiochip0 -v /home/buwe/Projekte/Verdin-AM62/Docker/scDockerGPIO:/home/torizon/app cross-toolchain-arm64-sc-docker-gpio make ARCH=arm64 CC=aarch64-linux-gnu-g++ debug'" terminated with exit code: 127.
Can anyone explain what I’m doing wrong? Is the message "/dev/gpiochip0": no such file or directory refering to the host system instead of the target system?
Hopefully I haven’t forgotten any information needed to resolve this issue…
Thank in advance
Uwe