diff --git a/arch/arm/src/armv8-r/Toolchain.defs b/arch/arm/src/armv8-r/Toolchain.defs index a7927f18bb..2c576e7d91 100644 --- a/arch/arm/src/armv8-r/Toolchain.defs +++ b/arch/arm/src/armv8-r/Toolchain.defs @@ -22,12 +22,18 @@ ARCHCPUFLAGS += -march=armv8-r ifeq ($(CONFIG_ARCH_FPU),y) LLVM_ABITYPE := eabihf - ARCHCPUFLAGS += -mfpu=vfpv3-d16 + + ifeq ($(CONFIG_ARCH_CORTEXR52)$(CONFIG_ARM_NEON),yy) + ARCHCPUFLAGS += -mfpu=neon-fp-armv8 + else + ARCHCPUFLAGS += -mfpu=fpv5-sp-d16 + endif ifeq ($(CONFIG_ARM_FPU_ABI_SOFT),y) ARCHCPUFLAGS += -mfloat-abi=softfp else ARCHCPUFLAGS += -mfloat-abi=hard endif + else LLVM_ABITYPE := eabi ARCHCPUFLAGS += -mfloat-abi=soft diff --git a/arch/arm/src/cmake/armv8-r.cmake b/arch/arm/src/cmake/armv8-r.cmake index 9b026c72be..f3b1a6c786 100644 --- a/arch/arm/src/cmake/armv8-r.cmake +++ b/arch/arm/src/cmake/armv8-r.cmake @@ -25,7 +25,12 @@ if(CONFIG_ARCH_CORTEXR52) endif() if(CONFIG_ARCH_FPU) - list(APPEND PLATFORM_FLAGS -mfpu=vfpv3-d16) + + if(CONFIG_ARCH_CORTEXR52 AND CONFIG_ARM_NEON) + list(APPEND PLATFORM_FLAGS -mfpu=neon-fp-armv8) + else() + list(APPEND PLATFORM_FLAGS -mfpu=fpv5-sp-d16) + endif() if(CONFIG_ARM_FPU_ABI_SOFT) list(APPEND PLATFORM_FLAGS -mfloat-abi=softfp) else()