Hi devzone,
I'm working on the nRF54L05, having an application and the mcuboot generated correctly on my host computer.
Now we want to generate the binaries on Bitbucket pipelines. I tried to follow the "nRF Connect SDK toolchain Docker image" section (docs.nordicsemi.com/.../README.html), first locally on my computer and then on Bitbucket.
LOCALLY:
Using the command proposed on the guide I was getting the same error all the time, and the container was never created:
docker run -ti ghcr.io/nrfconnect/sdk-nrf-toolchain:v3.0.2 -v /dev:/dev --privileged -e ACCEPT_JLINK_LICENSE=1 bash Error: --privileged: line 1: /dev:/dev: No such file or directory
After some investigation I found the command was wrong. Maybe an experimented docker user can find the error fast but for me, without much docker experience, it was difficult to see. This is only a suggestion to fix this typo.
Right command: docker run -ti -v /dev:/dev --privileged -e ACCEPT_JLINK_LICENSE=1 ghcr.io/nrfconnect/sdk-nrf-toolchain:v3.0.2 bash
Now the docker container is running and I can see:
root@e59e2b371140:~# west --version West version: v1.2.0
But executing "echo $ZEPHYR_BASE" I don't have any output. I think that's why I cannot build my application either (previously mounted to /home).
root@d19f76caefd7:/home# west build -b nrf54l15dk/nrf54l05/cpuapp -p always usage: west [-h] [-z ZEPHYR_BASE] [-v] [-V] <command> ... west: unknown command "build"; do you need to run this inside a workspace? root@d19f76caefd7:/home# west update FATAL ERROR: no west workspace found from "/home"; "west update" requires one. Things to try: - Change directory to somewhere inside a west workspace and retry. - Set ZEPHYR_BASE to a zephyr repository path in a west workspace. - Run "west init" to set up a workspace here. - Run "west init -h" for additional information.
Question 1. How can I build my application locally using this docker image? I'm sure I'm missing something.
IN CI:
My bitbucket-pipeliens.yml is:
image: ghcr.io/nrfconnect/sdk-nrf-toolchain:v3.0.2
pipelines:
default:
- step:
name: Build
script:
- export ACCEPT_JLINK_LICENSE=1
- west update
- echo "Running west --version in the container"
- west --versionThis method is not working because the pipeline is blocked printing: input. Please use y/n
This means the "export ACCEPT_JLINK_LICENSE=1" is not working. I tried adding the ACCEPT_JLINK_LICENSE on the "Repository Settings->Pipelines->Repository variables" and "- echo 'y' | west update" but the result is the same.
Question2. How can I use this docker image on bitbucket pipeline?
Thanks in advance.