-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add docker build instructions #252
base: main
Are you sure you want to change the base?
Changes from all commits
55c7723
cd94f25
c1742cb
1218cb4
c83baab
0b678ce
4436156
50ac2a2
c84e495
12504c1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,6 +60,32 @@ After a successful build, the `elf` files can be found in `<path-to-ot-nrf528xx> | |
$ arm-none-eabi-objcopy -O ihex build/bin/ot-cli-ftd ot-cli-ftd.hex | ||
``` | ||
|
||
### Building using Docker | ||
|
||
Alternatively, you can build using a Docker image instead of nRF Command Line Tools. | ||
|
||
This can be useful in case of CI/CD builds or to build locally without installing the dependencies. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is CI/CD in this case? Do the abbreviations need to be opened? Are there downsides? For example, is the user foregoing all the support options (USB CDC ACM support, Bootloader support, and so on)? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I meant to say when building in a pipeline in the cloud, most of the time the build agent will run some generic OS and the build agent can be instructed to run our pipeline script in a specific container image. In this case, building through the docker image can help better control the build environment over time and give better odds of a build not failing if the cloud provider updates the VM environment. I don't know of any downsides but my tests were limited to the sample build I provided as an example in the PR description. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Alright, that sounds good and doesn't necessitate any more clarification, I think. |
||
|
||
Example for the nRF52840 dongle: | ||
|
||
```bash | ||
cd <path-to-ot-nrf528xx> | ||
docker run --rm -u $(id -u):$(id -g) -v $(pwd):/workdir/project coderbyheart/fw-nrfconnect-nrf-docker:v1.8-branch ./script/build nrf52840 USB_trans -DOT_BOOTLOADER=USB -DOT_THREAD_VERSION=1.2 | ||
``` | ||
|
||
After a successful build, the `elf` files can be converted through the same container image. | ||
|
||
For example: | ||
|
||
```bash | ||
cd <path-to-ot-nrf528xx> | ||
docker run --rm -u $(id -u):$(id -g) -v $(pwd):/workdir/project coderbyheart/fw-nrfconnect-nrf-docker:v1.8-branch arm-none-eabi-objcopy -O ihex build/bin/ot-rcp build/bin/ot-rcp.hex | ||
``` | ||
|
||
See [Build NCS application firmware images using Docker][build-ncs-using-docker] for general instructions on using Docker to build an nRF Connect SDK based application. | ||
|
||
[build-ncs-using-docker]: https://devzone.nordicsemi.com/guides/nrf-connect-sdk-guides/b/getting-started/posts/build-ncs-application-firmware-images-using-docker | ||
|
||
### USB CDC ACM support | ||
|
||
You can build the libraries with support for the native USB CDC ACM as a serial transport. To do so, build the firmware with the following parameter: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LuDuda @MarekPorwisz , are you OK with recommending use of this Docker image?