diff --git a/.github/workflows/build-user-config.yml b/.github/workflows/build-user-config.yml index 66226b5f833..11543817155 100644 --- a/.github/workflows/build-user-config.yml +++ b/.github/workflows/build-user-config.yml @@ -215,6 +215,7 @@ jobs: then cp "${{ env.build_dir }}/zephyr/zmk.${{ inputs.fallback_binary }}" "${{ env.build_dir }}/artifacts/${{ env.artifact_name }}.${{ inputs.fallback_binary }}" fi + cp "${{ env.build_dir }}/zephyr/zmk.elf" "${{ env.build_dir }}/artifacts/${{ env.artifact_name }}.elf" - name: Archive (${{ env.display_name }}) uses: actions/upload-artifact@v7 diff --git a/app/boards/nicekeyboards/nice_nano/Kconfig.nice_nano b/app/boards/nicekeyboards/nice_nano/Kconfig.nice_nano index dd120dbc47d..86be1d86dcf 100644 --- a/app/boards/nicekeyboards/nice_nano/Kconfig.nice_nano +++ b/app/boards/nicekeyboards/nice_nano/Kconfig.nice_nano @@ -3,7 +3,7 @@ config BOARD_NICE_NANO select SOC_NRF52840_QIAA - select ZMK_BOARD_COMPAT if BOARD_NICE_NANO_NRF52840_ZMK - imply RETAINED_MEM if BOARD_NICE_NANO_NRF52840_ZMK - imply RETENTION if BOARD_NICE_NANO_NRF52840_ZMK - imply RETENTION_BOOT_MODE if BOARD_NICE_NANO_NRF52840_ZMK + select ZMK_BOARD_COMPAT if BOARD_NICE_NANO_NRF52840_ZMK || BOARD_NICE_NANO_NRF52840_ZMK_DEBUG || BOARD_NICE_NANO_NRF52840_ZMK_DEBUG_EXTRA + imply RETAINED_MEM if BOARD_NICE_NANO_NRF52840_ZMK || BOARD_NICE_NANO_NRF52840_ZMK_DEBUG || BOARD_NICE_NANO_NRF52840_ZMK_DEBUG_EXTRA + imply RETENTION if BOARD_NICE_NANO_NRF52840_ZMK || BOARD_NICE_NANO_NRF52840_ZMK_DEBUG || BOARD_NICE_NANO_NRF52840_ZMK_DEBUG_EXTRA + imply RETENTION_BOOT_MODE if BOARD_NICE_NANO_NRF52840_ZMK || BOARD_NICE_NANO_NRF52840_ZMK_DEBUG || BOARD_NICE_NANO_NRF52840_ZMK_DEBUG_EXTRA diff --git a/app/boards/nicekeyboards/nice_nano/board.yml b/app/boards/nicekeyboards/nice_nano/board.yml index 13cba4f6b65..c3cffa2dcea 100644 --- a/app/boards/nicekeyboards/nice_nano/board.yml +++ b/app/boards/nicekeyboards/nice_nano/board.yml @@ -3,3 +3,7 @@ board: variants: - name: zmk qualifier: nrf52840 + - name: zmk_debug + qualifier: nrf52840 + - name: zmk_debug_extra + qualifier: nrf52840 diff --git a/app/boards/nicekeyboards/nice_nano/nice_nano_nrf52840_zmk_debug.dts b/app/boards/nicekeyboards/nice_nano/nice_nano_nrf52840_zmk_debug.dts new file mode 100644 index 00000000000..ed5b9b7bbe3 --- /dev/null +++ b/app/boards/nicekeyboards/nice_nano/nice_nano_nrf52840_zmk_debug.dts @@ -0,0 +1,11 @@ +/* + * Copyright (c) 2026 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +/dts-v1/; + +#include <../boards/nicekeyboards/nice_nano/nice_nano.dts> +#include + diff --git a/app/boards/nicekeyboards/nice_nano/nice_nano_nrf52840_zmk_debug_2_0_0.overlay b/app/boards/nicekeyboards/nice_nano/nice_nano_nrf52840_zmk_debug_2_0_0.overlay new file mode 100644 index 00000000000..0e79bc94b75 --- /dev/null +++ b/app/boards/nicekeyboards/nice_nano/nice_nano_nrf52840_zmk_debug_2_0_0.overlay @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2021 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + + +#include + +/* Carve off the tail end of the usual code partition for the core dump storage */ +&code_partition { + reg = <0x00026000 DT_SIZE_K(300)>; +}; + +&flash0 { + partitions { + coredump_partition: partition@71000 { + reg = <0x71000 DT_SIZE_K(64)>; + label = "coredump-partition"; + }; + }; +}; diff --git a/app/boards/nicekeyboards/nice_nano/nice_nano_nrf52840_zmk_debug_2_0_0_defconfig b/app/boards/nicekeyboards/nice_nano/nice_nano_nrf52840_zmk_debug_2_0_0_defconfig new file mode 100644 index 00000000000..adff90dc29a --- /dev/null +++ b/app/boards/nicekeyboards/nice_nano/nice_nano_nrf52840_zmk_debug_2_0_0_defconfig @@ -0,0 +1,34 @@ +# SPDX-License-Identifier: MIT + +# Enable MPU +CONFIG_ARM_MPU=y + +# Use pinctrl +CONFIG_PINCTRL=y + +# enable GPIO +CONFIG_GPIO=y + +CONFIG_USE_DT_CODE_PARTITION=y +CONFIG_BUILD_OUTPUT_UF2=y + +# Enable debug specific settings +CONFIG_DEBUG=y +CONFIG_DEBUG_COREDUMP=y +CONFIG_DEBUG_THREAD_INFO=y +CONFIG_DEBUG_COREDUMP_BACKEND_FLASH_PARTITION=y +# CONFIG_DEBUG_COREDUMP_MEMORY_DUMP_THREADS=y + +CONFIG_SOC_FLASH_NRF_RADIO_SYNC_NONE=y +CONFIG_SOC_FLASH_NRF_PARTIAL_ERASE=y +CONFIG_SOC_FLASH_NRF_PARTIAL_ERASE_MS=3 + +CONFIG_MPU_ALLOW_FLASH_WRITE=y +CONFIG_NVS=y +CONFIG_SETTINGS_NVS=y +CONFIG_FLASH=y +CONFIG_FLASH_PAGE_LAYOUT=y +CONFIG_FLASH_MAP=y + +CONFIG_ZMK_BLE=y +CONFIG_ZMK_USB=y diff --git a/app/boards/nicekeyboards/nice_nano/nice_nano_nrf52840_zmk_debug_extra.dts b/app/boards/nicekeyboards/nice_nano/nice_nano_nrf52840_zmk_debug_extra.dts new file mode 100644 index 00000000000..ed5b9b7bbe3 --- /dev/null +++ b/app/boards/nicekeyboards/nice_nano/nice_nano_nrf52840_zmk_debug_extra.dts @@ -0,0 +1,11 @@ +/* + * Copyright (c) 2026 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +/dts-v1/; + +#include <../boards/nicekeyboards/nice_nano/nice_nano.dts> +#include + diff --git a/app/boards/nicekeyboards/nice_nano/nice_nano_nrf52840_zmk_debug_extra_2_0_0.overlay b/app/boards/nicekeyboards/nice_nano/nice_nano_nrf52840_zmk_debug_extra_2_0_0.overlay new file mode 100644 index 00000000000..694f0fc4d6a --- /dev/null +++ b/app/boards/nicekeyboards/nice_nano/nice_nano_nrf52840_zmk_debug_extra_2_0_0.overlay @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2021 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + + +#include + +/* Carve off the tail end of the usual code partition for the core dump storage */ +&code_partition { + reg = <0x00026000 DT_SIZE_K(460)>; +}; + +&flash0 { + partitions { + coredump_partition: partition@99000 { + reg = <0x99000 DT_SIZE_K(64)>; + label = "coredump-partition"; + }; + }; +}; diff --git a/app/boards/nicekeyboards/nice_nano/nice_nano_nrf52840_zmk_debug_extra_2_0_0_defconfig b/app/boards/nicekeyboards/nice_nano/nice_nano_nrf52840_zmk_debug_extra_2_0_0_defconfig new file mode 100644 index 00000000000..adff90dc29a --- /dev/null +++ b/app/boards/nicekeyboards/nice_nano/nice_nano_nrf52840_zmk_debug_extra_2_0_0_defconfig @@ -0,0 +1,34 @@ +# SPDX-License-Identifier: MIT + +# Enable MPU +CONFIG_ARM_MPU=y + +# Use pinctrl +CONFIG_PINCTRL=y + +# enable GPIO +CONFIG_GPIO=y + +CONFIG_USE_DT_CODE_PARTITION=y +CONFIG_BUILD_OUTPUT_UF2=y + +# Enable debug specific settings +CONFIG_DEBUG=y +CONFIG_DEBUG_COREDUMP=y +CONFIG_DEBUG_THREAD_INFO=y +CONFIG_DEBUG_COREDUMP_BACKEND_FLASH_PARTITION=y +# CONFIG_DEBUG_COREDUMP_MEMORY_DUMP_THREADS=y + +CONFIG_SOC_FLASH_NRF_RADIO_SYNC_NONE=y +CONFIG_SOC_FLASH_NRF_PARTIAL_ERASE=y +CONFIG_SOC_FLASH_NRF_PARTIAL_ERASE_MS=3 + +CONFIG_MPU_ALLOW_FLASH_WRITE=y +CONFIG_NVS=y +CONFIG_SETTINGS_NVS=y +CONFIG_FLASH=y +CONFIG_FLASH_PAGE_LAYOUT=y +CONFIG_FLASH_MAP=y + +CONFIG_ZMK_BLE=y +CONFIG_ZMK_USB=y diff --git a/app/boards/seeed/xiao_ble/board.yml b/app/boards/seeed/xiao_ble/board.yml index 5643184c3b9..6c75c48fa97 100644 --- a/app/boards/seeed/xiao_ble/board.yml +++ b/app/boards/seeed/xiao_ble/board.yml @@ -3,3 +3,5 @@ board: variants: - name: zmk qualifier: nrf52840 + - name: zmk_debug + qualifier: nrf52840 diff --git a/app/boards/seeed/xiao_ble/xiao_ble_zmk_debug.dts b/app/boards/seeed/xiao_ble/xiao_ble_zmk_debug.dts new file mode 100644 index 00000000000..63f826176a7 --- /dev/null +++ b/app/boards/seeed/xiao_ble/xiao_ble_zmk_debug.dts @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2021 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include "xiao_ble_zmk.dts" +#include + +/* Carve off the tail end of the usual code partition for the core dump storage */ +&code_partition { + reg = <0x00027000 DT_SIZE_K(296)>; +}; + +&flash0 { + partitions { + coredump_partition: partition@71000 { + reg = <0x71000 DT_SIZE_K(64)>; + label = "coredump-partition"; + }; + }; +}; diff --git a/app/boards/seeed/xiao_ble/xiao_ble_zmk_debug_defconfig b/app/boards/seeed/xiao_ble/xiao_ble_zmk_debug_defconfig new file mode 100644 index 00000000000..ccbe0b773ec --- /dev/null +++ b/app/boards/seeed/xiao_ble/xiao_ble_zmk_debug_defconfig @@ -0,0 +1,41 @@ + +# Enable MPU +CONFIG_ARM_MPU=y + +# Enable hardware stack protection +CONFIG_HW_STACK_PROTECTION=y + +# Enable GPIO +CONFIG_GPIO=y + +CONFIG_ZMK_USB=y +CONFIG_ZMK_BLE=y + +# Build UF2 by default, supported by the Adafruit nRF52 Bootloader +CONFIG_BUILD_OUTPUT_UF2=y +CONFIG_USE_DT_CODE_PARTITION=y + +# Settings Support +CONFIG_MPU_ALLOW_FLASH_WRITE=y +CONFIG_NVS=y +CONFIG_SETTINGS_NVS=y +CONFIG_FLASH=y +CONFIG_FLASH_PAGE_LAYOUT=y +CONFIG_FLASH_MAP=y + +# Bootloader Support +CONFIG_RETAINED_MEM=y +CONFIG_RETENTION=y +CONFIG_RETENTION_BOOT_MODE=y +CONFIG_ZMK_BOOTMODE_MAGIC_VALUE_BOOTLOADER_TYPE_ADAFRUIT_NRF52=y + +# Enable debug specific settings +CONFIG_DEBUG=y +CONFIG_DEBUG_COREDUMP=y +CONFIG_DEBUG_THREAD_INFO=y +CONFIG_DEBUG_COREDUMP_BACKEND_FLASH_PARTITION=y +# CONFIG_DEBUG_COREDUMP_MEMORY_DUMP_THREADS=y + +CONFIG_SOC_FLASH_NRF_RADIO_SYNC_NONE=y +CONFIG_SOC_FLASH_NRF_PARTIAL_ERASE=y +CONFIG_SOC_FLASH_NRF_PARTIAL_ERASE_MS=3