Merge pull request #14 from zmkfirmware/boards/nice-nano-prep
Initial basic work on nice!nano board support.
This commit is contained in:
commit
c9b22e55fd
11 changed files with 233 additions and 8 deletions
25
.github/workflows/build.yml
vendored
25
.github/workflows/build.yml
vendored
|
@ -6,6 +6,9 @@ jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: Build Test
|
name: Build Test
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
board: [proton_c, nice_nano]
|
||||||
steps:
|
steps:
|
||||||
# To use this repository's private action,
|
# To use this repository's private action,
|
||||||
# you must check out the repository
|
# you must check out the repository
|
||||||
|
@ -27,27 +30,33 @@ jobs:
|
||||||
${{ runner.os }}-build-
|
${{ runner.os }}-build-
|
||||||
${{ runner.os }}-
|
${{ runner.os }}-
|
||||||
- name: West Init
|
- name: West Init
|
||||||
uses: 'docker://zmkfirmware/zephyr-west-action-arm:latest'
|
uses: "docker://zmkfirmware/zephyr-west-action-arm:latest"
|
||||||
id: west-init
|
id: west-init
|
||||||
with:
|
with:
|
||||||
args: 'init "-l app"'
|
args: 'init "-l app"'
|
||||||
- name: West Update
|
- name: West Update
|
||||||
uses: 'docker://zmkfirmware/zephyr-west-action-arm:latest'
|
uses: "docker://zmkfirmware/zephyr-west-action-arm:latest"
|
||||||
id: west-update
|
id: west-update
|
||||||
with:
|
with:
|
||||||
args: 'update'
|
args: "update"
|
||||||
- name: West Config Zephyr Base
|
- name: West Config Zephyr Base
|
||||||
uses: 'docker://zmkfirmware/zephyr-west-action-arm:latest'
|
uses: "docker://zmkfirmware/zephyr-west-action-arm:latest"
|
||||||
id: west-config
|
id: west-config
|
||||||
with:
|
with:
|
||||||
args: 'config "--global zephyr.base-prefer configfile"'
|
args: 'config "--global zephyr.base-prefer configfile"'
|
||||||
- name: West Zephyr Export
|
- name: West Zephyr Export
|
||||||
uses: 'docker://zmkfirmware/zephyr-west-action-arm:latest'
|
uses: "docker://zmkfirmware/zephyr-west-action-arm:latest"
|
||||||
id: west-zephyr-export
|
id: west-zephyr-export
|
||||||
with:
|
with:
|
||||||
args: 'zephyr-export'
|
args: "zephyr-export"
|
||||||
- name: West Build
|
- name: West Build
|
||||||
uses: 'docker://zmkfirmware/zephyr-west-action-arm:latest'
|
uses: "docker://zmkfirmware/zephyr-west-action-arm:latest"
|
||||||
id: west-build
|
id: west-build
|
||||||
with:
|
with:
|
||||||
args: 'build "-s app -b proton_c -- -DSHIELD=petejohanson_proton_handwire"'
|
args: 'build "-s app -b ${{ matrix.board }} -- -DSHIELD=petejohanson_proton_handwire"'
|
||||||
|
- name: Archive Build
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
if: ${{ matrix.board == 'nice_nano' }}
|
||||||
|
with:
|
||||||
|
name: "${{ matrix.board }}-zmk-uf2"
|
||||||
|
path: build/zephyr/zmk.uf2
|
||||||
|
|
8
app/boards/arm/nice_nano/CMakeLists.txt
Normal file
8
app/boards/arm/nice_nano/CMakeLists.txt
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
set_property(GLOBAL APPEND PROPERTY extra_post_build_commands
|
||||||
|
COMMAND ${PYTHON_EXECUTABLE} ${ZEPHYR_BASE}/../tools/uf2/utils/uf2conv.py
|
||||||
|
-c
|
||||||
|
-b 0x26000
|
||||||
|
-f 0xADA52840
|
||||||
|
-o ${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.uf2
|
||||||
|
${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.bin
|
||||||
|
)
|
8
app/boards/arm/nice_nano/Kconfig.board
Normal file
8
app/boards/arm/nice_nano/Kconfig.board
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
# nice!nano board configuration
|
||||||
|
|
||||||
|
# Copyright (c) 2020 Pete Johanson
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
config BOARD_NICE_NANO
|
||||||
|
bool "nice!nano"
|
||||||
|
depends on SOC_NRF52840_QIAA
|
27
app/boards/arm/nice_nano/Kconfig.defconfig
Normal file
27
app/boards/arm/nice_nano/Kconfig.defconfig
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
# Electronut Labs Papyr board configuration
|
||||||
|
|
||||||
|
# Copyright (c) 2020 Pete Johanson
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
if BOARD_NICE_NANO
|
||||||
|
|
||||||
|
config BOARD
|
||||||
|
default "nice_nano"
|
||||||
|
|
||||||
|
if USB
|
||||||
|
|
||||||
|
config USB_NRFX
|
||||||
|
default y
|
||||||
|
|
||||||
|
config USB_DEVICE_STACK
|
||||||
|
default y
|
||||||
|
|
||||||
|
endif # USB
|
||||||
|
|
||||||
|
config BT_CTLR
|
||||||
|
default BT
|
||||||
|
|
||||||
|
config ZMK_BLE
|
||||||
|
default y
|
||||||
|
|
||||||
|
endif # BOARD_NICE_NANO
|
37
app/boards/arm/nice_nano/arduino_pro_micro_pins.dtsi
Normal file
37
app/boards/arm/nice_nano/arduino_pro_micro_pins.dtsi
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2020 Pete Johanson
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
/ {
|
||||||
|
pro_micro_pins: connector {
|
||||||
|
compatible = "arduino-pro-micro";
|
||||||
|
#gpio-cells = <2>;
|
||||||
|
gpio-map-mask = <0xffffffff 0xffffffc0>;
|
||||||
|
gpio-map-pass-thru = <0 0x3f>;
|
||||||
|
gpio-map =
|
||||||
|
<1 0 &gpio0 6 0>, /* D1 */
|
||||||
|
<0 0 &gpio0 8 0>, /* D0 */
|
||||||
|
<2 0 &gpio0 17 0>, /* D2 */
|
||||||
|
<3 0 &gpio0 20 0>, /* D3 */
|
||||||
|
<4 0 &gpio0 22 0>, /* D4/A6 */
|
||||||
|
<5 0 &gpio0 24 0>, /* D5 */
|
||||||
|
<6 0 &gpio1 0 0>, /* D6/A7 */
|
||||||
|
<7 0 &gpio0 11 0>, /* D7 */
|
||||||
|
<8 0 &gpio1 4 0>, /* D8/A8 */
|
||||||
|
<9 0 &gpio1 6 0>, /* D9/A9 */
|
||||||
|
<10 0 &gpio0 9 0>, /* D10/A10 */
|
||||||
|
<16 0 &gpio0 10 0>, /* D16 */
|
||||||
|
<14 0 &gpio1 11 0>, /* D14 */
|
||||||
|
<15 0 &gpio1 13 0>, /* D15 */
|
||||||
|
<18 0 &gpio1 15 0>, /* A0 */
|
||||||
|
<19 0 &gpio0 2 0>, /* A1 */
|
||||||
|
<20 0 &gpio0 29 0>, /* A2 */
|
||||||
|
<21 0 &gpio0 31 0>; /* A3 */
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
pro_micro_i2c: &i2c1 {};
|
||||||
|
pro_micro_spi: &spi1 {};
|
||||||
|
pro_micro_serial: &uart1 {};
|
5
app/boards/arm/nice_nano/board.cmake
Normal file
5
app/boards/arm/nice_nano/board.cmake
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset")
|
||||||
|
include(${ZEPHYR_BASE}/boards/common/blackmagicprobe.board.cmake)
|
||||||
|
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
|
97
app/boards/arm/nice_nano/nice_nano.dts
Normal file
97
app/boards/arm/nice_nano/nice_nano.dts
Normal file
|
@ -0,0 +1,97 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2020 Pete Johanson
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
/dts-v1/;
|
||||||
|
#include <nordic/nrf52840_qiaa.dtsi>
|
||||||
|
#include "arduino_pro_micro_pins.dtsi"
|
||||||
|
|
||||||
|
/ {
|
||||||
|
model = "nice!nano";
|
||||||
|
compatible = "nice,nano";
|
||||||
|
|
||||||
|
chosen {
|
||||||
|
zephyr,code-partition = &code_partition;
|
||||||
|
//zephyr,bt-mon-uart = &uart0;
|
||||||
|
//zephyr,bt-c2h-uart = &uart0;
|
||||||
|
zephyr,sram = &sram0;
|
||||||
|
zephyr,flash = &flash0;
|
||||||
|
};
|
||||||
|
|
||||||
|
leds {
|
||||||
|
compatible = "gpio-leds";
|
||||||
|
blue_led: led_0 {
|
||||||
|
gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
|
||||||
|
label = "Blue LED";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
&gpio0 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&gpio1 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&uart0 {
|
||||||
|
compatible = "nordic,nrf-uart";
|
||||||
|
current-speed = <115200>;
|
||||||
|
tx-pin = <6>;
|
||||||
|
rx-pin = <8>;
|
||||||
|
};
|
||||||
|
|
||||||
|
&i2c0 {
|
||||||
|
compatible = "nordic,nrf-twi";
|
||||||
|
sda-pin = <17>;
|
||||||
|
scl-pin = <20>;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* TODO: Needs testing */
|
||||||
|
&spi0 {
|
||||||
|
compatible = "nordic,nrf-spi";
|
||||||
|
/* Cannot be used together with i2c0. */
|
||||||
|
/* status = "okay"; */
|
||||||
|
sck-pin = <45>;
|
||||||
|
mosi-pin = <10>;
|
||||||
|
miso-pin = <43>;
|
||||||
|
};
|
||||||
|
|
||||||
|
&flash0 {
|
||||||
|
/*
|
||||||
|
* For more information, see:
|
||||||
|
* http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html
|
||||||
|
*/
|
||||||
|
partitions {
|
||||||
|
compatible = "fixed-partitions";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
boot_partition: partition@0 {
|
||||||
|
label = "adafruit_boot";
|
||||||
|
reg = <0x000000000 0x0000C000>;
|
||||||
|
};
|
||||||
|
code_partition: partition@26000 {
|
||||||
|
label = "code_partition";
|
||||||
|
reg = <0x00026000 0x0002e000>;
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The flash starting at 0x000f8000 and ending at
|
||||||
|
* 0x000fffff is reserved for use by the application.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Storage partition will be used by FCB/LittleFS/NVS
|
||||||
|
* if enabled.
|
||||||
|
*/
|
||||||
|
storage_partition: partition@f8000 {
|
||||||
|
label = "storage";
|
||||||
|
reg = <0x000f8000 0x00008000>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
15
app/boards/arm/nice_nano/nice_nano.yaml
Normal file
15
app/boards/arm/nice_nano/nice_nano.yaml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
identifier: nice_nano
|
||||||
|
name: nice!nano
|
||||||
|
type: mcu
|
||||||
|
arch: arm
|
||||||
|
toolchain:
|
||||||
|
- zephyr
|
||||||
|
- gnuarmemb
|
||||||
|
- xtools
|
||||||
|
supported:
|
||||||
|
- adc
|
||||||
|
- usb_device
|
||||||
|
- ble
|
||||||
|
- ieee802154
|
||||||
|
- pwm
|
||||||
|
- watchdog
|
13
app/boards/arm/nice_nano/nice_nano_defconfig
Normal file
13
app/boards/arm/nice_nano/nice_nano_defconfig
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
CONFIG_SOC_SERIES_NRF52X=y
|
||||||
|
CONFIG_SOC_NRF52840_QIAA=y
|
||||||
|
CONFIG_BOARD_NICE_NANO=y
|
||||||
|
|
||||||
|
# Enable MPU
|
||||||
|
CONFIG_ARM_MPU=y
|
||||||
|
|
||||||
|
# enable GPIO
|
||||||
|
CONFIG_GPIO=y
|
||||||
|
|
||||||
|
CONFIG_USE_DT_CODE_PARTITION=y
|
|
@ -1,2 +1,3 @@
|
||||||
# CONFIG_LOG=y
|
# CONFIG_LOG=y
|
||||||
# CONFIG_ZMK_LOG_LEVEL_DBG=y
|
# CONFIG_ZMK_LOG_LEVEL_DBG=y
|
||||||
|
CONFIG_KERNEL_BIN_NAME="zmk"
|
||||||
|
|
|
@ -4,6 +4,8 @@ manifest:
|
||||||
url-base: https://github.com/zephyrproject-rtos
|
url-base: https://github.com/zephyrproject-rtos
|
||||||
- name: petejohanson
|
- name: petejohanson
|
||||||
url-base: https://github.com/petejohanson
|
url-base: https://github.com/petejohanson
|
||||||
|
- name: microsoft
|
||||||
|
url-base: https://github.com/microsoft
|
||||||
projects:
|
projects:
|
||||||
- name: zephyr
|
- name: zephyr
|
||||||
remote: petejohanson
|
remote: petejohanson
|
||||||
|
@ -19,5 +21,8 @@ manifest:
|
||||||
- hal_microchip
|
- hal_microchip
|
||||||
- hal_nxp
|
- hal_nxp
|
||||||
- hal_openisa
|
- hal_openisa
|
||||||
|
- name: uf2
|
||||||
|
remote: microsoft
|
||||||
|
path: tools/uf2
|
||||||
self:
|
self:
|
||||||
path: zmk
|
path: zmk
|
||||||
|
|
Loading…
Reference in a new issue