Skip to content

Commit

Permalink
Fix FPU settings for Cortex-M33, affects E50x series
Browse files Browse the repository at this point in the history
  • Loading branch information
maxgerhardt committed Nov 29, 2024
1 parent ed97d3c commit 76fcfd1
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tools/platformio/platformio-build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
)


Expand Down

0 comments on commit 76fcfd1

Please sign in to comment.