Skip to content
Open
Show file tree
Hide file tree
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
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -306,9 +306,8 @@ CFLAGS+=$(WOLFPSA_CFLAGS)
ifeq ($(USE_GCC_HEADLESS),1)
CFLAGS+=-Wall -Wextra -Wno-main -ffreestanding
ifneq (,$(filter aurix_tc4xx aurix_tc4xx_csrm,$(TARGET)))
# No -fdata-sections: tricore-elf-gcc 13 emits bare-named data sections
# (.varname, not .bss.varname) that escape the iLLD linker script's
# clear/copy tables, leaving statics uninitialized at boot.
# No -fdata-sections: gcc 13's bare-named data sections (.varname) escape
# the linker script's clear/copy tables and stay uninitialized at boot.
CFLAGS+=-ffunction-sections -fomit-frame-pointer
else ifeq ($(TARGET)-$(GCC),aurix_tc3xx-1)
# Same as above for the TC3xx host built with tricore-elf-gcc (GCC=1)
Expand Down
118 changes: 3 additions & 115 deletions arch.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3393,7 +3393,6 @@ ifeq ($(ARCH), AURIX)

# wolfHSM TC4xx port root. Expected that wolfBoot is inside as a submodule.
WOLFHSM_INFINEON_TC4XX?=$(abspath ..)
TC4_LLD_DIR?=$(WOLFHSM_INFINEON_TC4XX)/drivers
TC4_WB_DIR?=$(WOLFHSM_INFINEON_TC4XX)/port/wolfboot

# TC4 derivative device selection from the port device.mk.
Expand All @@ -3409,90 +3408,13 @@ ifeq ($(ARCH), AURIX)
-ffunction-sections -fno-builtin -std=gnu99 \
-DPART_BOOT_EXT -DPART_UPDATE_EXT -DPART_SWAP_EXT \
-DWOLFBOOT_LOADER_MAIN
# Vendor iLLD sources trip some -Wextra diagnostics
CFLAGS += -Wno-missing-field-initializers -Wno-unused-parameter \
-Wno-unused-variable -Wno-sign-compare -Wno-type-limits

# iLLD include paths. SSW configuration differs per core.
ifeq ($(TARGET), aurix_tc4xx_csrm)
CFLAGS += -I$(TC4_WB_DIR)/csrm -I$(TC4_WB_DIR)/csrm/Cfg_Ssw
else
CFLAGS += -I$(TC4_WB_DIR) -I$(TC4_WB_DIR)/Cfg_Ssw
endif

# Linker scripts ship with the port, not in hal/.
ifeq ($(TARGET), aurix_tc4xx_csrm)
$(call LSCRIPT_IN_DEFAULT,$(TC4_WB_DIR)/csrm/aurix_tc4xx_csrm.ld)
else
$(call LSCRIPT_IN_DEFAULT,$(TC4_WB_DIR)/aurix_tc4xx.ld)
endif
CFLAGS += \
-I$(TC4_LLD_DIR) \
-I$(TC4_LLD_DIR)/Infra/Ssw/TC4xx/Csrm \
-I$(TC4_LLD_DIR)/iLLD/TC4xx/Csrm \
-I$(TC4_LLD_DIR)/iLLD/TC4xx/Csrm/Cpu/Trap \
-I$(TC4_LLD_DIR)/Infra \
-I$(TC4_LLD_DIR)/Infra/Platform \
-I$(TC4_LLD_DIR)/Infra/Platform/Compilers \
-I$(TC4_LLD_DIR)/Infra/Sfr \
-I$(TC4_LLD_DIR)/Infra/Sfr/$(DEV_DERIV) \
-I$(TC4_LLD_DIR)/Infra/Ssw \
-I$(TC4_LLD_DIR)/Infra/Ssw/TC4xx \
-I$(TC4_LLD_DIR)/Infra/Ssw/TC4xx/Tricore \
-I$(TC4_LLD_DIR)/Service \
-I$(TC4_LLD_DIR)/Service/CpuGeneric \
-I$(TC4_LLD_DIR)/Service/CpuGeneric/If \
-I$(TC4_LLD_DIR)/Service/CpuGeneric/If/Ccu6If \
-I$(TC4_LLD_DIR)/Service/CpuGeneric/StdIf \
-I$(TC4_LLD_DIR)/Service/CpuGeneric/SysSe \
-I$(TC4_LLD_DIR)/Service/CpuGeneric/SysSe/Bsp \
-I$(TC4_LLD_DIR)/Service/CpuGeneric/SysSe/General \
-I$(TC4_LLD_DIR)/Service/CpuGeneric/SysSe/Time \
-I$(TC4_LLD_DIR)/Service/CpuGeneric/_Utilities \
-I$(TC4_LLD_DIR)/Service/Tricore \
-I$(TC4_LLD_DIR)/Service/Tricore/Comm \
-I$(TC4_LLD_DIR)/Service/Tricore/Math \
-I$(TC4_LLD_DIR)/iLLD \
-I$(TC4_LLD_DIR)/iLLD/TC4xx \
-I$(TC4_LLD_DIR)/iLLD/TC4xx/CpuGeneric \
-I$(TC4_LLD_DIR)/iLLD/TC4xx/CpuGeneric/Ap \
-I$(TC4_LLD_DIR)/iLLD/TC4xx/CpuGeneric/Ap/Std \
-I$(TC4_LLD_DIR)/iLLD/TC4xx/CpuGeneric/Asclin \
-I$(TC4_LLD_DIR)/iLLD/TC4xx/CpuGeneric/Asclin/Asc \
-I$(TC4_LLD_DIR)/iLLD/TC4xx/CpuGeneric/Asclin/Std \
-I$(TC4_LLD_DIR)/iLLD/TC4xx/CpuGeneric/Clock \
-I$(TC4_LLD_DIR)/iLLD/TC4xx/CpuGeneric/Clock/Std \
-I$(TC4_LLD_DIR)/iLLD/TC4xx/CpuGeneric/Egtm \
-I$(TC4_LLD_DIR)/iLLD/TC4xx/CpuGeneric/Egtm/Std \
-I$(TC4_LLD_DIR)/iLLD/TC4xx/CpuGeneric/Geth \
-I$(TC4_LLD_DIR)/iLLD/TC4xx/CpuGeneric/Geth/Std \
-I$(TC4_LLD_DIR)/iLLD/TC4xx/CpuGeneric/Port \
-I$(TC4_LLD_DIR)/iLLD/TC4xx/CpuGeneric/Port/Std \
-I$(TC4_LLD_DIR)/iLLD/TC4xx/CpuGeneric/Src \
-I$(TC4_LLD_DIR)/iLLD/TC4xx/CpuGeneric/Src/Std \
-I$(TC4_LLD_DIR)/iLLD/TC4xx/CpuGeneric/_Impl \
-I$(TC4_LLD_DIR)/iLLD/TC4xx/CpuGeneric/_Impl/$(DEV_DERIV) \
-I$(TC4_LLD_DIR)/iLLD/TC4xx/CpuGeneric/_Lib \
-I$(TC4_LLD_DIR)/iLLD/TC4xx/CpuGeneric/_Lib/DataHandling \
-I$(TC4_LLD_DIR)/iLLD/TC4xx/CpuGeneric/_Lib/Timer \
-I$(TC4_LLD_DIR)/iLLD/TC4xx/CpuGeneric/_PinMap \
-I$(TC4_LLD_DIR)/iLLD/TC4xx/CpuGeneric/_PinMap/$(DEV_DERIV) \
-I$(TC4_LLD_DIR)/iLLD/TC4xx/Tricore \
-I$(TC4_LLD_DIR)/iLLD/TC4xx/Tricore/Cpu \
-I$(TC4_LLD_DIR)/iLLD/TC4xx/Tricore/Cpu/Irq \
-I$(TC4_LLD_DIR)/iLLD/TC4xx/Tricore/Cpu/Std \
-I$(TC4_LLD_DIR)/iLLD/TC4xx/Tricore/Cpu/Trap \
-I$(TC4_LLD_DIR)/iLLD/TC4xx/Tricore/Flash/Std \
-I$(TC4_LLD_DIR)/iLLD/TC4xx/Tricore/Smu \
-I$(TC4_LLD_DIR)/iLLD/TC4xx/Tricore/Smu/Std \
-I$(TC4_LLD_DIR)/iLLD/TC4xx/Tricore/Stm \
-I$(TC4_LLD_DIR)/iLLD/TC4xx/Tricore/Stm/Std \
-I$(TC4_LLD_DIR)/iLLD/TC4xx/Tricore/Vmt \
-I$(TC4_LLD_DIR)/iLLD/TC4xx/Tricore/Vmt/Std \
-I$(TC4_LLD_DIR)/iLLD/TC4xx/Tricore/Wtu \
-I$(TC4_LLD_DIR)/iLLD/TC4xx/Tricore/Wtu/Std \
-I$(TC4_LLD_DIR)/iLLD/TC4xx/Tricore/_Impl \
-I$(TC4_LLD_DIR)/iLLD/TC4xx/Tricore/_Impl/$(DEV_DERIV)

# No TriCore asm in wolfCrypt
MATH_OBJS+=$(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/sp_c32.o
Expand Down Expand Up @@ -3545,45 +3467,11 @@ ifeq ($(ARCH), AURIX)
# such that the binary image can be contiguous
OBJCOPY_FLAGS+=-R '.bmhd*' -R '.usercfg*' -R '.csusercfg*' -R '.sdata4' -R '.sdata' -R '.zdata'

# iLLD startup software and drivers used by the HAL.
TC4_LLD_SRCS := \
$(wildcard $(TC4_LLD_DIR)/Infra/Platform/Compilers/*.c) \
$(TC4_LLD_DIR)/Infra/Ssw/TC4xx/Tricore/Ifx_Ssw_Infra.c \
$(wildcard $(TC4_LLD_DIR)/iLLD/TC4xx/CpuGeneric/Ap/Std/*.c) \
$(wildcard $(TC4_LLD_DIR)/iLLD/TC4xx/CpuGeneric/Asclin/Std/*.c) \
$(wildcard $(TC4_LLD_DIR)/iLLD/TC4xx/CpuGeneric/Clock/Std/*.c) \
$(wildcard $(TC4_LLD_DIR)/iLLD/TC4xx/CpuGeneric/Port/Std/*.c) \
$(wildcard $(TC4_LLD_DIR)/iLLD/TC4xx/CpuGeneric/Src/Std/*.c) \
$(wildcard $(TC4_LLD_DIR)/iLLD/TC4xx/CpuGeneric/_Impl/*.c) \
$(wildcard $(TC4_LLD_DIR)/iLLD/TC4xx/CpuGeneric/_Impl/$(DEV_DERIV)/*.c) \
$(wildcard $(TC4_LLD_DIR)/iLLD/TC4xx/CpuGeneric/_PinMap/IfxAsclin_PinMap*.c) \
$(wildcard $(TC4_LLD_DIR)/iLLD/TC4xx/CpuGeneric/_PinMap/$(DEV_DERIV)/IfxAsclin_PinMap*.c) \
$(wildcard $(TC4_LLD_DIR)/iLLD/TC4xx/Tricore/Cpu/Std/*.c) \
$(wildcard $(TC4_LLD_DIR)/iLLD/TC4xx/Tricore/Stm/Std/*.c) \
$(wildcard $(TC4_LLD_DIR)/iLLD/TC4xx/Tricore/Wtu/Std/*.c) \
$(wildcard $(TC4_LLD_DIR)/iLLD/TC4xx/Tricore/_Impl/*.c)

# wolfLLD startup and drivers, entry glue and boot mode headers
ifeq ($(TARGET), aurix_tc4xx_csrm)
# CSRM (CPU6) startup software + trap table
TC4_LLD_SRCS += \
$(TC4_LLD_DIR)/Infra/Ssw/TC4xx/Csrm/Ifx_Ssw_Tc6.c \
$(TC4_LLD_DIR)/iLLD/TC4xx/Csrm/Cpu/Trap/IfxCpu_Trap_Cs.c
OBJS += $(TC4_LLD_SRCS:.c=.o)
OBJS += $(TC4_WB_DIR)/csrm/Cfg_Ssw/Ifx_Cfg_Ssw.o \
$(TC4_WB_DIR)/csrm/Cfg_Ssw/Ifx_Cfg_SswBmhdCs.o \
$(TC4_WB_DIR)/csrm/tc4_wolfboot_csrm_main.o
OBJS += $(TCHSM_WB_CSRM_LLD_OBJS) $(TCHSM_WB_CSRM_OBJS)
else
# Host CPU0 startup software and trap table.
TC4_LLD_SRCS += \
$(TC4_LLD_DIR)/Infra/Ssw/TC4xx/Tricore/Ifx_Ssw_Tc0.c \
$(wildcard $(TC4_LLD_DIR)/iLLD/TC4xx/Tricore/Cpu/Irq/*.c) \
$(wildcard $(TC4_LLD_DIR)/iLLD/TC4xx/Tricore/Cpu/Trap/*.c) \
$(wildcard $(TC4_LLD_DIR)/iLLD/TC4xx/Tricore/Smu/Std/*.c) \
$(wildcard $(TC4_LLD_DIR)/iLLD/TC4xx/Tricore/Vmt/Std/*.c)
OBJS += $(TC4_LLD_SRCS:.c=.o)
OBJS += $(TC4_WB_DIR)/Cfg_Ssw/Ifx_Cfg_Ssw.o \
$(TC4_WB_DIR)/Cfg_Ssw/Ifx_Cfg_SswBmhd.o \
$(TC4_WB_DIR)/tc4_wolfboot_main.o
OBJS += $(TCHSM_WB_HOST_LLD_OBJS) $(TCHSM_WB_HOST_OBJS)
endif
endif # TC4xx
endif
Expand Down
Loading
Loading