You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2026/10/09 03:48:10 UTC
(nuttx) 01/02: boards/nrf54lm20-dk: add board support
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit bbd2b508629a1c917c89e17f7721429e2fddc61d
Author: raiden00pl <ra...@railab.me>
AuthorDate: Fri Sep 18 16:20:50 2026 +0200
boards/nrf54lm20-dk: add board support
add board support nrf54lm20-dk
Assisted-by: Codex:GPT-6
Signed-off-by: raiden00pl <ra...@railab.me>
---
.../arm/nrf54l/boards/nrf54lm20-dk/index.rst | 98 +++++++++++++++++
.../boards/nrf54lm20-dk/nrf54lm20-dk-front.jpg | Bin 0 -> 108932 bytes
Documentation/platforms/arm/nrf54l/index.rst | 9 ++
boards/Kconfig | 8 ++
boards/arm/nrf54l/nrf54lm20-dk/CMakeLists.txt | 23 ++++
boards/arm/nrf54l/nrf54lm20-dk/Kconfig | 8 ++
.../arm/nrf54l/nrf54lm20-dk/configs/nsh/defconfig | 27 +++++
.../arm/nrf54l/nrf54lm20-dk/configs/sdc/defconfig | 61 +++++++++++
.../nrf54l/nrf54lm20-dk/configs/usbnsh/defconfig | 31 ++++++
boards/arm/nrf54l/nrf54lm20-dk/include/board.h | 74 +++++++++++++
boards/arm/nrf54l/nrf54lm20-dk/scripts/Make.defs | 36 +++++++
boards/arm/nrf54l/nrf54lm20-dk/scripts/rram.ld | 114 ++++++++++++++++++++
boards/arm/nrf54l/nrf54lm20-dk/src/CMakeLists.txt | 30 ++++++
boards/arm/nrf54l/nrf54lm20-dk/src/Make.defs | 31 ++++++
boards/arm/nrf54l/nrf54lm20-dk/src/Makefile | 24 +++++
.../arm/nrf54l/nrf54lm20-dk/src/nrf54l_autoleds.c | 105 +++++++++++++++++++
boards/arm/nrf54l/nrf54lm20-dk/src/nrf54l_boot.c | 68 ++++++++++++
.../arm/nrf54l/nrf54lm20-dk/src/nrf54l_bringup.c | 92 ++++++++++++++++
.../arm/nrf54l/nrf54lm20-dk/src/nrf54l_userleds.c | 116 +++++++++++++++++++++
boards/arm/nrf54l/nrf54lm20-dk/src/nrf54lm20-dk.h | 78 ++++++++++++++
20 files changed, 1033 insertions(+)
diff --git a/Documentation/platforms/arm/nrf54l/boards/nrf54lm20-dk/index.rst b/Documentation/platforms/arm/nrf54l/boards/nrf54lm20-dk/index.rst
new file mode 100644
index 00000000000..bff7e712751
--- /dev/null
+++ b/Documentation/platforms/arm/nrf54l/boards/nrf54lm20-dk/index.rst
@@ -0,0 +1,98 @@
+===================
+Nordic nRF54LM20 DK
+===================
+
+.. tags:: chip:nrf54l, chip:nrf54lm20a, chip:nrf54lm20b
+
+.. figure:: nrf54lm20-dk-front.jpg
+ :align: center
+ :alt: nRF54LM20-DK Front
+
+ nRF54LM20-DK Front
+
+The nRF54LM20-DK is a development board based on the nRF54LM20 from Nordic.
+The configurations select nRF54LM20B by default. For nRF54LM20A, select
+``nRF54LM20A`` under ``System Type -> nRF54L Chip Selection`` in
+``make menuconfig`` before building.
+The configurations use 511 KiB of SRAM, excluding the reserved upper 1 KiB.
+
+Serial Console
+==============
+
+The console uses UARTE20 through the onboard debug interface at 115200 8N1,
+without flow control. Use VCOM 1 (the second J-Link serial port, with USB
+interface ``if02`` on Linux).
+
+===== ===========
+Pin Signal
+===== ===========
+P1.16 UARTE20 TX
+P1.17 UARTE20 RX
+===== ===========
+
+LEDs
+====
+
+The board has four user-controllable LEDs:
+
+==== =====
+LED MCU
+==== =====
+LED1 P1.22
+LED2 P1.25
+LED3 P1.27
+LED4 P1.28
+==== =====
+
+A high output illuminates the LED.
+
+Configurations
+==============
+
+Select a configuration with::
+
+ tools/configure.sh nrf54lm20-dk:<subdir>
+
+nsh
+---
+
+Basic NuttShell configuration with the console on UARTE20.
+
+usbnsh
+------
+
+NuttShell over USB CDC ACM using the application's USB connector.
+Both high-speed and full-speed USB operation are enabled.
+
+sdc
+---
+
+NSH with the native Bluetooth host, SoftDevice Controller and ``bt`` utility.
+These configurations use GRTC tickless scheduling and the UARTE20 console.
+Set ``CONFIG_NRF54L_SDC_PUB_ADDR`` to the board's assigned public address.
+
+The host advertises its GAP service at startup. To scan::
+
+ bt bnep0 scan start -d
+ bt bnep0 scan get
+ bt bnep0 scan stop
+
+Stop advertising with ``bt bnep0 advertise stop`` before restarting it with
+``bt bnep0 advertise start``.
+
+Flash & Debug
+=============
+
+Use a J-Link version supporting the installed chip. For LM20B::
+
+ JLinkExe -USB PROBE_SERIAL -device nRF54LM20B_M33 -if SWD -speed 4000
+
+At the J-Link prompt::
+
+ connect
+ loadfile nuttx.hex
+ r
+ g
+ exit
+
+Use ``nRF54LM20A_M33`` for LM20A boards.
diff --git a/Documentation/platforms/arm/nrf54l/boards/nrf54lm20-dk/nrf54lm20-dk-front.jpg b/Documentation/platforms/arm/nrf54l/boards/nrf54lm20-dk/nrf54lm20-dk-front.jpg
new file mode 100644
index 00000000000..1f470c45476
Binary files /dev/null and b/Documentation/platforms/arm/nrf54l/boards/nrf54lm20-dk/nrf54lm20-dk-front.jpg differ
diff --git a/Documentation/platforms/arm/nrf54l/index.rst b/Documentation/platforms/arm/nrf54l/index.rst
index ed31e427554..9bdf6122c76 100644
--- a/Documentation/platforms/arm/nrf54l/index.rst
+++ b/Documentation/platforms/arm/nrf54l/index.rst
@@ -168,3 +168,12 @@ The idle loop uses ``WFI`` when GRTC provides tickless scheduling. With
SysTick selected, the CPU remains awake so its clock keeps running.
``CONFIG_PM`` initializes the NuttX power management framework. System OFF
is not supported.
+
+Supported Boards
+================
+
+.. toctree::
+ :glob:
+ :maxdepth: 1
+
+ boards/*/*
diff --git a/boards/Kconfig b/boards/Kconfig
index bf6fdbc6386..2e651a8056c 100644
--- a/boards/Kconfig
+++ b/boards/Kconfig
@@ -1567,6 +1567,13 @@ config ARCH_BOARD_THINGY53
---help---
This option selects the Thingy:53 multi-protocol IoT prototyping platform
+config ARCH_BOARD_NRF54LM20_DK
+ bool "Nordic nRF54LM20 Development Kit"
+ depends on ARCH_CHIP_NRF54LM20A || ARCH_CHIP_NRF54LM20B
+ select ARCH_HAVE_LEDS
+ ---help---
+ This option selects the nRF54LM20 Development Kit
+
config ARCH_BOARD_NRF9160_DK
bool "Nordic nRF9160 Development Kit (PCA10090)"
depends on ARCH_CHIP_NRF91
@@ -4134,6 +4141,7 @@ config ARCH_BOARD
default "nrf5340-dk" if ARCH_BOARD_NRF5340_DK
default "nrf5340-audio-dk" if ARCH_BOARD_NRF5340_AUDIO_DK
default "thingy53" if ARCH_BOARD_THINGY53
+ default "nrf54lm20-dk" if ARCH_BOARD_NRF54LM20_DK
default "nrf9160-dk" if ARCH_BOARD_NRF9160_DK
default "thingy91" if ARCH_BOARD_THINGY91
default "thingy91-nrf52" if ARCH_BOARD_THINGY91_NRF52
diff --git a/boards/arm/nrf54l/nrf54lm20-dk/CMakeLists.txt b/boards/arm/nrf54l/nrf54lm20-dk/CMakeLists.txt
new file mode 100644
index 00000000000..c460d716540
--- /dev/null
+++ b/boards/arm/nrf54l/nrf54lm20-dk/CMakeLists.txt
@@ -0,0 +1,23 @@
+# ##############################################################################
+# boards/arm/nrf54l/nrf54lm20-dk/CMakeLists.txt
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more contributor
+# license agreements. See the NOTICE file distributed with this work for
+# additional information regarding copyright ownership. The ASF licenses this
+# file to you under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations under
+# the License.
+#
+# ##############################################################################
+
+add_subdirectory(src)
diff --git a/boards/arm/nrf54l/nrf54lm20-dk/Kconfig b/boards/arm/nrf54l/nrf54lm20-dk/Kconfig
new file mode 100644
index 00000000000..c8e0e2c3f14
--- /dev/null
+++ b/boards/arm/nrf54l/nrf54lm20-dk/Kconfig
@@ -0,0 +1,8 @@
+#
+# For a description of the syntax of this configuration file,
+# see the file kconfig-language.txt in the NuttX tools repository.
+#
+
+if ARCH_BOARD_NRF54LM20_DK
+
+endif # ARCH_BOARD_NRF54LM20_DK
diff --git a/boards/arm/nrf54l/nrf54lm20-dk/configs/nsh/defconfig b/boards/arm/nrf54l/nrf54lm20-dk/configs/nsh/defconfig
new file mode 100644
index 00000000000..b59e349b5e8
--- /dev/null
+++ b/boards/arm/nrf54l/nrf54lm20-dk/configs/nsh/defconfig
@@ -0,0 +1,27 @@
+#
+# This file is autogenerated: PLEASE DO NOT EDIT IT.
+#
+# You can use "make menuconfig" to make any modifications to the installed .config file.
+# You can then do "make savedefconfig" to generate a new defconfig file that includes your
+# modifications.
+#
+CONFIG_ARCH="arm"
+CONFIG_ARCH_BOARD="nrf54lm20-dk"
+CONFIG_ARCH_BOARD_NRF54LM20_DK=y
+CONFIG_ARCH_CHIP="nrf54l"
+CONFIG_ARCH_CHIP_NRF54L=y
+CONFIG_ARCH_CHIP_NRF54LM20B=y
+CONFIG_ARCH_STACKDUMP=y
+CONFIG_BOARD_LOOPSPERMSEC=10000
+CONFIG_DEBUG_FEATURES=y
+CONFIG_DEBUG_SYMBOLS=y
+CONFIG_INIT_ENTRYPOINT="nsh_main"
+CONFIG_INTELHEX_BINARY=y
+CONFIG_NRF54L_UART0=y
+CONFIG_NSH_READLINE=y
+CONFIG_RAM_SIZE=523264
+CONFIG_RAM_START=0x20000000
+CONFIG_RAW_BINARY=y
+CONFIG_START_YEAR=2026
+CONFIG_SYSTEM_NSH=y
+CONFIG_UART0_SERIAL_CONSOLE=y
diff --git a/boards/arm/nrf54l/nrf54lm20-dk/configs/sdc/defconfig b/boards/arm/nrf54l/nrf54lm20-dk/configs/sdc/defconfig
new file mode 100644
index 00000000000..6dbb7a5dd60
--- /dev/null
+++ b/boards/arm/nrf54l/nrf54lm20-dk/configs/sdc/defconfig
@@ -0,0 +1,61 @@
+#
+# This file is autogenerated: PLEASE DO NOT EDIT IT.
+#
+# You can use "make menuconfig" to make any modifications to the installed .config file.
+# You can then do "make savedefconfig" to generate a new defconfig file that includes your
+# modifications.
+#
+CONFIG_ALLOW_BSDNORDIC_COMPONENTS=y
+CONFIG_ALLOW_BSD_COMPONENTS=y
+CONFIG_ARCH="arm"
+CONFIG_ARCH_BOARD="nrf54lm20-dk"
+CONFIG_ARCH_BOARD_NRF54LM20_DK=y
+CONFIG_ARCH_CHIP="nrf54l"
+CONFIG_ARCH_CHIP_NRF54L=y
+CONFIG_ARCH_CHIP_NRF54LM20B=y
+CONFIG_ARCH_INTERRUPTSTACK=4096
+CONFIG_ARCH_STACKDUMP=y
+CONFIG_BLUETOOTH_MAX_CONN=2
+CONFIG_BLUETOOTH_TXCMD_PRIORITY=180
+CONFIG_BLUETOOTH_TXCONN_PRIORITY=180
+CONFIG_BOARD_LOOPSPERMSEC=10000
+CONFIG_BTSAK=y
+CONFIG_BTSAK_STACKSIZE=4096
+CONFIG_BUILTIN=y
+CONFIG_DEBUG_FEATURES=y
+CONFIG_DEBUG_HARDFAULT_ALERT=y
+CONFIG_DEBUG_SYMBOLS=y
+CONFIG_DEBUG_WIRELESS=y
+CONFIG_DEBUG_WIRELESS_ERROR=y
+CONFIG_DEBUG_WIRELESS_WARN=y
+CONFIG_FS_PROCFS=y
+CONFIG_INIT_ENTRYPOINT="nsh_main"
+CONFIG_INIT_STACKSIZE=4096
+CONFIG_INTELHEX_BINARY=y
+CONFIG_NET=y
+CONFIG_NETDEV_LATEINIT=y
+CONFIG_NET_BLUETOOTH=y
+CONFIG_NRF54L_LFCLK_SYNTH=y
+CONFIG_NRF54L_SDC_PUB_ADDR=0x010203040506
+CONFIG_NRF54L_SOFTDEVICE_CONTROLLER=y
+CONFIG_NRF54L_SYSTIMER_GRTC=y
+CONFIG_NRF54L_UART0=y
+CONFIG_NSH_BUILTIN_APPS=y
+CONFIG_NSH_DISABLE_IFCONFIG=y
+CONFIG_NSH_DISABLE_IFUPDOWN=y
+CONFIG_NSH_DISABLE_VCONFIG=y
+CONFIG_NSH_READLINE=y
+CONFIG_PREALLOC_MQ_MSGS=32
+CONFIG_RAM_SIZE=523264
+CONFIG_RAM_START=0x20000000
+CONFIG_RAW_BINARY=y
+CONFIG_SCHED_LPWORKPRIORITY=180
+CONFIG_SCHED_LPWORKSTACKSIZE=4096
+CONFIG_SCHED_WAITPID=y
+CONFIG_STACK_COLORATION=y
+CONFIG_START_YEAR=2026
+CONFIG_SYSTEM_NSH=y
+CONFIG_UART0_SERIAL_CONSOLE=y
+CONFIG_USEC_PER_TICK=10000
+CONFIG_WIRELESS=y
+CONFIG_WIRELESS_BLUETOOTH=y
diff --git a/boards/arm/nrf54l/nrf54lm20-dk/configs/usbnsh/defconfig b/boards/arm/nrf54l/nrf54lm20-dk/configs/usbnsh/defconfig
new file mode 100644
index 00000000000..b05fcd823a1
--- /dev/null
+++ b/boards/arm/nrf54l/nrf54lm20-dk/configs/usbnsh/defconfig
@@ -0,0 +1,31 @@
+#
+# This file is autogenerated: PLEASE DO NOT EDIT IT.
+#
+# You can use "make menuconfig" to make any modifications to the installed .config file.
+# You can then do "make savedefconfig" to generate a new defconfig file that includes your
+# modifications.
+#
+CONFIG_ARCH="arm"
+CONFIG_ARCH_BOARD="nrf54lm20-dk"
+CONFIG_ARCH_BOARD_NRF54LM20_DK=y
+CONFIG_ARCH_CHIP="nrf54l"
+CONFIG_ARCH_CHIP_NRF54L=y
+CONFIG_ARCH_CHIP_NRF54LM20B=y
+CONFIG_ARCH_STACKDUMP=y
+CONFIG_BOARD_LOOPSPERMSEC=10000
+CONFIG_CDCACM=y
+CONFIG_CDCACM_CONSOLE=y
+CONFIG_DEBUG_FEATURES=y
+CONFIG_DEBUG_SYMBOLS=y
+CONFIG_INIT_ENTRYPOINT="nsh_main"
+CONFIG_INTELHEX_BINARY=y
+CONFIG_NRF54L_UART0=y
+CONFIG_NRF54L_USBDEV=y
+CONFIG_NSH_READLINE=y
+CONFIG_NSH_USBCONSOLE=y
+CONFIG_RAM_SIZE=523264
+CONFIG_RAM_START=0x20000000
+CONFIG_RAW_BINARY=y
+CONFIG_START_YEAR=2026
+CONFIG_SYSTEM_NSH=y
+CONFIG_USBDEV_DUALSPEED=y
diff --git a/boards/arm/nrf54l/nrf54lm20-dk/include/board.h b/boards/arm/nrf54l/nrf54lm20-dk/include/board.h
new file mode 100644
index 00000000000..46e1a5f96ed
--- /dev/null
+++ b/boards/arm/nrf54l/nrf54lm20-dk/include/board.h
@@ -0,0 +1,74 @@
+/****************************************************************************
+ * boards/arm/nrf54l/nrf54lm20-dk/include/board.h
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership. The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ ****************************************************************************/
+
+#ifndef __BOARDS_ARM_NRF54L_NRF54LM20_DK_INCLUDE_BOARD_H
+#define __BOARDS_ARM_NRF54L_NRF54LM20_DK_INCLUDE_BOARD_H
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+/* Clocking *****************************************************************/
+
+#define BOARD_SYSTICK_CLOCK 128000000
+#define BOARD_HFXO_CAPACITANCE 15000
+
+/* LED definitions **********************************************************/
+
+#define BOARD_LED1 0
+#define BOARD_LED2 1
+#define BOARD_LED3 2
+#define BOARD_LED4 3
+#define BOARD_NLEDS 4
+
+/* LED bits for use with board_userled_all() */
+
+#define BOARD_LED1_BIT (1 << BOARD_LED1)
+#define BOARD_LED2_BIT (1 << BOARD_LED2)
+#define BOARD_LED3_BIT (1 << BOARD_LED3)
+#define BOARD_LED4_BIT (1 << BOARD_LED4)
+
+/* LED indications when CONFIG_ARCH_LEDS is selected */
+
+#define LED_STARTED 0 /* OFF */
+#define LED_HEAPALLOCATE 0 /* OFF */
+#define LED_IRQSENABLED 0 /* OFF */
+#define LED_STACKCREATED 1 /* ON */
+#define LED_INIRQ 2 /* No change */
+#define LED_SIGNAL 2 /* No change */
+#define LED_ASSERTION 2 /* No change */
+#define LED_PANIC 3 /* Flashing */
+
+/* UART Pins ****************************************************************/
+
+/* UART0 is connected to VCOM 1 on P1.16 (TX) and P1.17 (RX). */
+
+#define BOARD_UART0_TX_PIN (GPIO_OUTPUT | GPIO_VALUE_ONE | GPIO_PORT1 | GPIO_PIN(16))
+#define BOARD_UART0_RX_PIN (GPIO_INPUT | GPIO_PULLUP | GPIO_PORT1 | GPIO_PIN(17))
+
+#endif /* __BOARDS_ARM_NRF54L_NRF54LM20_DK_INCLUDE_BOARD_H */
diff --git a/boards/arm/nrf54l/nrf54lm20-dk/scripts/Make.defs b/boards/arm/nrf54l/nrf54lm20-dk/scripts/Make.defs
new file mode 100644
index 00000000000..73801349a1a
--- /dev/null
+++ b/boards/arm/nrf54l/nrf54lm20-dk/scripts/Make.defs
@@ -0,0 +1,36 @@
+############################################################################
+# boards/arm/nrf54l/nrf54lm20-dk/scripts/Make.defs
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership. The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+include $(TOPDIR)/.config
+include $(TOPDIR)/tools/Config.mk
+include $(TOPDIR)/arch/arm/src/armv8-m/Toolchain.defs
+
+ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)rram.ld
+
+CFLAGS := $(ARCHCFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
+CXXFLAGS := $(ARCHCXXFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
+CPPFLAGS := $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
+AFLAGS := $(CFLAGS) -D__ASSEMBLY__
+
+NXFLATLDFLAGS1 = -r -d -warn-common
+NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-pcrel.ld -no-check-sections
+LDNXFLATFLAGS = -e main -s 2048
diff --git a/boards/arm/nrf54l/nrf54lm20-dk/scripts/rram.ld b/boards/arm/nrf54l/nrf54lm20-dk/scripts/rram.ld
new file mode 100644
index 00000000000..437067c5f9e
--- /dev/null
+++ b/boards/arm/nrf54l/nrf54lm20-dk/scripts/rram.ld
@@ -0,0 +1,114 @@
+/****************************************************************************
+ * boards/arm/nrf54l/nrf54lm20-dk/scripts/rram.ld
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership. The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+
+MEMORY
+{
+ progmem (rx) : ORIGIN = 0x00000000, LENGTH = 0x1fd000
+
+ /* Exclude the reserved upper 1 KiB from application RAM. */
+
+ datamem (rwx) : ORIGIN = 0x20000000, LENGTH = 511K
+}
+
+OUTPUT_ARCH(arm)
+ENTRY(__start) /* Treat __start as the anchor for dead code stripping */
+EXTERN(_vectors) /* Force the vectors to be included in the output */
+SECTIONS
+{
+ .text :
+ {
+ _stext = ABSOLUTE(.);
+ *(.vectors)
+ *(.text .text.*)
+ *(.fixup)
+ *(.gnu.warning)
+ *(.rodata .rodata.*)
+ *(.gnu.linkonce.t.*)
+ *(.glue_7)
+ *(.glue_7t)
+ *(.got)
+ *(.gcc_except_table)
+ *(.gnu.linkonce.r.*)
+ _etext = ABSOLUTE(.);
+ } > progmem
+
+ .init_section :
+ {
+ _sinit = ABSOLUTE(.);
+ KEEP(*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)))
+ KEEP(*(.init_array EXCLUDE_FILE(*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o) .ctors))
+ _einit = ABSOLUTE(.);
+ } > progmem
+
+ .ARM.extab :
+ {
+ *(.ARM.extab*)
+ } > progmem
+
+ __exidx_start = ABSOLUTE(.);
+ .ARM.exidx :
+ {
+ *(.ARM.exidx*)
+ } > progmem
+ __exidx_end = ABSOLUTE(.);
+
+ _eronly = ABSOLUTE(.);
+
+ .data :
+ {
+ _sdata = ABSOLUTE(.);
+ *(.data .data.*)
+ *(.gnu.linkonce.d.*)
+ CONSTRUCTORS
+ . = ALIGN(4);
+ _edata = ABSOLUTE(.);
+ } > datamem AT > progmem
+
+ /* BSS */
+
+ .bss :
+ {
+ _sbss = ABSOLUTE(.);
+ *(.bss .bss.*)
+ *(.gnu.linkonce.b.*)
+ *(COMMON)
+ . = ALIGN(4);
+ _ebss = ABSOLUTE(.);
+ } > datamem
+
+ /* Stabs debugging sections. */
+
+ .stab 0 : { *(.stab) }
+ .stabstr 0 : { *(.stabstr) }
+ .stab.excl 0 : { *(.stab.excl) }
+ .stab.exclstr 0 : { *(.stab.exclstr) }
+ .stab.index 0 : { *(.stab.index) }
+ .stab.indexstr 0 : { *(.stab.indexstr) }
+ .comment 0 : { *(.comment) }
+ .debug_abbrev 0 : { *(.debug_abbrev) }
+ .debug_info 0 : { *(.debug_info) }
+ .debug_line 0 : { *(.debug_line) }
+ .debug_pubnames 0 : { *(.debug_pubnames) }
+ .debug_aranges 0 : { *(.debug_aranges) }
+}
diff --git a/boards/arm/nrf54l/nrf54lm20-dk/src/CMakeLists.txt b/boards/arm/nrf54l/nrf54lm20-dk/src/CMakeLists.txt
new file mode 100644
index 00000000000..cabcd6c64e1
--- /dev/null
+++ b/boards/arm/nrf54l/nrf54lm20-dk/src/CMakeLists.txt
@@ -0,0 +1,30 @@
+# ##############################################################################
+# boards/arm/nrf54l/nrf54lm20-dk/src/CMakeLists.txt
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more contributor
+# license agreements. See the NOTICE file distributed with this work for
+# additional information regarding copyright ownership. The ASF licenses this
+# file to you under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations under
+# the License.
+#
+# ##############################################################################
+
+set(SRCS nrf54l_boot.c nrf54l_bringup.c)
+if(CONFIG_ARCH_LEDS)
+ list(APPEND SRCS nrf54l_autoleds.c)
+else()
+ list(APPEND SRCS nrf54l_userleds.c)
+endif()
+target_sources(board PRIVATE ${SRCS})
+set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/rram.ld")
diff --git a/boards/arm/nrf54l/nrf54lm20-dk/src/Make.defs b/boards/arm/nrf54l/nrf54lm20-dk/src/Make.defs
new file mode 100644
index 00000000000..04071b77c67
--- /dev/null
+++ b/boards/arm/nrf54l/nrf54lm20-dk/src/Make.defs
@@ -0,0 +1,31 @@
+############################################################################
+# boards/arm/nrf54l/nrf54lm20-dk/src/Make.defs
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership. The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+include $(TOPDIR)/Make.defs
+
+CSRCS = nrf54l_boot.c nrf54l_bringup.c
+
+ifeq ($(CONFIG_ARCH_LEDS),y)
+CSRCS += nrf54l_autoleds.c
+else
+CSRCS += nrf54l_userleds.c
+endif
diff --git a/boards/arm/nrf54l/nrf54lm20-dk/src/Makefile b/boards/arm/nrf54l/nrf54lm20-dk/src/Makefile
new file mode 100644
index 00000000000..110db2cabd0
--- /dev/null
+++ b/boards/arm/nrf54l/nrf54lm20-dk/src/Makefile
@@ -0,0 +1,24 @@
+############################################################################
+# boards/arm/nrf54l/nrf54lm20-dk/src/Makefile
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership. The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+include Make.defs
+include $(TOPDIR)/boards/Board.mk
diff --git a/boards/arm/nrf54l/nrf54lm20-dk/src/nrf54l_autoleds.c b/boards/arm/nrf54l/nrf54lm20-dk/src/nrf54l_autoleds.c
new file mode 100644
index 00000000000..d447525d956
--- /dev/null
+++ b/boards/arm/nrf54l/nrf54lm20-dk/src/nrf54l_autoleds.c
@@ -0,0 +1,105 @@
+/****************************************************************************
+ * boards/arm/nrf54l/nrf54lm20-dk/src/nrf54l_autoleds.c
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership. The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+
+#include <stdint.h>
+#include <stdbool.h>
+
+#include <nuttx/board.h>
+#include <arch/board/board.h>
+
+#include "nrf54lm20-dk.h"
+
+#ifdef CONFIG_ARCH_LEDS
+
+/****************************************************************************
+ * Private Data
+ ****************************************************************************/
+
+static const nrf54l_pinset_t g_ledcfg[BOARD_NLEDS] =
+{
+ GPIO_LED1,
+ GPIO_LED2,
+ GPIO_LED3,
+ GPIO_LED4,
+};
+
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: board_autoled_initialize
+ *
+ * Description:
+ * Configure the GPIO pins used for operating system LED indications.
+ *
+ ****************************************************************************/
+
+void board_autoled_initialize(void)
+{
+ unsigned int i;
+
+ for (i = 0; i < BOARD_NLEDS; i++)
+ {
+ nrf54l_gpio_config(g_ledcfg[i]);
+ }
+}
+
+/****************************************************************************
+ * Name: board_autoled_on
+ *
+ * Description:
+ * Set the LED indication for the requested operating system event.
+ *
+ ****************************************************************************/
+
+void board_autoled_on(int led)
+{
+ if (led == LED_STACKCREATED || led == LED_PANIC)
+ {
+ nrf54l_gpio_write(g_ledcfg[BOARD_LED1], true);
+ }
+}
+
+/****************************************************************************
+ * Name: board_autoled_off
+ *
+ * Description:
+ * Clear the LED indication for the requested operating system event.
+ *
+ ****************************************************************************/
+
+void board_autoled_off(int led)
+{
+ if (led == LED_PANIC)
+ {
+ nrf54l_gpio_write(g_ledcfg[BOARD_LED1], false);
+ }
+}
+
+#endif /* CONFIG_ARCH_LEDS */
diff --git a/boards/arm/nrf54l/nrf54lm20-dk/src/nrf54l_boot.c b/boards/arm/nrf54l/nrf54lm20-dk/src/nrf54l_boot.c
new file mode 100644
index 00000000000..e6c65b177b0
--- /dev/null
+++ b/boards/arm/nrf54l/nrf54lm20-dk/src/nrf54l_boot.c
@@ -0,0 +1,68 @@
+/****************************************************************************
+ * boards/arm/nrf54l/nrf54lm20-dk/src/nrf54l_boot.c
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership. The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+
+#include <stdint.h>
+
+#include <nuttx/board.h>
+
+#include "nrf54l_start.h"
+#include "nrf54lm20-dk.h"
+
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: nrf54l_board_initialize
+ *
+ * Description:
+ * Initialize board hardware before starting the operating system.
+ *
+ ****************************************************************************/
+
+void nrf54l_board_initialize(void)
+{
+#ifdef CONFIG_ARCH_LEDS
+ board_autoled_initialize();
+#endif
+}
+
+#ifdef CONFIG_BOARD_LATE_INITIALIZE
+/****************************************************************************
+ * Name: board_late_initialize
+ *
+ * Description:
+ * Initialize board devices after the operating system is available.
+ *
+ ****************************************************************************/
+
+void board_late_initialize(void)
+{
+ nrf54l_bringup();
+}
+#endif
diff --git a/boards/arm/nrf54l/nrf54lm20-dk/src/nrf54l_bringup.c b/boards/arm/nrf54l/nrf54lm20-dk/src/nrf54l_bringup.c
new file mode 100644
index 00000000000..88ec0528fea
--- /dev/null
+++ b/boards/arm/nrf54l/nrf54lm20-dk/src/nrf54l_bringup.c
@@ -0,0 +1,92 @@
+/****************************************************************************
+ * boards/arm/nrf54l/nrf54lm20-dk/src/nrf54l_bringup.c
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership. The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+
+#include <syslog.h>
+
+#include <nuttx/fs/fs.h>
+
+#ifdef CONFIG_USERLED_LOWER
+# include <nuttx/leds/userled.h>
+#endif
+
+#include "nrf54lm20-dk.h"
+
+#ifdef CONFIG_NRF54L_SOFTDEVICE_CONTROLLER
+# include "nrf54l_sdc.h"
+#endif
+
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: nrf54l_bringup
+ *
+ * Description:
+ * Mount optional file systems and register enabled board devices.
+ *
+ ****************************************************************************/
+
+int nrf54l_bringup(void)
+{
+ int ret;
+
+#ifdef CONFIG_FS_PROCFS
+ /* Mount the procfs file system */
+
+ ret = nx_mount(NULL, NRF54L_PROCFS_MOUNTPOINT, "procfs", 0, NULL);
+ if (ret < 0)
+ {
+ syslog(LOG_ERR, "ERROR: procfs mount failed: %d\n", ret);
+ }
+#endif
+
+#ifdef CONFIG_USERLED_LOWER
+ /* Register the LED driver */
+
+ ret = userled_lower_initialize("/dev/userleds");
+ if (ret < 0)
+ {
+ syslog(LOG_ERR, "ERROR: LED registration failed: %d\n", ret);
+ }
+#endif
+
+#ifdef CONFIG_NRF54L_SOFTDEVICE_CONTROLLER
+ /* Register the Bluetooth controller */
+
+ ret = nrf54l_sdc_initialize();
+ if (ret < 0)
+ {
+ syslog(LOG_ERR, "ERROR: SDC initialization failed: %d\n", ret);
+ return ret;
+ }
+#endif
+
+ UNUSED(ret);
+ return OK;
+}
diff --git a/boards/arm/nrf54l/nrf54lm20-dk/src/nrf54l_userleds.c b/boards/arm/nrf54l/nrf54lm20-dk/src/nrf54l_userleds.c
new file mode 100644
index 00000000000..180832b1d49
--- /dev/null
+++ b/boards/arm/nrf54l/nrf54lm20-dk/src/nrf54l_userleds.c
@@ -0,0 +1,116 @@
+/****************************************************************************
+ * boards/arm/nrf54l/nrf54lm20-dk/src/nrf54l_userleds.c
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership. The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+
+#include <stdint.h>
+#include <stdbool.h>
+
+#include <nuttx/board.h>
+#include <arch/board/board.h>
+
+#include "nrf54lm20-dk.h"
+
+#ifndef CONFIG_ARCH_LEDS
+
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+#define LED_ON 1
+#define LED_OFF 0
+
+/****************************************************************************
+ * Private Data
+ ****************************************************************************/
+
+static const nrf54l_pinset_t g_ledcfg[BOARD_NLEDS] =
+{
+ GPIO_LED1,
+ GPIO_LED2,
+ GPIO_LED3,
+ GPIO_LED4,
+};
+
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: board_userled_initialize
+ *
+ * Description:
+ * Configure the user LEDs and return the number of available LEDs.
+ *
+ ****************************************************************************/
+
+uint32_t board_userled_initialize(void)
+{
+ unsigned int i;
+
+ for (i = 0; i < BOARD_NLEDS; i++)
+ {
+ nrf54l_gpio_config(g_ledcfg[i]);
+ }
+
+ return BOARD_NLEDS;
+}
+
+/****************************************************************************
+ * Name: board_userled
+ *
+ * Description:
+ * Set the state of one user LED.
+ *
+ ****************************************************************************/
+
+void board_userled(int led, bool ledon)
+{
+ if ((unsigned int)led < BOARD_NLEDS)
+ {
+ nrf54l_gpio_write(g_ledcfg[led], ledon ? LED_ON : LED_OFF);
+ }
+}
+
+/****************************************************************************
+ * Name: board_userled_all
+ *
+ * Description:
+ * Set all user LEDs from the supplied bit set.
+ *
+ ****************************************************************************/
+
+void board_userled_all(uint32_t ledset)
+{
+ unsigned int i;
+
+ for (i = 0; i < BOARD_NLEDS; i++)
+ {
+ nrf54l_gpio_write(g_ledcfg[i], (ledset & (1 << i)) ? LED_ON : LED_OFF);
+ }
+}
+
+#endif /* !CONFIG_ARCH_LEDS */
diff --git a/boards/arm/nrf54l/nrf54lm20-dk/src/nrf54lm20-dk.h b/boards/arm/nrf54l/nrf54lm20-dk/src/nrf54lm20-dk.h
new file mode 100644
index 00000000000..64792983ffe
--- /dev/null
+++ b/boards/arm/nrf54l/nrf54lm20-dk/src/nrf54lm20-dk.h
@@ -0,0 +1,78 @@
+/****************************************************************************
+ * boards/arm/nrf54l/nrf54lm20-dk/src/nrf54lm20-dk.h
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership. The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ ****************************************************************************/
+
+#ifndef __BOARDS_ARM_NRF54L_NRF54LM20_DK_SRC_NRF54LM20_DK_H
+#define __BOARDS_ARM_NRF54L_NRF54LM20_DK_SRC_NRF54LM20_DK_H
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+#include <nuttx/compiler.h>
+
+#include "nrf54l_gpio.h"
+
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+/* Configuration ************************************************************/
+
+/* procfs File System */
+
+#ifdef CONFIG_FS_PROCFS
+# ifdef CONFIG_NSH_PROC_MOUNTPOINT
+# define NRF54L_PROCFS_MOUNTPOINT CONFIG_NSH_PROC_MOUNTPOINT
+# else
+# define NRF54L_PROCFS_MOUNTPOINT "/proc"
+# endif
+#endif
+
+/* LED definitions **********************************************************/
+
+/* Definitions to configure LED GPIO as outputs */
+
+#define GPIO_LED1 (GPIO_OUTPUT | GPIO_VALUE_ZERO | GPIO_PORT1 | GPIO_PIN(22))
+#define GPIO_LED2 (GPIO_OUTPUT | GPIO_VALUE_ZERO | GPIO_PORT1 | GPIO_PIN(25))
+#define GPIO_LED3 (GPIO_OUTPUT | GPIO_VALUE_ZERO | GPIO_PORT1 | GPIO_PIN(27))
+#define GPIO_LED4 (GPIO_OUTPUT | GPIO_VALUE_ZERO | GPIO_PORT1 | GPIO_PIN(28))
+
+#ifndef __ASSEMBLY__
+
+/****************************************************************************
+ * Public Function Prototypes
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: nrf54l_bringup
+ *
+ * Description:
+ * Perform board-specific initialization. Called from
+ * board_late_initialize() when CONFIG_BOARD_LATE_INITIALIZE is selected.
+ *
+ ****************************************************************************/
+
+int nrf54l_bringup(void);
+
+#endif /* __ASSEMBLY__ */
+#endif /* __BOARDS_ARM_NRF54L_NRF54LM20_DK_SRC_NRF54LM20_DK_H */