Skip to content

Commit cfb322d

Browse files
authored
Add Nano R4 (#30)
Resolves #29
1 parent 14ab5ff commit cfb322d

File tree

3 files changed

+54
-2
lines changed

3 files changed

+54
-2
lines changed

boards/nano_r4.json

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"build": {
3+
"arduino": {
4+
"ldscript": "fsp.ld"
5+
},
6+
"extra_flags": [
7+
"-DARDUINO_MINIMA",
8+
"-DARDUINO_NANOR4",
9+
"-DARDUINO_ARCH_RENESAS_UNO",
10+
"-DCFG_TUSB_MCU=OPT_MCU_RAXXX"
11+
],
12+
"core": "arduino",
13+
"cpu": "cortex-m4",
14+
"f_cpu": "48000000L",
15+
"hwids": [
16+
[
17+
"0x2341",
18+
"0x0074"
19+
],
20+
[
21+
"0x2341",
22+
"0x0374"
23+
]
24+
],
25+
"mcu": "ra4m1",
26+
"variant": "NANOR4"
27+
},
28+
"debug": {
29+
"jlink_device": "R7FA4M1AB",
30+
"svd_path": "R7FA4M1AB.svd"
31+
},
32+
"frameworks": [
33+
"arduino",
34+
"fsp",
35+
"cmsis"
36+
],
37+
"name": "Arduino Nano R4",
38+
"upload": {
39+
"maximum_ram_size": 32768,
40+
"maximum_size": 262144,
41+
"native_usb": true,
42+
"protocol": "dfu",
43+
"protocols": [
44+
"cmsis-dap",
45+
"dfu",
46+
"jlink"
47+
],
48+
"offset_address": "0x4000"
49+
},
50+
"url": "https://docs.arduino.cc/hardware/nano-r4/",
51+
"vendor": "Arduino"
52+
}

builder/frameworks/fsp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
src_filter.append("+<bsp/mcu/ra4m1>") # Uno R4 (Minima, WiFI)
7575
else:
7676
src_filter.append("+<bsp/mcu/ra6m5>") # Portenta
77-
if board.id in ("uno_r4_minima", "uno_r4_wifi"):
77+
if board.id in ("uno_r4_minima", "uno_r4_wifi", "nano_r4"):
7878
src_filter.extend(["+<" + sublib + ">" for sublib in sublibs_uno_r4_x])
7979
env.Append(CPPPATH=[
8080
join(FRAMEWORK_DIR, "fsp", "src", "bsp", "mcu", "ra4m1"),

platform.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def _add_default_debug_tools(self, board):
108108
},
109109
"onboard": link in debug.get("onboard_tools", []),
110110
}
111-
elif link == "cmsis-dap" and board.id in ("uno_r4_wifi", "uno_r4_minima"):
111+
elif link == "cmsis-dap" and board.id in ("uno_r4_wifi", "uno_r4_minima", "nano_r4"):
112112
hwids = board.get("build.hwids", [["0x2341", "0x1002"]])
113113
server_args = [
114114
"-s",

0 commit comments

Comments
 (0)