From 91caca175fd0ea5e1f967bbe25efe9c95b877ff5 Mon Sep 17 00:00:00 2001 From: Brendan Haines Date: Tue, 30 Apr 2024 00:32:46 -0600 Subject: [PATCH] working bootloader --- boards/bh/mellifera_rev1/mellifera_rev1.dts | 31 ++++++++++++++++--- .../mellifera_rev1/mellifera_rev1_defconfig | 20 +++++++----- 2 files changed, 39 insertions(+), 12 deletions(-) diff --git a/boards/bh/mellifera_rev1/mellifera_rev1.dts b/boards/bh/mellifera_rev1/mellifera_rev1.dts index 1561f7b..5ba820e 100644 --- a/boards/bh/mellifera_rev1/mellifera_rev1.dts +++ b/boards/bh/mellifera_rev1/mellifera_rev1.dts @@ -13,13 +13,14 @@ chosen { zephyr,console = &uart0; - // zephyr,shell-uart = &uart0; - // zephyr,uart-mcumgr = &uart0; - // zephyr,bt-mon-uart = &uart0; - // zephyr,bt-c2h-uart = &uart0; + zephyr,shell-uart = &uart0; + zephyr,uart-mcumgr = &uart0; + zephyr,bt-mon-uart = &uart0; + zephyr,bt-c2h-uart = &uart0; zephyr,sram = &sram0; zephyr,flash = &flash0; zephyr,display = &ssd1306; + zephyr,code-partition = &slot0_partition; }; example_sensor: example-sensor { @@ -65,6 +66,11 @@ buttons { compatible = "gpio-keys"; + button0: button_0 { + gpios = <&gpio0 2 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; + label = "Pushbutton"; + zephyr,code = ; + }; int_drdy: int_drdy { gpios = <&gpio0 22 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; label = "DRDYM from BMX055 9-DOF"; @@ -103,6 +109,23 @@ led-gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>; blink-period-ms = <1000>; }; + + /* These aliases are provided for compatibility with samples */ + aliases { + led0 = &led0; + led1 = &led1; + led2 = &led2; + led3 = &led3; + // pwm-led0 = &pwm_led0; + sw0 = &button0; + // sw1 = &button1; + // sw2 = &button2; + // sw3 = &button3; + bootloader-led0 = &led0; + mcuboot-button0 = &button0; + mcuboot-led0 = &led0; + watchdog0 = &wdt0; + }; }; &uicr { diff --git a/boards/bh/mellifera_rev1/mellifera_rev1_defconfig b/boards/bh/mellifera_rev1/mellifera_rev1_defconfig index 2c54281..8728c1c 100644 --- a/boards/bh/mellifera_rev1/mellifera_rev1_defconfig +++ b/boards/bh/mellifera_rev1/mellifera_rev1_defconfig @@ -1,15 +1,19 @@ -# Copyright (c) 2021 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 +# Enable MPU CONFIG_ARM_MPU=y + +# Enable hardware stack protection CONFIG_HW_STACK_PROTECTION=y -# Enable UART console on all configurations for convenience. This is usually -# done at board level upstream so that all samples output printed messages to -# the configured #zephyr,console. In production boards, this may be enabled at -# application level or in a debug configuration overlay. +# Enable RTT +CONFIG_USE_SEGGER_RTT=y + +# enable GPIO +CONFIG_GPIO=y + +# enable uart driver CONFIG_SERIAL=y + +# enable console CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y - -CONFIG_PINCTRL=y