-
-
Notifications
You must be signed in to change notification settings - Fork 218
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migarte ZSWatch board to Zephyr HW Model V2.
- Loading branch information
Showing
40 changed files
with
219 additions
and
260 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ jobs: | |
strategy: | ||
matrix: | ||
built_type: [debug, release] | ||
board: [zswatch_nrf5340_cpuapp@3, zswatch_nrf5340_cpuapp@4, zswatch_nrf5340_cpuapp@5, native_posix, nrf5340dk_nrf5340_cpuapp] | ||
board: [zswatch@3/nrf5340/cpuapp, zswatch@4/nrf5340/cpuapp, zswatch@5/nrf5340/cpuapp, native_posix/native, nrf5340dk/nrf5340/cpuapp] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
@@ -40,31 +40,41 @@ jobs: | |
working-directory: ZSWatch | ||
run: | | ||
west format --dry-run | ||
- name: Define build directory name | ||
working-directory: ZSWatch | ||
run: | | ||
# Since board name contains slashes, we need to replace them with underscores | ||
# as the board name is used as part of the build directory name. | ||
# It's output to GITHUB_ENV so it can be used in the next steps | ||
# and only needs to be calculated once. | ||
BUILD_DIR=${{ matrix.board }}_${{ matrix.built_type }} | ||
echo "BUILD_DIR=${BUILD_DIR}" | sed 's/\//_/g' >> $GITHUB_ENV | ||
- name: Build firmware | ||
if: ${{ matrix.board != 'native_posix' }} | ||
if: ${{ matrix.board != 'native_posix/native' }} | ||
working-directory: ZSWatch | ||
run: | | ||
west build app --build-dir ${{ matrix.board }}_${{ matrix.built_type }} -p -b ${{ matrix.board }} -- -DOVERLAY_CONFIG=boards/${{ matrix.built_type }}.conf -DEXTRA_CONF_FILE="boards/bsec.conf" -DBOARD_ROOT=${PWD}/app | ||
mv ${{ matrix.board }}_${{ matrix.built_type }}/zephyr/zephyr.hex fw_images/${{ matrix.board }}_${{ matrix.built_type }}.hex | ||
mv ${{ matrix.board }}_${{ matrix.built_type }}/zephyr/zephyr.elf fw_images/${{ matrix.board }}_${{ matrix.built_type }}.elf | ||
west build app --build-dir ${{ matrix.board }}_${{ matrix.built_type }}_rotated -p -b ${{ matrix.board }} -- -DOVERLAY_CONFIG=boards/${{ matrix.built_type }}.conf -DEXTRA_CONF_FILE="boards/bsec.conf" -DEXTRA_DTC_OVERLAY_FILE="boards/clockwise_rotation.overlay" -DBOARD_ROOT=${PWD}/app | ||
mv ${{ matrix.board }}_${{ matrix.built_type }}_rotated/zephyr/zephyr.hex fw_images/${{ matrix.board }}_${{ matrix.built_type }}_rotated.hex | ||
mv ${{ matrix.board }}_${{ matrix.built_type }}_rotated/zephyr/zephyr.elf fw_images/${{ matrix.board }}_${{ matrix.built_type }}_rotated.elf | ||
west build app --build-dir ${{ env.BUILD_DIR }} -p -b ${{ matrix.board }} -- -DEXTRA_CONF_FILE="boards/bsec.conf" -DBOARD_ROOT=${PWD}/app | ||
mv ${{ env.BUILD_DIR }}/zephyr/zephyr.hex fw_images/${{ env.BUILD_DIR }}.hex | ||
mv ${{ env.BUILD_DIR }}/zephyr/zephyr.elf fw_images/${{ env.BUILD_DIR }}.elf | ||
west build app --build-dir ${{ env.BUILD_DIR }}_rotated -p -b ${{ matrix.board }} -- -DEXTRA_CONF_FILE="boards/bsec.conf" -DEXTRA_DTC_OVERLAY_FILE="boards/clockwise_rotation.overlay" -DBOARD_ROOT=${PWD}/app | ||
mv ${{ env.BUILD_DIR }}_rotated/zephyr/zephyr.hex fw_images/${{ env.BUILD_DIR }}_rotated.hex | ||
mv ${{ env.BUILD_DIR }}_rotated/zephyr/zephyr.elf fw_images/${{ env.BUILD_DIR }}_rotated.elf | ||
# Only one copy of Net Core image needed, it's the same for all builds | ||
mv ${{ matrix.board }}_${{ matrix.built_type }}/hci_ipc/zephyr/merged_CPUNET.hex fw_images/zswatch_nrf5340_CPUNET.hex | ||
mv ${{ env.BUILD_DIR }}/hci_ipc/zephyr/merged_CPUNET.hex fw_images/zswatch_nrf5340_CPUNET.hex | ||
- name: Build native_posix | ||
if: ${{ matrix.board == 'native_posix' }} | ||
if: ${{ matrix.board == 'native_posix/native' }} | ||
working-directory: ZSWatch | ||
run: | | ||
west build app --build-dir ${{ matrix.board }}_${{ matrix.built_type }} -p -b ${{ matrix.board }} -- -DOVERLAY_CONFIG=boards/${{ matrix.built_type }}.conf | ||
west build app --build-dir ${{ env.BUILD_DIR }} -p -b ${{ matrix.board }} | ||
- name : Upload Firmware | ||
uses: actions/[email protected] | ||
with: | ||
name: ${{ matrix.board }}_${{ matrix.built_type }} | ||
name: ${{ env.BUILD_DIR }} | ||
path: | | ||
ZSWatch/fw_images | ||
if-no-files-found: ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Copyright (c) 2019 Nordic Semiconductor ASA. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
if ((CONFIG_BOARD_ZSWATCH_NRF5340_CPUAPP OR CONFIG_BOARD_ZSWATCH_NRF5340_CPUAPP_NS) | ||
AND CONFIG_BOARD_ENABLE_CPUNET) | ||
zephyr_library() | ||
zephyr_library_sources(nrf5340_cpunet_reset.c) | ||
|
||
if (CONFIG_BUILD_WITH_TFM) | ||
zephyr_library_include_directories( | ||
$<TARGET_PROPERTY:tfm,TFM_BINARY_DIR>/api_ns/interface/include | ||
) | ||
endif() | ||
|
||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Copyright (c) 2022 Zephyr Project members and individual contributors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
config BOARD_ZSWATCH | ||
select SOC_NRF5340_CPUAPP_QKAA if BOARD_ZSWATCH_NRF5340_CPUAPP | ||
select SOC_NRF5340_CPUAPP_QKAA if BOARD_ZSWATCH_NRF5340_CPUAPP_NS | ||
select SOC_NRF5340_CPUNET_QKAA if BOARD_ZSWATCH_NRF5340_CPUNET |
9 changes: 9 additions & 0 deletions
9
app/boards/arm/zswatch_nrf5340/board.cmake → app/boards/jakkra/zswatch/board.cmake
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,21 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
if(CONFIG_BOARD_ZSWATCH_NRF5340_CPUAPP_NS) | ||
set(TFM_PUBLIC_KEY_FORMAT "full") | ||
endif() | ||
|
||
if(CONFIG_BOARD_ZSWATCH_NRF5340_CPUAPP OR CONFIG_BOARD_ZSWATCH_NRF5340_CPUAPP_NS) | ||
board_runner_args(jlink "--device=nrf5340_xxaa_app" "--speed=4000") | ||
endif() | ||
|
||
if(CONFIG_TFM_FLASH_MERGED_BINARY) | ||
set_property(TARGET runners_yaml_props_target PROPERTY hex_file tfm_merged.hex) | ||
endif() | ||
|
||
if(CONFIG_BOARD_ZSWATCH_NRF5340_CPUNET) | ||
board_runner_args(jlink "--device=nrf5340_xxaa_net" "--speed=4000") | ||
endif() | ||
|
||
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake) | ||
include(${ZEPHYR_BASE}/boards/common/nrfutil.board.cmake) | ||
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
board: | ||
name: zswatch | ||
vendor: nordic | ||
socs: | ||
- name: 'nrf5340' | ||
variants: | ||
- name: 'ns' | ||
cpucluster: 'cpuapp' | ||
revision: | ||
format: number | ||
default: "5" | ||
exact: false | ||
revisions: | ||
- name: "3" | ||
- name: "4" | ||
- name: "5" |
Oops, something went wrong.