Skip to content

Adds the Renesas RX24T port - #971

Open
yosuke-wolfssl wants to merge 3 commits into
wolfSSL:masterfrom
yosuke-wolfssl:feat/rx24t
Open

yosuke-wolfssl wants to merge 3 commits into
wolfSSL:masterfrom
yosuke-wolfssl:feat/rx24t

Conversation

@yosuke-wolfssl

Copy link
Copy Markdown
Contributor

Summary

Adds the Renesas RX24T as TARGET=rx24t, tested on the Renesas Starter Kit for RX24T with GCC for Renesas RX 14.2. Also fixes two problems that affect every RX target.

Shared RX fixes

  • SCI_SEMR() pointed at offset 0x08 (SNFR) instead of 0x07 (SEMR), so the UART's ABCS/BGDM writes went to the noise filter register.
  • BIG_ENDIAN=1: objcopy now reads the ELF as elf32-rx-be-ns. The ELF stores code 4-byte swapped. Plain objcopy swapped it back, so a big-endian wolfboot.bin hit brk at reset.

RX24T port (hal/renesas-rx.c)

  • Clock: HOCO 32 MHz → PLL → 80 MHz ICLK, 20 MHz FCLK.
  • Console: SCI1 on PD3/PD5 at 115200. LED0 on PB3.
  • Flash driver: runs from RAM, programs 8-byte units and erases 2 KB blocks. It returns FLASH_ERR_NOT_BLANK instead of programming a unit that is not erased, which code flash does not allow. It shares the IRQ and range helpers with RX71M.
  • Layout: wolfBoot 0xFFFF8000 (32 KB), boot 0xFFFC0000 and update 0xFFFD8000 (96 KB each), swap 0xFFFF0000, 2 KB sectors.
  • Boot tables: RomCodeArea[] holds ROMCODE, the fault vectors and the boot mode ID code. MDE/OFS1/OFS0 are written only under WOLFBOOT_RENESAS_OSM.
  • ID code on by default: with a blank ID code, every programmer connection erases all flash. wolfBoot therefore writes control code 45h with the manual's example ID. RENESAS_ID_CODE sets your own, and the build rejects 52h.
  • Build checks: NVM_FLASH_WRITEONCE=1 is required. PKA=1 and DELTA_UPDATES are rejected. BIG_ENDIAN=1 requires WOLFBOOT_RENESAS_OSM.
  • Docs: docs/Targets.md gains a Renesas RX24T section covering layout, erase budget, RAM, ID code, build, flash and debug.

CI

  • New jobs renesas_rx24t_test and renesas_rx24t_bigendian_osm_test.
  • The ROMCODE check now covers RX24T. A new step checks the ID code and MDE bytes in wolfboot.bin for each endianness.

Verification

Test (RSK RX24T, E2 Lite) Little endian Big endian
Boot + verify v1, wolfBoot_success() pass pass
Update v1 → v2, rollback pass pass
Confirmed update pass —
Update interrupted twice by reset, resumes pass —
Overwrite of a programmed unit → -10 pass —
  • Peak stack measured on the board: 3,676 B (boot), 3,800 B (update), out of 16 KB RAM.
  • New CI checks pass on both builds and fail on an all-F ID code and on the wrong endianness.
  • RX71M still builds with the shared flash helpers.

- renesas-rx.h: SCI_SEMR() addresses offset 0x07 (SEMR) instead of
  0x08 (SNFR).
- arch.mk: BIG_ENDIAN=1 reads the ELF as elf32-rx-be-ns in objcopy.
- arch.mk: TARGET=rx24t requires NVM_FLASH_WRITEONCE=1, and
  WOLFBOOT_RENESAS_OSM with BIG_ENDIAN=1, rejects PKA=1 and
  DELTA_UPDATES=1, and turns RENESAS_ID_CODE into
  WOLFBOOT_RENESAS_ID_CODE0-3.
- renesas-rx24t.config and hal/rx24t.ld for the RSK RX24T: 16 KB
  RAM, 2 KB sectors, 96 KB partitions, wolfBoot in the top 32 KB.
- boot_renesas.c: RomCodeArea[] with ROMCODE, the ID code (control
  code 45h by default) and fault vectors; MDE/OFS1/OFS0 under
  WOLFBOOT_RENESAS_OSM.
- hal/renesas-rx.c: HOCO-based 80 MHz clock, SCI1 UART on PD3/PD5,
  LED0 on PB3, and a RAM-resident code flash driver (8-byte
  program, 2 KB erase) sharing the IRQ and range helpers with
  rx71m.
- test-app: RENESAS_RX-rx24t.ld for the 16 KB RAM.
@yosuke-wolfssl yosuke-wolfssl self-assigned this Nov 4, 2026
Copilot AI balanced review requested due to automatic review settings November 4, 2026 01:14

Copilot AI 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.

🟡 Changes recommended

RENESAS_ID_CODE is missing from CONFIG_VARS, so make config discards custom IDs and subsequent builds fall back to the public example ID, mismatching programmer/debugger credentials.

1 open issue
What changed in this PR

Adds Renesas RX24T support to wolfBoot’s shared RX implementation, including board initialization, flash operations, boot tables, and build configuration. It also corrects UART register access and big-endian binary generation across RX targets.

Changes:

  • Adds RX24T clock, console, flash driver, memory layouts, and configuration checks.
  • Provides ID-code defaults and configuration, plus build, flashing, and debugging documentation.
  • Adds little- and big-endian CI builds with ROMCODE, ID-code, and MDE checks.
File Description
test-app/​RENESAS_RX-rx24t.ld Defines application memory layout and stack reserve.
test-app/​Makefile Selects the RX24T linker script and RAM-resident flash driver.
src/​boot_renesas.c Adds RX24T boot tables, ID code, and option-setting words.
hal/​rx24t.ld Defines bootloader layout, fixed words, and stack reserve.
hal/​rx24t.c Identifies the shared RX HAL implementation.
hal/​renesas-rx.h Adds RX24T registers and constants; corrects SCI SEMR offset.
hal/​renesas-rx.c Implements RX24T initialization and flash operations.
docs/​Targets.md Documents RX24T setup, constraints, and programming procedures.
docs/​Renesas.md Lists RX24T support and clarifies IDE project availability.
config/​examples/​renesas-rx24t.config Supplies the RX24T example configuration.
arch.mk Adds RX24T build checks and ID configuration; fixes big-endian extraction.
.github/​workflows/​test-configs.yml Adds RX24T builds for both endiannesses.
.github/​workflows/​test-build-renesas-rx.yml Checks RX24T ROMCODE, ID-code, and MDE bytes.

Review effort: Balanced

Comment thread arch.mk Resolved
@yosuke-wolfssl yosuke-wolfssl changed the title Feat/rx24t Adds the Renesas RX24T port Nov 4, 2026

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot 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.

Fenrir Automated Review — PR #971

Scan targets checked: wolfboot-src, wolfboot-bugs
Not reviewed (no scan target covers them): .github/workflows/test-build-renesas-rx.yml, .github/workflows/test-configs.yml, arch.mk, config/examples/renesas-rx24t.config, docs/Renesas.md, docs/Targets.md, hal/renesas-rx.h, hal/rx24t.ld, test-app/Makefile, test-app/RENESAS_RX-rx24t.ld
Coverage: 2 of 3 in-scope changed file(s) opened by the reviewer; not opened: hal/rx24t.c

Fenrir result: Approved ✅

No new issues found in the changed files.

Advisory only — this automated result does not count as a GitHub approval.

Review tier: Lite

- Targets.md gains a Renesas RX24T section: board, console, boot
  output, flash layout, notes (erase budget, RAM, clock, ROMCODE,
  OSM, big endian), boot mode ID code, build, flash and debug.
- Renesas.md lists the RX24T and no longer says every example has
  an e2Studio project.
- test-configs.yml adds renesas_rx24t_test and
  renesas_rx24t_bigendian_osm_test.
- test-build-renesas-rx.yml runs the ROMCODE check for RX24T too,
  and checks the RX24T ID code at 0xFFFFFFA0 and MDE at 0xFFFFFF80
  per endianness.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants