Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MCXN94x: Handle selection of CPU1 (cc flags + define) #219

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions target/armv8m.mk
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,29 @@ CXX := $(CROSS)g++
OLVL ?= -O2
CFLAGS += -mthumb -fomit-frame-pointer -mno-unaligned-access

# TODO hard float perhaps? To be decided
CFLAGS += -mcpu=cortex-m33 -mfloat-abi=soft -fstack-usage
# soft FPU for now, no support in kernel for hard FPU
CFLAGS += -mfloat-abi=soft -fstack-usage

MCX_USE_CPU1 ?= n

ifeq ($(MCX_USE_CPU1), y)
CFLAGS += -mcpu=cortex-m33+nodsp
else
CFLAGS += -mcpu=cortex-m33
endif

VADDR_KERNEL_INIT := $(KERNEL_PHADDR)

LDFLAGS := -Wl,-z,max-page-size=0x10

ifeq ($(KERNEL), 1)
CFLAGS += -ffixed-r9
CFLAGS += -ffixed-r9 -DMCX_USE_CPU1
LDFLAGS += -Tbss=20000000 -Tdata=20000000
STRIP := $(CROSS)strip

ifeq ($(MCX_USE_CPU1), y)
CFLAGS += -DMCX_USE_CPU1
endif
else
CFLAGS += -fpic -fpie -msingle-pic-base -mno-pic-data-is-text-relative
# output .rel.* sections to make ELF position-independent
Expand Down
Loading