diff options
| author | hathach <[email protected]> | 2024-04-24 19:21:26 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2024-04-24 19:21:26 +0700 |
| commit | a7bf0e3e7f7799c28e370826710810033c117744 (patch) | |
| tree | 1ac7cb708010473050ceeab0f6ff6c7750eaa6d1 /examples/build_system/make/cpu/cortex-m4.mk | |
| parent | 366f1cf1863bad626af10347f8ff3d0ef7f6ea2b (diff) | |
clang make work for samd21
Diffstat (limited to 'examples/build_system/make/cpu/cortex-m4.mk')
| -rw-r--r-- | examples/build_system/make/cpu/cortex-m4.mk | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/examples/build_system/make/cpu/cortex-m4.mk b/examples/build_system/make/cpu/cortex-m4.mk index d8776b5d8..4e16819d1 100644 --- a/examples/build_system/make/cpu/cortex-m4.mk +++ b/examples/build_system/make/cpu/cortex-m4.mk @@ -5,9 +5,18 @@ ifeq ($(TOOLCHAIN),gcc) -mfloat-abi=hard \ -mfpu=fpv4-sp-d16 \ +else ifeq ($(TOOLCHAIN),clang) + CFLAGS += \ + --target=arm-none-eabi \ + -mcpu=cortex-m4 \ + -mfpu=fpv4-sp-d16 \ + else ifeq ($(TOOLCHAIN),iar) CFLAGS += --cpu cortex-m4 --fpu VFPv4 ASFLAGS += --cpu cortex-m4 --fpu VFPv4 + +else + $(error "TOOLCHAIN is not supported") endif FREERTOS_PORTABLE_SRC ?= $(FREERTOS_PORTABLE_PATH)/ARM_CM4F |
