From 76fcfd14ad7f6811fb3cb1f6bac517a86a16c88d Mon Sep 17 00:00:00 2001 From: Maximilian Gerhardt Date: Fri, 29 Nov 2024 05:37:20 +0100 Subject: [PATCH] Fix FPU settings for Cortex-M33, affects E50x series --- tools/platformio/platformio-build.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/platformio/platformio-build.py b/tools/platformio/platformio-build.py index 8bcb22d3..d0cdd8d7 100644 --- a/tools/platformio/platformio-build.py +++ b/tools/platformio/platformio-build.py @@ -134,16 +134,15 @@ def configure_application_offset(mcu, upload_protocol): # LD_FLASH_OFFSET is mandatory even if there is no offset env.Append(LINKFLAGS=["-Wl,--defsym=LD_FLASH_OFFSET=%s" % hex(offset)]) - -if any(mcu in board_config.get("build.cpu") for mcu in ("cortex-m4", "cortex-m7")): +if any(mcu in board_config.get("build.cpu") for mcu in ("cortex-m4")): env.Append( CCFLAGS=["-mfpu=fpv4-sp-d16", "-mfloat-abi=hard"], LINKFLAGS=["-mfpu=fpv4-sp-d16", "-mfloat-abi=hard"], ) if board_config.get("build.cpu") == "cortex-m33": env.Append( - CCFLAGS=["-mfpu=fp-armv8", "-mfloat-abi=softfp"], - LINKFLAGS=["-mfpu=fp-armv8", "-mfloat-abi=softfp"], + CCFLAGS=["-mfpu=auto", "-mfloat-abi=softfp"], + LINKFLAGS=["-mfpu=auto", "-mfloat-abi=softfp"], )