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] 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"), ] )