mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
ports/nrf: Clean up board Make flags.
This commit is contained in:
parent
de6b54a2a5
commit
4cccfe5f80
@ -21,17 +21,38 @@
|
|||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
|
|
||||||
# Set startup and system files based on MCU.
|
# Set startup and system files based on MCU.
|
||||||
|
LDSCRIPT ?= nrf52xxx
|
||||||
|
HAL_DIR ?= hal/nrfx
|
||||||
SYSTEM ?= nrf/system_nrf52840
|
SYSTEM ?= nrf/system_nrf52840
|
||||||
STARTUP ?= nrf/startup_$(shell echo $(MCU) | tr '[:upper:]' '[:lower:]')
|
STARTUP ?= nrf/startup_$(shell echo $(MCU) | tr '[:upper:]' '[:lower:]')
|
||||||
LDSCRIPT ?= nrf52xxx
|
MCU_LOWER := $(shell echo $(MCU) | tr '[:upper:]' '[:lower:]')
|
||||||
|
|
||||||
export SD_DIR = $(TOP_DIR)/drivers/nrf
|
export SD_DIR = $(TOP_DIR)/drivers/nrf
|
||||||
|
|
||||||
# Compiler Flags
|
# Compiler Flags
|
||||||
CFLAGS += -std=gnu99 -Wall -Werror -Warray-bounds -mthumb -nostartfiles -fdata-sections -ffunction-sections
|
CFLAGS += -std=gnu99 \
|
||||||
CFLAGS += -D$(MCU) -D$(CFLAGS_MCU) -DARM_NN_TRUNCATE -D__FPU_PRESENT=1 -D__VFP_FP__ -D$(TARGET)\
|
-Wall \
|
||||||
-fsingle-precision-constant -Wdouble-promotion -mcpu=$(CPU) -mtune=$(CPU) -mfpu=$(FPU) -mfloat-abi=hard\
|
-Werror \
|
||||||
-DCMSIS_MCU_H=$(CMSIS_MCU_H) -DMP_PORT_NO_SOFTTIMER
|
-Warray-bounds \
|
||||||
CFLAGS += $(OMV_BOARD_CFLAGS)
|
-mthumb \
|
||||||
|
-nostartfiles \
|
||||||
|
-fdata-sections \
|
||||||
|
-ffunction-sections
|
||||||
|
|
||||||
|
CFLAGS += -D$(MCU) \
|
||||||
|
-DARM_NN_TRUNCATE \
|
||||||
|
-D__FPU_PRESENT=1 \
|
||||||
|
-D__VFP_FP__ \
|
||||||
|
-D$(TARGET) \
|
||||||
|
-fsingle-precision-constant \
|
||||||
|
-Wdouble-promotion \
|
||||||
|
-mcpu=$(CPU) \
|
||||||
|
-mtune=$(CPU) \
|
||||||
|
-mfpu=$(FPU) \
|
||||||
|
-mfloat-abi=hard \
|
||||||
|
-DCMSIS_MCU_H='<$(MCU_LOWER).h>' \
|
||||||
|
-DMP_PORT_NO_SOFTTIMER \
|
||||||
|
$(OMV_BOARD_CFLAGS)
|
||||||
|
|
||||||
# Disable LTO and set the SD
|
# Disable LTO and set the SD
|
||||||
MICROPY_ARGS += LTO=0 SD=$(SD)
|
MICROPY_ARGS += LTO=0 SD=$(SD)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user