From f5316f8e5278b3f20af54d8aa90bfea7fdfb2a3c Mon Sep 17 00:00:00 2001 From: valeros Date: Tue, 29 Aug 2023 11:58:05 +0300 Subject: [PATCH 1/5] Add missing ARCH macro for Uno boards Resolves #11 --- boards/uno_r4_minima.json | 1 + boards/uno_r4_wifi.json | 1 + 2 files changed, 2 insertions(+) diff --git a/boards/uno_r4_minima.json b/boards/uno_r4_minima.json index 40eba67..45df704 100644 --- a/boards/uno_r4_minima.json +++ b/boards/uno_r4_minima.json @@ -6,6 +6,7 @@ "extra_flags": [ "-DARDUINO_MINIMA", "-DARDUINO_UNOR4_MINIMA", + "-DARDUINO_ARCH_RENESAS_UNO", "-DCFG_TUSB_MCU=OPT_MCU_RAXXX" ], "core": "arduino", diff --git a/boards/uno_r4_wifi.json b/boards/uno_r4_wifi.json index 1dfe997..d425799 100644 --- a/boards/uno_r4_wifi.json +++ b/boards/uno_r4_wifi.json @@ -5,6 +5,7 @@ }, "extra_flags": [ "-DARDUINO_UNOWIFIR4", + "-DARDUINO_ARCH_RENESAS_UNO", "-DARDUINO_UNOR4_WIFI", "-DNO_USB", "-DBACKTRACE_SUPPORT", From 494b0de2539b32cb361e42aa6a1a98219aadb5b6 Mon Sep 17 00:00:00 2001 From: valeros Date: Wed, 20 Sep 2023 11:38:13 +0300 Subject: [PATCH 2/5] Update Arduino packages to v1.0.4 Resolves #12 --- builder/frameworks/arduino.py | 2 +- platform.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/builder/frameworks/arduino.py b/builder/frameworks/arduino.py index 85fb8b2..8609725 100644 --- a/builder/frameworks/arduino.py +++ b/builder/frameworks/arduino.py @@ -117,7 +117,7 @@ def load_flags(filename): ("ARDUINO", 10810), "ARDUINO_ARCH_RENESAS", "ARDUINO_FSP", - "_XOPEN_SOURCE", + ("_XOPEN_SOURCE", 700), ("F_CPU", "$BOARD_F_CPU") ], diff --git a/platform.json b/platform.json index cf3ed67..fb9649a 100644 --- a/platform.json +++ b/platform.json @@ -46,13 +46,13 @@ "type": "framework", "optional": true, "owner": "platformio", - "version": "~1.0.2" + "version": "~1.0.4" }, "framework-arduinorenesas-portenta": { "type": "framework", "optional": true, "owner": "platformio", - "version": "~1.0.2" + "version": "~1.0.4" }, "framework-renesas-fsp": { "type": "framework", From 55b855226d79f1618ed9a09fd1c40f9178358b6c Mon Sep 17 00:00:00 2001 From: MyselfAndJo <145660743+MyselfAndJo@users.noreply.github.com> Date: Thu, 21 Sep 2023 11:57:39 +0200 Subject: [PATCH 3/5] Change FPU flags to use single precision FPU (#13) The Cortex-M33F has a single precision fpu, thus the linker fpu settings need to be set to -mfpu=fpv-sp-d16. Otherwise all calls to the floating point abi will lead to a crash. --- builder/frameworks/arduino.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/builder/frameworks/arduino.py b/builder/frameworks/arduino.py index 8609725..9248196 100644 --- a/builder/frameworks/arduino.py +++ b/builder/frameworks/arduino.py @@ -142,14 +142,10 @@ def load_flags(filename): # Add FPU flags # -fpv_version = "4-sp" -if board.id == "portenta_c33": - fpv_version = "5" - env.Append( LINKFLAGS=[ "-mfloat-abi=hard", - "-mfpu=fpv%s-d16" % fpv_version + "-mfpu=fpv%s-sp-d16" % ("5" if board.id == "portenta_c33" else "4"), ] ) From dce48277824879ebc5bbcd5415c7a6f5927e5992 Mon Sep 17 00:00:00 2001 From: MyselfAndJo <145660743+MyselfAndJo@users.noreply.github.com> Date: Fri, 22 Sep 2023 11:12:49 +0200 Subject: [PATCH 4/5] Change jlink_device for Portenta C33 to R7FA6M5 (#14) "RA6M5" is unknown to J-Link, debugging is not possible with this setting, should be "R7FA6M5". --- boards/portenta_c33.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boards/portenta_c33.json b/boards/portenta_c33.json index 0a30869..3acccce 100644 --- a/boards/portenta_c33.json +++ b/boards/portenta_c33.json @@ -26,7 +26,7 @@ "variant": "PORTENTA_C33" }, "debug": { - "jlink_device": "RA6M5", + "jlink_device": "R7FA6M5", "svd_path": "R7FA6M5BH.svd" }, "frameworks": [ From 88df3900e94600b0d9d51365a7dd27d8f8b49f95 Mon Sep 17 00:00:00 2001 From: valeros Date: Fri, 29 Sep 2023 12:09:18 +0300 Subject: [PATCH 5/5] Bump version to 1.2.0 --- platform.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform.json b/platform.json index fb9649a..a133356 100644 --- a/platform.json +++ b/platform.json @@ -21,7 +21,7 @@ "type": "git", "url": "https://github.com/platformio/platform-renesas-ra.git" }, - "version": "1.1.0", + "version": "1.2.0", "frameworks": { "arduino": { "package": "framework-arduinorenesas-uno",