mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-17 05:32:55 +08:00
adding cpu core .mk for makefile
fix cortex m33 for nrf5340 dk
This commit is contained in:
parent
e8dd200fed
commit
270136e84a
@ -2,6 +2,8 @@
|
|||||||
# Common make definition for all examples
|
# Common make definition for all examples
|
||||||
# ---------------------------------------
|
# ---------------------------------------
|
||||||
|
|
||||||
|
TOOLCHAIN ?= gcc
|
||||||
|
|
||||||
#-------------- TOP and CURRENT_PATH ------------
|
#-------------- TOP and CURRENT_PATH ------------
|
||||||
|
|
||||||
# Set TOP to be the path to get from the current directory (where make was
|
# Set TOP to be the path to get from the current directory (where make was
|
||||||
@ -75,6 +77,7 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
#-------------- Cross Compiler ------------
|
#-------------- Cross Compiler ------------
|
||||||
|
|
||||||
# Can be set by board, default to ARM GCC
|
# Can be set by board, default to ARM GCC
|
||||||
CROSS_COMPILE ?= arm-none-eabi-
|
CROSS_COMPILE ?= arm-none-eabi-
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
CPU_CORE = cortex-m33
|
||||||
MCU_VARIANT = nrf5340_application
|
MCU_VARIANT = nrf5340_application
|
||||||
CFLAGS += -DNRF5340_XXAA -DNRF5340_XXAA_APPLICATION
|
CFLAGS += -DNRF5340_XXAA -DNRF5340_XXAA_APPLICATION
|
||||||
|
|
||||||
|
@ -3,13 +3,12 @@ DEPS_SUBMODULES += lib/CMSIS_5 hw/mcu/nordic/nrfx
|
|||||||
|
|
||||||
include $(TOP)/$(BOARD_PATH)/board.mk
|
include $(TOP)/$(BOARD_PATH)/board.mk
|
||||||
|
|
||||||
|
CPU_CORE ?= cortex-m4
|
||||||
|
|
||||||
|
include $(TOP)/tools/make/cpu/$(CPU_CORE).mk
|
||||||
|
|
||||||
CFLAGS += \
|
CFLAGS += \
|
||||||
-flto \
|
-flto \
|
||||||
-mthumb \
|
|
||||||
-mabi=aapcs \
|
|
||||||
-mcpu=cortex-m4 \
|
|
||||||
-mfloat-abi=hard \
|
|
||||||
-mfpu=fpv4-sp-d16 \
|
|
||||||
-DCFG_TUSB_MCU=OPT_MCU_NRF5X \
|
-DCFG_TUSB_MCU=OPT_MCU_NRF5X \
|
||||||
-DCONFIG_GPIO_AS_PINRESET
|
-DCONFIG_GPIO_AS_PINRESET
|
||||||
|
|
||||||
|
11
tools/make/cpu/cortex-m33.mk
Normal file
11
tools/make/cpu/cortex-m33.mk
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
ifeq ($(TOOLCHAIN),gcc)
|
||||||
|
CFLAGS += \
|
||||||
|
-mthumb \
|
||||||
|
-mcpu=cortex-m33 \
|
||||||
|
-mfloat-abi=hard \
|
||||||
|
-mfpu=fpv5-d16 \
|
||||||
|
|
||||||
|
#set(FREERTOS_PORT GCC_ARM_CM33_NONSECURE CACHE INTERNAL "")
|
||||||
|
else ifeq ($(TOOLCHAIN),iar)
|
||||||
|
# TODO support IAR
|
||||||
|
endif
|
11
tools/make/cpu/cortex-m4.mk
Normal file
11
tools/make/cpu/cortex-m4.mk
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
ifeq ($(TOOLCHAIN),gcc)
|
||||||
|
CFLAGS += \
|
||||||
|
-mthumb \
|
||||||
|
-mcpu=cortex-m4 \
|
||||||
|
-mfloat-abi=hard \
|
||||||
|
-mfpu=fpv4-sp-d16 \
|
||||||
|
|
||||||
|
#set(FREERTOS_PORT GCC_ARM_CM4F CACHE INTERNAL "")
|
||||||
|
else ifeq ($(TOOLCHAIN),iar)
|
||||||
|
# TODO support IAR
|
||||||
|
endif
|
11
tools/make/cpu/cortex-m7.mk
Normal file
11
tools/make/cpu/cortex-m7.mk
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
ifeq ($(TOOLCHAIN),gcc)
|
||||||
|
CFLAGS += \
|
||||||
|
-mthumb \
|
||||||
|
-mcpu=cortex-m7 \
|
||||||
|
-mfloat-abi=hard \
|
||||||
|
-mfpu=fpv5-d16 \
|
||||||
|
|
||||||
|
#set(FREERTOS_PORT GCC_ARM_CM7 CACHE INTERNAL "")
|
||||||
|
else ifeq ($(TOOLCHAIN),iar)
|
||||||
|
# TODO support IAR
|
||||||
|
endif
|
Loading…
x
Reference in New Issue
Block a user