Hi devzone,
I am starting to write some tests for my application, and I have a couple questions/remarks about the provided Docker image. Link to documentation.
1/ The first few tests I have written are done using the native_sim board. When I want to compile for this board using the Docker image, the container seems to be missing gcc and gcc-multilib. Manually installing them did the trick, but maybe there is a better way of doing this ?
2/ I am not able to properly install JLink, either in CI or manually. Here is my CI setup:
build-and-test-in-docker:
runs-on: ubuntu-24.04
container:
image: ghcr.io/nrfconnect/sdk-nrf-toolchain:v3.2.1
options: --privileged
env:
ACCEPT_JLINK_LICENSE: 1
defaults:
run:
# Bash shell is needed to set toolchain related environment variables in docker container
# It is a workaround for GitHub Actions limitation https://github.com/actions/runner/issues/1964
shell: bash
Note: the previous documentation link runs on ubuntu-22.04,the example application runs its CI on 24.04. I tried both, with the same results.
Here is the error I get when I manually create a container (but it is the same when using the container in CI):
> docker run --rm -ti --privileged -v ./..:/home -e ACCEPT_JLINK_LICENSE=1 --entrypoint bash ghcr.io/nrfconnect/sdk-nrf-toolchain:v3.2.1 To install JLink you have to accept following license By accessing and using Software and Materials provided by SEGGER as free download, you acknowledge and agree to the following Terms of Use. If you do not agree to these Terms, do not download or use any Software or Material. 1) You agree that you will not use the Software or Material for any purpose that is unlawful or illegal. 2) You agree to use the Software only in accordance with the license regulations included in the Software. 3) You acknowledge that the Software and Material is provided by SEGGER on "as is" basis without any express or implied warranty of any kind. 4) You confirm that you are not a person, entity or organization designated by the European Community as a terrorist, terror organization or entity pursuant to the applicable European Council Regulations. 5) You confirm that you are not located in a prohibited or embargoed country and confirm that you will not ship, distribute, transfer and/or export our Software or Material to any prohibited or embargoed country as mentioned in any such European Union law or regulation. Further information with regard to the listed persons, entities and organizations can be obtained from the official EU website. If there is any doubt if you are on this list it is strongly recommended to review such lists or get in touch with SEGGER prior download of any Software or Material. Copyright (c) SEGGER Microcontroller GmbH Do you accept these Terms of Use (y/n)? y License accepted, Jlink will be installed Selecting previously unselected package jlink. (Reading database ... 28836 files and directories currently installed.) Preparing to unpack /jlink/JLink_Linux.deb ... Removing /opt/SEGGER/JLink ... /opt/SEGGER/JLink not found (OK) Unpacking jlink (8.76.0) ... Setting up jlink (8.76.0) ... Updating udev rules via udevadm... Failed to reload udevadm rules, retrying... Failed to send reload request: No such file or directory Error: Failed to update udevadm rules. dpkg: error processing package jlink (--install): installed jlink package post-installation script subprocess returned error exit status 1 Errors were encountered while processing: jlink root@0b8852859161:/# exit
I eventually intend to do on-device testing on a custom runner. I imagine JLink is needed for flashing the tests to the board ? Is there a way to have JLink be properly installed during container initialization ?
Thanks for your help,
Nicolas Goualard