working bootloader

This commit is contained in:
2024-04-30 00:32:46 -06:00
parent 231c781787
commit 91caca175f
2 changed files with 39 additions and 12 deletions

View File

@ -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 = <INPUT_KEY_0>;
};
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 {

View File

@ -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