Skip to content

Commit

Permalink
MCXN94x: Handle selection of CPU1 (cc flags + define)
Browse files Browse the repository at this point in the history
JIRA: RTOS-988
  • Loading branch information
agkaminski committed Dec 16, 2024
1 parent 4948ac9 commit cc7e9e3
Showing 1 changed file with 15 additions and 3 deletions.
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

0 comments on commit cc7e9e3

Please sign in to comment.