Skip to content

Commit

Permalink
Update to v2.4.0
Browse files Browse the repository at this point in the history
Signed-off-by: Zelin Cai <[email protected]>
  • Loading branch information
caizelin committed Jun 14, 2023
1 parent 5682143 commit f1f1c40
Show file tree
Hide file tree
Showing 181 changed files with 4,296 additions and 2,193 deletions.
87 changes: 8 additions & 79 deletions .github/workflows/samples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ jobs:
container: zephyrprojectrtos/ci:latest
env:
CMAKE_PREFIX_PATH: /opt/toolchains
strategy:
matrix:
board:
- connectkit_nrf52840
steps:
- name: Checkout repository
uses: actions/checkout@v3
Expand All @@ -39,90 +35,23 @@ jobs:
- name: Build samples
working-directory: ncs-playground
run: |
mkdir -p ../firmware/${{ matrix.board }}/samples
west build -p always -b ${{ matrix.board }} samples/hello_world
cp build/zephyr/zephyr.uf2 ../firmware/${{ matrix.board }}/samples/hello_world-${{ matrix.board }}.uf2
west build -p always -b ${{ matrix.board }} samples/blinky
cp build/zephyr/zephyr.uf2 ../firmware/${{ matrix.board }}/samples/blinky-${{ matrix.board }}.uf2
west build -p always -b ${{ matrix.board }} samples/button
cp build/zephyr/zephyr.uf2 ../firmware/${{ matrix.board }}/samples/button-${{ matrix.board }}.uf2
west build -p always -b ${{ matrix.board }} samples/voltage_measurement
cp build/zephyr/zephyr.uf2 ../firmware/${{ matrix.board }}/samples/voltage_measurement-${{ matrix.board }}.uf2
west build -p always -b ${{ matrix.board }} samples/qspi_flash
cp build/zephyr/zephyr.uf2 ../firmware/${{ matrix.board }}/samples/qspi_flash-${{ matrix.board }}.uf2
west build -p always -b ${{ matrix.board }} samples/usb/hid-mouse
cp build/zephyr/zephyr.uf2 ../firmware/${{ matrix.board }}/samples/usb_hid_mouse-${{ matrix.board }}.uf2
west build -p always -b ${{ matrix.board }} samples/usb/mass
cp build/zephyr/zephyr.uf2 ../firmware/${{ matrix.board }}/samples/usb_mass_ram-${{ matrix.board }}.uf2
west build -p always -b ${{ matrix.board }} samples/usb/mass -- -DCONFIG_APP_MSC_STORAGE_RAM=y
cp build/zephyr/zephyr.uf2 ../firmware/${{ matrix.board }}/samples/usb_mass_ram_fatfs-${{ matrix.board }}.uf2
west build -p always -b ${{ matrix.board }} samples/usb/mass -- -DCONFIG_APP_MSC_STORAGE_FLASH_FATFS=y
cp build/zephyr/zephyr.uf2 ../firmware/${{ matrix.board }}/samples/usb_mass_flash_fatfs-${{ matrix.board }}.uf2
west build -p always -b ${{ matrix.board }} samples/usb/mass -- -DCONFIG_APP_MSC_STORAGE_FLASH_LITTLEFS=y
cp build/zephyr/zephyr.uf2 ../firmware/${{ matrix.board }}/samples/usb_mass_flash_littlefs-${{ matrix.board }}.uf2
west build -p always -b ${{ matrix.board }} samples/nfc/record_launch_app
cp build/zephyr/zephyr.uf2 ../firmware/${{ matrix.board }}/samples/nfc_record_launch_app-${{ matrix.board }}.uf2
west build -p always -b ${{ matrix.board }} samples/nfc/record_text
cp build/zephyr/zephyr.uf2 ../firmware/${{ matrix.board }}/samples/nfc_record_text-${{ matrix.board }}.uf2
west build -p always -b ${{ matrix.board }} samples/nfc/record_uri
cp build/zephyr/zephyr.uf2 ../firmware/${{ matrix.board }}/samples/nfc_record_uri-${{ matrix.board }}.uf2
west build -p always -b ${{ matrix.board }} samples/nfc/writable_ndef_msg
cp build/zephyr/zephyr.uf2 ../firmware/${{ matrix.board }}/samples/nfc_writable_ndef_msg-${{ matrix.board }}.uf2
west build -p always -b ${{ matrix.board }} samples/ble/beacon
cp build/zephyr/zephyr.uf2 ../firmware/${{ matrix.board }}/samples/ble_beacon-${{ matrix.board }}.uf2
west build -p always -b ${{ matrix.board }} samples/ble/observer
cp build/zephyr/zephyr.uf2 ../firmware/${{ matrix.board }}/samples/ble_observer-${{ matrix.board }}.uf2
west build -p always -b ${{ matrix.board }} samples/ble/peripheral
cp build/zephyr/zephyr.uf2 ../firmware/${{ matrix.board }}/samples/ble_peripheral-${{ matrix.board }}.uf2
west build -p always -b ${{ matrix.board }} samples/ble/peripheral_lbs
cp build/zephyr/zephyr.uf2 ../firmware/${{ matrix.board }}/samples/ble_peripheral_lbs-${{ matrix.board }}.uf2
west build -p always -b ${{ matrix.board }} samples/ble/peripheral_hids_keyboard
cp build/zephyr/zephyr.uf2 ../firmware/${{ matrix.board }}/samples/ble_peripheral_hids_keyboard-${{ matrix.board }}.uf2
west build -p always -b ${{ matrix.board }} samples/ble/peripheral_hids_mouse
cp build/zephyr/zephyr.uf2 ../firmware/${{ matrix.board }}/samples/ble_peripheral_hids_mouse-${{ matrix.board }}.uf2
west build -p always -b ${{ matrix.board }} samples/ble/shell_bt_nus
cp build/zephyr/zephyr.uf2 ../firmware/${{ matrix.board }}/samples/ble_shell_bt_nus-${{ matrix.board }}.uf2
west build -p always -b ${{ matrix.board }} samples/openthread/cli
cp build/zephyr/zephyr.uf2 ../firmware/${{ matrix.board }}/samples/openthread_cli-${{ matrix.board }}.uf2
west build -p always -b ${{ matrix.board }} samples/openthread/cli -- -DOVERLAY_CONFIG=overlay-low_power.conf -DDTC_OVERLAY_FILE=low_power.overlay
cp build/zephyr/zephyr.uf2 ../firmware/${{ matrix.board }}/samples/openthread_cli_low_power-${{ matrix.board }}.uf2
west build -p always -b ${{ matrix.board }} samples/openthread/cli -- -DOVERLAY_CONFIG=overlay-multiprotocol.conf
cp build/zephyr/zephyr.uf2 ../firmware/${{ matrix.board }}/samples/openthread_cli_multiprotocol-${{ matrix.board }}.uf2
west build -p always -b ${{ matrix.board }} samples/openthread/coap_client -- -DOVERLAY_CONFIG=overlay-multiprotocol_ble.conf
cp build/zephyr/zephyr.uf2 ../firmware/${{ matrix.board }}/samples/openthread_coap_client_multiprotocol_ble-${{ matrix.board }}.uf2
west build -p always -b ${{ matrix.board }} samples/openthread/coap_server
cp build/zephyr/zephyr.uf2 ../firmware/${{ matrix.board }}/samples/openthread_coap_server-${{ matrix.board }}.uf2
west build -p always -b ${{ matrix.board }} samples/openthread/coprocessor
cp build/zephyr/zephyr.uf2 ../firmware/${{ matrix.board }}/samples/openthread_coprocessor-${{ matrix.board }}.uf2
west build -p always -b ${{ matrix.board }} samples/openthread/coprocessor -- -DOVERLAY_CONFIG=overlay-vendor_hook.conf
cp build/zephyr/zephyr.uf2 ../firmware/${{ matrix.board }}/samples/openthread_coprocessor_vendor_hook-${{ matrix.board }}.uf2
west build -p always -b ${{ matrix.board }} samples/zigbee/network_coordinator
cp build/zephyr/zephyr.uf2 ../firmware/${{ matrix.board }}/samples/zigbee_network_coordinator-${{ matrix.board }}.uf2
west build -p always -b ${{ matrix.board }} samples/zigbee/network_coordinator
cp build/zephyr/zephyr.uf2 ../firmware/${{ matrix.board }}/samples/zigbee_network_coordinator-${{ matrix.board }}.uf2
west build -p always -b ${{ matrix.board }} samples/zigbee/light_bulb
cp build/zephyr/zephyr.uf2 ../firmware/${{ matrix.board }}/samples/zigbee_light_bulb-${{ matrix.board }}.uf2
west build -p always -b ${{ matrix.board }} samples/zigbee/light_switch
cp build/zephyr/zephyr.uf2 ../firmware/${{ matrix.board }}/samples/zigbee_light_switch-${{ matrix.board }}.uf2
west build -p always -b ${{ matrix.board }} samples/zigbee/ncp
cp build/zephyr/zephyr.uf2 ../firmware/${{ matrix.board }}/samples/zigbee_ncp-${{ matrix.board }}.uf2
west build -p always -b ${{ matrix.board }} samples/zigbee/shell
cp build/zephyr/zephyr.uf2 ../firmware/${{ matrix.board }}/samples/zigbee_shell-${{ matrix.board }}.uf2
west twister --integration -v --inline-logs --board-root boards -T samples
- name: Tar firmware
working-directory: firmware
run: tar -cvf samples-${{ matrix.board }}-${{ steps.get_version.outputs.VERSION }}.tar ./${{ matrix.board }}/samples/*.uf2
working-directory: ncs-playground/twister-out
run: |
find . \( -name zephyr.uf2 -or -name zephyr.hex \) -print0 | tar -cvf ncs-playground-samples-${{ steps.get_version.outputs.VERSION }}.tar --null -T -
- name: Archive firmware
- name: Upload firmware
uses: actions/upload-artifact@v3
with:
name: samples-${{ matrix.board }}-${{ steps.get_version.outputs.VERSION }}
name: ncs-playground-samples-${{ steps.get_version.outputs.VERSION }}
path: |
firmware/${{ matrix.board }}/samples/*.uf2
ncs-playground/twister-out/ncs-playground-samples-${{ steps.get_version.outputs.VERSION }}.tar
- name: Upload Release Asset
uses: softprops/action-gh-release@v1
if: ${{ github.event_name == 'release' }}
with:
files: |
firmware/samples-${{ matrix.board }}-${{ steps.get_version.outputs.VERSION }}.tar
ncs-playground/twister-out/ncs-playground-samples-${{ steps.get_version.outputs.VERSION }}.tar
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,8 @@ build
build-*
build_*

# twister
twister-out*

# mkdocs
site
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ This repository is versioned together with the [nRF Connect SDK main tree]. This

## Supported Hardware

| Hardware platform | Build target |
|------------------------|-----------------------|
| [nRF52840 Connect Kit] | `connectkit_nrf52840` |
| Hardware platform | Build target |
|---------------------------|-----------------------|
| [nRF52840 Connect Kit] | `connectkit_nrf52840` |
| [nRF52840 MDK USB Dongle] | `dongle_nrf52840` |


## Getting Started
Expand Down Expand Up @@ -56,6 +57,7 @@ Copyright (c) 2016-2023 Makerdiary. See [LICENSE](./LICENSE) for further details

[nRF Connect SDK main tree]: https://github.com/nrfconnect/sdk-nrf
[nRF52840 Connect Kit]: https://wiki.makerdiary.com/nrf52840-connectkit
[nRF52840 MDK USB Dongle]: https://wiki.makerdiary.com/nrf52840-mdk-usb-dongle
[Blinky]: /samples/blinky
[Getting started guide]: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/getting_started.html
[discussions]: https://github.com/makerdiary/ncs-playground/discussions
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.4.0-rc2
2.4.0
2 changes: 1 addition & 1 deletion boards/arm/connectkit_nrf52840/connectkit_nrf52840.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
identifier: conneckit_nrf52840
identifier: connectkit_nrf52840
name: NRF52840-CONNECT-KIT
type: mcu
arch: arm
Expand Down
14 changes: 14 additions & 0 deletions boards/arm/dongle_nrf52840/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#
# Copyright (c) 2016-2023 Makerdiary
#
# SPDX-License-Identifier: Apache-2.0
#

if BOARD_DONGLE_NRF52840

config BOARD_ENABLE_DCDC
bool "Enable DCDC mode"
select SOC_DCDC_NRF52X
default y

endif # BOARD_DONGLE_NRF52840
9 changes: 9 additions & 0 deletions boards/arm/dongle_nrf52840/Kconfig.board
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#
# Copyright (c) 2016-2023 Makerdiary
#
# SPDX-License-Identifier: Apache-2.0
#

config BOARD_DONGLE_NRF52840
bool "NRF52840 MDK USB DONGLE"
depends on SOC_NRF52840_QIAA
15 changes: 15 additions & 0 deletions boards/arm/dongle_nrf52840/Kconfig.defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#
# Copyright (c) 2016-2023 Makerdiary
#
# SPDX-License-Identifier: Apache-2.0
#

if BOARD_DONGLE_NRF52840

config BOARD
default "dongle_nrf52840"

config BT_CTLR
default BT

endif # BOARD_DONGLE_NRF52840
6 changes: 6 additions & 0 deletions boards/arm/dongle_nrf52840/board.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Copyright (c) 2016-2023 Makerdiary
# SPDX-License-Identifier: Apache-2.0

board_runner_args(pyocd "--target=nrf52840")
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
include(${ZEPHYR_BASE}/boards/common/openocd-nrf5.board.cmake)
57 changes: 57 additions & 0 deletions boards/arm/dongle_nrf52840/dongle_nrf52840-pinctrl.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/*
* Copyright (c) 2016-2023 Makerdiary
* SPDX-License-Identifier: Apache-2.0
*/

&pinctrl {
uart0_default: uart0_default {
group1 {
psels = <NRF_PSEL(UART_TX, 0, 20)>;
};
group2 {
psels = <NRF_PSEL(UART_RX, 0, 19)>;
bias-pull-up;
};
};

uart0_sleep: uart0_sleep {
group1 {
psels = <NRF_PSEL(UART_TX, 0, 20)>,
<NRF_PSEL(UART_RX, 0, 19)>;
low-power-enable;
};
};

i2c0_default: i2c0_default {
group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 5)>,
<NRF_PSEL(TWIM_SCL, 0, 4)>;
};
};

i2c0_sleep: i2c0_sleep {
group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 5)>,
<NRF_PSEL(TWIM_SCL, 0, 4)>;
low-power-enable;
};
};

pwm0_default: pwm0_default {
group1 {
psels = <NRF_PSEL(PWM_OUT0, 0, 23)>,
<NRF_PSEL(PWM_OUT1, 0, 22)>,
<NRF_PSEL(PWM_OUT2, 0, 24)>;
nordic,invert;
};
};

pwm0_sleep: pwm0_sleep {
group1 {
psels = <NRF_PSEL(PWM_OUT0, 0, 23)>,
<NRF_PSEL(PWM_OUT1, 0, 22)>,
<NRF_PSEL(PWM_OUT2, 0, 24)>;
low-power-enable;
};
};
};
Loading

0 comments on commit f1f1c40

Please sign in to comment.