From 5394ceb6110b73f0f6af273f27b98972f35a6a10 Mon Sep 17 00:00:00 2001 From: todateman Date: Wed, 1 Jan 2025 21:21:16 +0900 Subject: [PATCH] Add RMC-RA4M1(rev.2.0) --- boards/rmc_ra4m1_20.json | 53 +++++++++++++++++++++++++++++++++++++++ builder/frameworks/fsp.py | 4 +-- platform.py | 2 +- 3 files changed, 56 insertions(+), 3 deletions(-) create mode 100644 boards/rmc_ra4m1_20.json diff --git a/boards/rmc_ra4m1_20.json b/boards/rmc_ra4m1_20.json new file mode 100644 index 0000000..9ec24eb --- /dev/null +++ b/boards/rmc_ra4m1_20.json @@ -0,0 +1,53 @@ +{ + "build": { + "arduino": { + "ldscript": "fsp.ld" + }, + "extra_flags": [ + "-DARDUINO_MINIMA", + "-DARDUINO_UNOR4_MINIMA", + "-DARDUINO_ARCH_RENESAS_UNO", + "-DARDUINO_RMC-RA4M1", + "-DCFG_TUSB_MCU=OPT_MCU_RAXXX" + ], + "core": "arduino", + "cpu": "cortex-m4", + "f_cpu": "48000000L", + "hwids": [ + [ + "0x2341", + "0x0069" + ], + [ + "0x2341", + "0x0369" + ] + ], + "mcu": "ra4m1", + "variant": "rmc_ra4m1_20" + }, + "debug": { + "jlink_device": "ra4m1", + "svd_path": "R7FA4M1AB.svd" + }, + "frameworks": [ + "arduino", + "fsp", + "cmsis" + ], + "name": "RMC-RA4M1", + "upload": { + "maximum_ram_size": 32768, + "maximum_size": 262144, + "native_usb": true, + "protocol": "dfu", + "protocols": [ + "cmsis-dap", + "dfu", + "jlink" + ], + "offset_address": "0x4000" + }, + "url": "https://www2.himdx.net/mcr/product/download.html#ra4m1", + "vendor": "Hitachi Document Solutions" +} diff --git a/builder/frameworks/fsp.py b/builder/frameworks/fsp.py index fff5f66..928c68f 100644 --- a/builder/frameworks/fsp.py +++ b/builder/frameworks/fsp.py @@ -71,10 +71,10 @@ "+" ] if board.get("build.mcu", "").lower().startswith("ra4m1"): - src_filter.append("+") # Uno R4 (Minima, WiFI) + src_filter.append("+") # Uno R4 (Minima, WiFI, RMC-RA4M1) else: src_filter.append("+") # Portenta -if board.id in ("uno_r4_minima", "uno_r4_wifi"): +if board.id in ("uno_r4_minima", "uno_r4_wifi", "rmc_ra4m1_20"): src_filter.extend(["+<" + sublib + ">" for sublib in sublibs_uno_r4_x]) env.Append(CPPPATH=[ join(FRAMEWORK_DIR, "fsp", "src", "bsp", "mcu", "ra4m1"), diff --git a/platform.py b/platform.py index 34aec26..cd40239 100644 --- a/platform.py +++ b/platform.py @@ -108,7 +108,7 @@ def _add_default_debug_tools(self, board): }, "onboard": link in debug.get("onboard_tools", []), } - elif link == "cmsis-dap" and board.id in ("uno_r4_wifi", "uno_r4_minima"): + elif link == "cmsis-dap" and board.id in ("uno_r4_wifi", "uno_r4_minima", "rmc_ra4m1_20"): hwids = board.get("build.hwids", [["0x2341", "0x1002"]]) server_args = [ "-s",