update espressif risc-v build configuration
- use optimization level O2 - explicitly state risc-v arch
This commit is contained in:
parent
9c8e6a8698
commit
2285dd1838
@ -163,12 +163,9 @@ ifeq ($(DEBUG), 1)
|
|||||||
# CFLAGS += -fno-inline -fno-ipa-sra
|
# CFLAGS += -fno-inline -fno-ipa-sra
|
||||||
else
|
else
|
||||||
CFLAGS += -DNDEBUG -ggdb3
|
CFLAGS += -DNDEBUG -ggdb3
|
||||||
ifeq ($(IDF_TARGET_ARCH),xtensa)
|
OPTIMIZATION_FLAGS ?= -O2
|
||||||
OPTIMIZATION_FLAGS ?= -O2
|
# RISC-V is larger than xtensa
|
||||||
else
|
# Use -Os for RISC-V when it overflows
|
||||||
# RISC-V is larger than xtensa so do -Os for it
|
|
||||||
OPTIMIZATION_FLAGS ?= -Os
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# option to override compiler optimization level, set in boards/$(BOARD)/mpconfigboard.mk
|
# option to override compiler optimization level, set in boards/$(BOARD)/mpconfigboard.mk
|
||||||
@ -178,6 +175,8 @@ CFLAGS += $(INC) -Werror -Wall -std=gnu11 -Wl,--gc-sections $(BASE_CFLAGS) $(C_D
|
|||||||
|
|
||||||
ifeq ($(IDF_TARGET_ARCH),xtensa)
|
ifeq ($(IDF_TARGET_ARCH),xtensa)
|
||||||
CFLAGS += -mlongcalls
|
CFLAGS += -mlongcalls
|
||||||
|
else ifeq ($(IDF_TARGET_ARCH),riscv)
|
||||||
|
CFLAGS += -march=rv32imc
|
||||||
endif
|
endif
|
||||||
|
|
||||||
LDFLAGS = $(CFLAGS) -Wl,-nostdlib -Wl,-Map=$@.map -Wl,-cref -Wl,--undefined=uxTopUsedPriority
|
LDFLAGS = $(CFLAGS) -Wl,-nostdlib -Wl,-Map=$@.map -Wl,-cref -Wl,--undefined=uxTopUsedPriority
|
||||||
|
Loading…
x
Reference in New Issue
Block a user