Skip to content
This repository has been archived by the owner on Dec 18, 2024. It is now read-only.

Commit

Permalink
Fix build process.
Browse files Browse the repository at this point in the history
  • Loading branch information
kareltucek committed Oct 6, 2024
1 parent ea00210 commit 8c7d710
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,16 @@ Then, depending whether you want a full IDE experience or just minimal tools for
### Minimal development setup

- Install commandline stuff from [nRF Connect SDK](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/installation/install_ncs.html)
- Launch nrfutil shell:
- You can use `./build.sh` script that basically just packs the following snippets, but should be more up to date:

- e.g. `./build.sh uhk-80-left build make flash`, which will perform the three actions below

- If the `build.sh` doesn't suit you, then launch the nrfutil shell:
```
nrfutil toolchain-manager launch --shell --ncs-version v2.6.1
```
- In the shell, you can build (e.g.) uhk-80-left as follows:
- full build including cmake steps, as extracted from VS Code:
```
export DEVICE=uhk-80-left
Expand All @@ -60,13 +65,16 @@ Then, depending whether you want a full IDE experience or just minimal tools for
export PWD=`pwd`
west build --build-dir $PWD/device/build/$DEVICE $PWD/device
```
- flash:
```
export DEVICE=uhk-80-left
export PWD=`pwd`
west flash -d $PWD/device/build/$DEVICE
```
In case of problems, please refer to scripts/make-release.mjs
### Recommended tweaks
You may find this `.git/hooks/post-checkout` git hook useful:
Expand Down
4 changes: 3 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -224,10 +224,12 @@ function performAction() {
END
;;
build)
# reference version of the build process is to be found in scripts/make-release.mjs
nrfutil toolchain-manager launch --shell --ncs-version $NCS_VERSION << END
unset PYTHONPATH
unset PYTHONHOME
west build --build-dir $ROOT/device/build/$DEVICE $ROOT/device --pristine --board $DEVICE --no-sysbuild -- -DNCS_TOOLCHAIN_VERSION=NONE -DEXTRA_CONF_FILE=prj.conf.overlays/$DEVICE.prj.conf -DBOARD_ROOT=$ROOT -Dmcuboot_OVERLAY_CONFIG=$ROOT/device/child_image/mcuboot.conf;$ROOT/device/child_image/$DEVICE.mcuboot.conf
ZEPHYR_TOOLCHAIN_VARIANT=zephyr west build --build-dir "$ROOT/device/build/$DEVICE" "$ROOT/device" --pristine --board "$DEVICE" --no-sysbuild -- -DNCS_TOOLCHAIN_VERSION=NONE -DEXTRA_CONF_FILE=prj.conf.overlays/$DEVICE.prj.conf -DBOARD_ROOT="$ROOT" -Dmcuboot_OVERLAY_CONFIG="$ROOT/device/child_image/mcuboot.conf;$ROOT/device/child_image/$DEVICE.mcuboot.conf"
END
createCentralCompileCommands
;;
Expand Down

0 comments on commit 8c7d710

Please sign in to comment.