Skip to content

arm/rm57: Add support for TI Hercules RM57 and LaunchXL2 board#19500

Open
daftie-zami wants to merge 1 commit into
apache:masterfrom
daftie-zami:rm57l843
Open

arm/rm57: Add support for TI Hercules RM57 and LaunchXL2 board#19500
daftie-zami wants to merge 1 commit into
apache:masterfrom
daftie-zami:rm57l843

Conversation

@daftie-zami

@daftie-zami daftie-zami commented Jul 21, 2026

Copy link
Copy Markdown

This PR adds initial architecture and board support for the TI Hercules
RM57L843 LaunchXL2 evaluation board (Cortex-R5F).

RM57 shares the same Hercules architecture/register layout as TI's
TMS570 family, so peripheral and core behavior was cross-checked
against TMS570 documentation/register maps in multiple places
throughout this port (see references to TMS570 across
arch/arm/src/rm57).

Currently implemented at the chip level (arch/arm/src/rm57):

  • Core boot / clock configuration / MPU init / VIM interrupt controller
  • SCI1 serial driver (console)
  • GIO driver (LEDs / GPIO)

Not yet covered: RM57's lockstep/safety features (CCM-R5, ESM fault
handling beyond basic setup, PBIST/STC self-test, etc). These will be
added in follow-up PRs.

Board support (boards/arm/rm57/rm57l843-launchxl2) provides an nsh
defconfig with console, NSH, autoleds/userleds and OSTest enabled.

Testing

Host: macOS
Board: TI Hercules RM57L843 LaunchXL2
Debug probe: XDS110

$ ./tools/configure.sh rm57l843-launchxl2:nsh && make 

Build Output

Copy files
Select CONFIG_HOST_MACOS=y
Select CONFIG_HOST_ARM64=y
Refreshing...
CP: arch/dummy/Kconfig to /Users/sami/Desktop/rm57-nx/nuttx/arch/dummy/dummy_kconfig
CP: boards/dummy/Kconfig to /Users/sami/Desktop/rm57-nx/nuttx/boards/dummy/dummy_kconfig
LN: platform/board to /Users/sami/Desktop/rm57-nx/nuttx-apps/platform/dummy
LN: include/arch to arch/arm/include
LN: include/arch/board to /Users/sami/Desktop/rm57-nx/nuttx/boards/arm/rm57/rm57l843-launchxl2/include
LN: drivers/platform to /Users/sami/Desktop/rm57-nx/nuttx/drivers/dummy
LN: include/arch/chip to /Users/sami/Desktop/rm57-nx/nuttx/arch/arm/include/rm57
LN: arch/arm/src/chip to /Users/sami/Desktop/rm57-nx/nuttx/arch/arm/src/rm57
LN: arch/arm/src/board to /Users/sami/Desktop/rm57-nx/nuttx/boards/arm/rm57/rm57l843-launchxl2/src
...
...
...
Memory region         Used Size  Region Size  %age Used
        flash:      343564 B         4 MB      8.19%
         sram:       11080 B       512 KB      2.11%
CP: nuttx.bin

OS test

Ekran Resmi 2026-07-22 00 34 30 IMG_1367

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces initial NuttX architecture support for the TI Hercules RM57 (Cortex-R5F) and adds a board port + NSH defconfig for the RM57L843 LaunchXL2 evaluation board. It establishes the core boot path and a minimal set of peripherals (clocking/MPU/VIM/RTI tick/SCI console/GIO LEDs) to get NSH and basic tests running on hardware.

Changes:

  • Add ARCH_CHIP_RM57 with RM57L843 chip selection and core early-boot (clocking, SRAM init/ECC clear, MPU, VIM IRQ dispatch, RTI timer tick).
  • Add SCI1 serial driver + low-level console bring-up and a minimal GIO implementation used for LEDs.
  • Add the rm57l843-launchxl2 board port (Kconfig, linker script, LED support, and nsh defconfig).

Reviewed changes

Copilot reviewed 48 out of 48 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
boards/Kconfig Registers the new RM57 LaunchXL2 board option and board name default.
boards/arm/rm57/rm57l843-launchxl2/Kconfig Board-level Kconfig stub for the new platform.
boards/arm/rm57/rm57l843-launchxl2/CMakeLists.txt Adds board build integration for CMake.
boards/arm/rm57/rm57l843-launchxl2/include/board.h Defines board clocks, flash wait-states, RTI clock, and LED mappings.
boards/arm/rm57/rm57l843-launchxl2/configs/nsh/defconfig Provides an NSH configuration enabling SCI1 console, LEDs, and ostest.
boards/arm/rm57/rm57l843-launchxl2/scripts/Make.defs Board build flags and linker script selection.
boards/arm/rm57/rm57l843-launchxl2/scripts/flash-sram.ld Flash/SRAM linker script and vector table retention behavior.
boards/arm/rm57/rm57l843-launchxl2/src/Makefile Board build integration for the Makefile build.
boards/arm/rm57/rm57l843-launchxl2/src/CMakeLists.txt Board source selection for CMake builds.
boards/arm/rm57/rm57l843-launchxl2/src/rm57l843-launchxl2.h Board-private definitions (GIO pin configuration for LEDs).
boards/arm/rm57/rm57l843-launchxl2/src/rm57_autoleds.c Auto-LED behavior for OS state indication.
boards/arm/rm57/rm57l843-launchxl2/src/rm57_userleds.c User LED API implementation (board_userled*).
boards/arm/rm57/rm57l843-launchxl2/src/rm57_initialize.c Early and late board initialization hooks.
boards/arm/rm57/rm57l843-launchxl2/src/rm57_bringup.c Board bring-up stub (late init hook target).
arch/arm/Kconfig Adds RM57 as a selectable ARM chip family and wires in chip Kconfig.
arch/arm/include/rm57/chip.h RM57L843 chip constants (flash/RAM sizes, peripheral counts).
arch/arm/include/rm57/rm57l843_irq.h RM57L843 VIM request/channel definitions.
arch/arm/include/rm57/irq.h RM57 IRQ numbering and inclusion of chip-specific IRQ map.
arch/arm/src/rm57/Kconfig RM57 chip selection + SCI1 peripheral Kconfig.
arch/arm/src/rm57/Make.defs Adds RM57 arch sources and removes GICv2 common sources.
arch/arm/src/rm57/CMakeLists.txt Adds RM57 arch sources to the CMake build.
arch/arm/src/rm57/chip.h RM57 internal chip header and cache line size definitions.
arch/arm/src/rm57/rm57_boot.h Declares RM57 boot entrypoints (core init + board init).
arch/arm/src/rm57/rm57_boot.c Implements the RM57 boot sequence (clocks, SRAM init, MPU, console, nx_start).
arch/arm/src/rm57/rm57_coreinit.S Early lockstep-safe core register/SPSR initialization routine.
arch/arm/src/rm57/rm57_clockconfig.h Declares RM57 clock configuration entrypoint.
arch/arm/src/rm57/rm57_clockconfig.c Implements HALCoGen-derived PLL/flash wait-state/peripheral clock setup.
arch/arm/src/rm57/rm57_mpuinit.h MPU region configuration helpers (flash/SRAM/peripherals).
arch/arm/src/rm57/rm57_mpuinit.c MPU init/reset and region setup.
arch/arm/src/rm57/rm57_irq.h Declares RM57-specific IRQ helpers (FIQ enabling).
arch/arm/src/rm57/rm57_irq.c Implements VIM initialization and IRQ/FIQ decoding + enable/disable.
arch/arm/src/rm57/rm57_timerisr.c RTI1 compare-based system tick ISR and timer setup.
arch/arm/src/rm57/rm57_lowputc.h Declares early console init and SCI configuration routine.
arch/arm/src/rm57/rm57_lowputc.c Implements low-level console output and SCI configuration/init.
arch/arm/src/rm57/rm57_serial.c SCI1 serial driver (interrupt-driven) and UART registration.
arch/arm/src/rm57/rm57_gio.h GIO pinset encoding and API definitions.
arch/arm/src/rm57/rm57_gio.c GIO init/config/read/write implementation.
arch/arm/src/rm57/rm57_esm.h Declares early ESM quiesce function.
arch/arm/src/rm57/rm57_esm.c Implements early ESM quiesce/init sequence.
arch/arm/src/rm57/hardware/rm57l843_memorymap.h Defines RM57L843 peripheral base addresses and memory map.
arch/arm/src/rm57/hardware/rm57_vim.h VIM register definitions and helpers.
arch/arm/src/rm57/hardware/rm57_sys.h SYS module register definitions (PLL/clock/memory init).
arch/arm/src/rm57/hardware/rm57_sci.h SCI register definitions, flags, and interrupt vector codes.
arch/arm/src/rm57/hardware/rm57_rti.h RTI register definitions used for the system tick.
arch/arm/src/rm57/hardware/rm57_pcr.h PCR register definitions used for peripheral power/clocks.
arch/arm/src/rm57/hardware/rm57_gio.h GIO register definitions and helpers.
arch/arm/src/rm57/hardware/rm57_flash.h Flash wrapper register definitions for wait-state configuration.
arch/arm/src/rm57/hardware/rm57_esm.h ESM register definitions used during early quiesce/init.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread boards/Kconfig Outdated
Comment thread arch/arm/src/rm57/rm57_lowputc.c
Comment thread boards/arm/rm57/rm57l843-launchxl2/src/rm57_autoleds.c Outdated
Comment thread boards/arm/rm57/rm57l843-launchxl2/src/rm57_autoleds.c Outdated
Comment thread boards/arm/rm57/rm57l843-launchxl2/src/rm57_autoleds.c Outdated
Comment thread arch/arm/src/rm57/rm57_serial.c Outdated

@acassis acassis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@daftie-zami amazing work! Please add a basic Documentation about this new arch/board. Please use the Documentation/contributing/doc_templates/board.rst as reference

@github-actions github-actions Bot added Area: Build system Arch: arm Issues related to ARM (32-bit) architecture Size: XL The size of the change in this PR is very large. Consider breaking down the PR into smaller pieces. Board: arm labels Jul 22, 2026
@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown

MemBrowse Memory Report

No memory changes detected for:

@xiaoxiang781216

Copy link
Copy Markdown
Contributor

@daftie-zami please drop merge patch from PR.

@acassis

acassis commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

@daftie-zami please drop merge patch from PR.

@daftie-zami instead using merge you should use git rebase

@daftie-zami
daftie-zami force-pushed the rm57l843 branch 2 times, most recently from ce13613 to f9576fd Compare July 22, 2026 10:18
@daftie-zami

Copy link
Copy Markdown
Author

@daftie-zami amazing work! Please add a basic Documentation about this new arch/board. Please use the Documentation/contributing/doc_templates/board.rst as reference

Thanks for the review. I ve applied the requested changes.

@daftie-zami

daftie-zami commented Jul 22, 2026

Copy link
Copy Markdown
Author

Since the RM57L843 MCU includes a rich set of safety features, do you think it would make sense to add those to NuttX as well?

@acassis

acassis commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Since the RM57L843 MCU includes a rich set of safety features, do you think it would make sense to add those to NuttX as well?

Yes, it could be a good idea!

acassis
acassis previously approved these changes Jul 22, 2026
jerpelea
jerpelea previously approved these changes Jul 22, 2026
Signed-off-by: Mahmut Sami ÖZMEN <mahmut5sami@gmail.com>
@daftie-zami daftie-zami changed the title Add support for TI Hercules RM57 and LaunchXL2 board arm/rm57: Add support for TI Hercules RM57 and LaunchXL2 board Jul 22, 2026
@daftie-zami

Copy link
Copy Markdown
Author

Sorry for the another push i fixed the ci issue's

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Arch: arm Issues related to ARM (32-bit) architecture Area: Build system Board: arm Size: XL The size of the change in this PR is very large. Consider breaking down the PR into smaller pieces.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants