From 380bfc0a6345f7295e2a5ff60c9712255f04a2dc Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 13 Dec 2024 17:50:00 +0700 Subject: fix portenta build, added core-m85.cmake/mk --- examples/build_system/cmake/cpu/cortex-m85.cmake | 25 ++++++++++++++++++++++ examples/build_system/make/cpu/cortex-m85.mk | 27 ++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 examples/build_system/cmake/cpu/cortex-m85.cmake create mode 100644 examples/build_system/make/cpu/cortex-m85.mk (limited to 'examples') diff --git a/examples/build_system/cmake/cpu/cortex-m85.cmake b/examples/build_system/cmake/cpu/cortex-m85.cmake new file mode 100644 index 000000000..30314acbc --- /dev/null +++ b/examples/build_system/cmake/cpu/cortex-m85.cmake @@ -0,0 +1,25 @@ +if (TOOLCHAIN STREQUAL "gcc") + set(TOOLCHAIN_COMMON_FLAGS + -mthumb + -mcpu=cortex-m85 + -mfloat-abi=hard + -mfpu=fpv5-d16 + ) + set(FREERTOS_PORT GCC_ARM_CM85_NTZ_NONSECURE CACHE INTERNAL "") + +elseif (TOOLCHAIN STREQUAL "clang") + set(TOOLCHAIN_COMMON_FLAGS + --target=arm-none-eabi + -mcpu=cortex-m85 + -mfpu=fpv5-d16 + ) + set(FREERTOS_PORT GCC_ARM_CM85_NTZ_NONSECURE CACHE INTERNAL "") + +elseif (TOOLCHAIN STREQUAL "iar") + set(TOOLCHAIN_COMMON_FLAGS + --cpu cortex-m85 + --fpu VFPv5_D16 + ) + set(FREERTOS_PORT IAR_ARM_CM85_NTZ_NONSECURE CACHE INTERNAL "") + +endif () diff --git a/examples/build_system/make/cpu/cortex-m85.mk b/examples/build_system/make/cpu/cortex-m85.mk new file mode 100644 index 000000000..75e8f3aaf --- /dev/null +++ b/examples/build_system/make/cpu/cortex-m85.mk @@ -0,0 +1,27 @@ +ifeq ($(TOOLCHAIN),gcc) + CFLAGS += \ + -mthumb \ + -mcpu=cortex-m85 \ + -mfloat-abi=hard \ + -mfpu=fpv5-d16 \ + +else ifeq ($(TOOLCHAIN),clang) + CFLAGS += \ + --target=arm-none-eabi \ + -mcpu=cortex-m85 \ + -mfpu=fpv5-d16 \ + +else ifeq ($(TOOLCHAIN),iar) + CFLAGS += \ + --cpu cortex-m85 \ + --fpu VFPv5_D16 \ + + ASFLAGS += \ + --cpu cortex-m85 \ + --fpu VFPv5_D16 \ + +else + $(error "TOOLCHAIN is not supported") +endif + +FREERTOS_PORTABLE_SRC ?= $(FREERTOS_PORTABLE_PATH)/ARM_CM85_NTZ/non_secure -- cgit v1.3.1