Skip to content
Draft
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
31 changes: 31 additions & 0 deletions config/examples/nxp-ls1028a.config
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,34 @@ WOLFBOOT_PARTITION_SWAP_ADDRESS?=0x20080000
WOLFBOOT_LOAD_DTS_ADDRESS?=0x80000000
WOLFBOOT_DTS_BOOT_ADDRESS?=0x20F00000
WOLFBOOT_DTS_UPDATE_ADDRESS?=0x20F00000

# -----------------------------------------------------------------------------
# wolfIP network test in the test-app (optional)
# -----------------------------------------------------------------------------
# Compiles the wolfIP TCP/IP stack + the NXP ENETC ethernet port into the
# test-app and runs a board-side network test (the test-app Makefile selects
# the nxp_enetc port automatically for TARGET=nxp_ls1028a). ENETC is a PCIe
# integrated-endpoint MAC discovered over ECAM; the driver needs no byte-swap
# (AArch64 LE) and no cache maintenance (wolfBoot runs this target with the
# MMU/D-cache off, so DMA memory is non-cacheable).
#
# wolfIP does not fit the default 256KB OCRAM load region, so load the app
# into DDR and enlarge the boot partition. Override the flash layout below
# (the defaults above target a minimal OCRAM-resident app):
#ENABLE_WOLFIP=1
#WOLFBOOT_LIB_WOLFIP=../lib/wolfip
#WOLFBOOT_PARTITION_SIZE=0x100000
#WOLFBOOT_PARTITION_BOOT_ADDRESS=0x20100000
#WOLFBOOT_PARTITION_UPDATE_ADDRESS=0x20300000
#WOLFBOOT_PARTITION_SWAP_ADDRESS=0x20500000
# Load (and run) the app from DDR rather than OCRAM:
#WOLFBOOT_LOAD_ADDRESS=0x80100000
# Set the PHY interface for the board if it differs from port0 SGMII (the
# nxp_enetc_board.h default); RGMII boards set NXP_ENETC_IF_SGMII=0.
#CFLAGS_EXTRA+=-DNXP_ENETC_IF_SGMII=0
# Test mode (default with neither flag = acquire a DHCP lease and stop):
# WOLFBOOT_TEST_TFTP=1 RRQ a file from a host tftpd, report size+checksum
# (set CFLAGS_EXTRA TFTP_EXPECT_SIZE/TFTP_EXPECT_SUM to verify)
# WOLFIP_SPEED_TEST=1 TCP throughput server on port 9 (drive with nc/dd/pv)
#WOLFBOOT_TEST_TFTP=1
#WOLFIP_SPEED_TEST=1
25 changes: 25 additions & 0 deletions config/examples/nxp-t1024.config
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,28 @@ WOLFBOOT_LOAD_DTS_ADDRESS?=0x7F100000

# Load to RAM before hash and verify
CFLAGS_EXTRA+=-DWOLFBOOT_USE_RAMBOOT

# -----------------------------------------------------------------------------
# wolfIP network test in the test-app (optional)
# -----------------------------------------------------------------------------
# Compiles the wolfIP TCP/IP stack + the NXP QorIQ FMan ethernet port
# (mEMAC/MDIO, FM1@DTSEC1) into the test-app and runs a board-side network
# test. The T1024 (e5500) reuses the same nxp_fman driver as the T2080/T1040;
# the default CCSRBAR is the reset value 0xFE000000 (no BOARD_CW_VPX3152
# relocate). Build the app FLAT and 32-bit (ELF=0) at a low load address --
# the elf32 load path is not used here. The wolfIP objects are built -fno-plt
# -D_FORTIFY_SOURCE=0 (the test-app does no PLT/GOT runtime fixup).
# Point WOLFBOOT_LIB_WOLFIP at a wolfIP checkout (or add it as lib/wolfip).
#ENABLE_WOLFIP=1
#WOLFBOOT_LIB_WOLFIP=../lib/wolfip
#ELF=0
#WOLFBOOT_LOAD_ADDRESS=0x100000
# Set the PHY interface for the T1024 board if it differs from FM1@DTSEC1
# SGMII (the nxp_fman_board.h default); RGMII boards set NXP_FMAN_IF_SGMII=0.
#CFLAGS_EXTRA+=-DNXP_FMAN_IF_SGMII=0
# Test mode (default with neither flag = acquire a DHCP lease and stop):
# WOLFBOOT_TEST_TFTP=1 RRQ a file from a host tftpd, report size+checksum
# (set CFLAGS_EXTRA TFTP_EXPECT_SIZE/TFTP_EXPECT_SUM to verify)
# WOLFIP_SPEED_TEST=1 TCP throughput server on port 9 (drive with nc/dd/pv)
#WOLFBOOT_TEST_TFTP=1
#WOLFIP_SPEED_TEST=1
34 changes: 34 additions & 0 deletions config/examples/nxp-t1040.config
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,37 @@ WOLFBOOT_LOAD_DTS_ADDRESS?=0x7F100000

# Load to RAM before hash and verify
CFLAGS_EXTRA+=-DWOLFBOOT_USE_RAMBOOT

# -----------------------------------------------------------------------------
# wolfIP network test in the test-app (optional)
# -----------------------------------------------------------------------------
# Compiles the wolfIP TCP/IP stack + the NXP QorIQ FMan ethernet port
# (mEMAC/MDIO, FM1@DTSEC1) into the test-app and runs a board-side network
# test. The T1040 (e5500) reuses the same nxp_fman driver as the T2080; the
# default CCSRBAR is the reset value 0xFE000000 (no BOARD_CW_VPX3152 relocate).
# Build the app FLAT and 32-bit (ELF=0) at a low load address -- the elf32
# load path is not used here. The wolfIP objects are built -fno-plt
# -D_FORTIFY_SOURCE=0 (the test-app does no PLT/GOT runtime fixup).
# Point WOLFBOOT_LIB_WOLFIP at a wolfIP checkout (or add it as lib/wolfip).
#ENABLE_WOLFIP=1
#WOLFBOOT_LIB_WOLFIP=../lib/wolfip
#ELF=0
#WOLFBOOT_LOAD_ADDRESS=0x100000
# PHY wiring. The nxp_fman default is FM1@DTSEC1 SGMII, PHY probed at addr 0x2.
# On the T1040D4RDB the cabled front port "ETH0" is FM1@DTSEC4 (ethernet@e6000),
# RGMII, with a Realtek RTL8211 PHY (id 0x001CC915) at MDIO addr 4 -- verified
# on hardware (DHCP lease, WOLFIP_TEST: PASS). DTSEC1/2 are fixed-link to the
# on-board L2 switch (no PHY). Uncomment for the RDB ETH0 port:
#CFLAGS_EXTRA+=-DNXP_FMAN_MEMAC_IDX=4
#CFLAGS_EXTRA+=-DNXP_FMAN_IF_SGMII=0
#CFLAGS_EXTRA+=-DNXP_FMAN_PHY_ADDR=4
# To identify the cabled port on a different board, enable the MDIO bus scan:
# it prints ID1/ID2/BSR for every address after init; the one with link=UP is
# the wired port (BSR bit 2). Diagnostic only.
#CFLAGS_EXTRA+=-DWOLFIP_PHY_SCAN
# Test mode (default with neither flag = acquire a DHCP lease and stop):
# WOLFBOOT_TEST_TFTP=1 RRQ a file from a host tftpd, report size+checksum
# (set CFLAGS_EXTRA TFTP_EXPECT_SIZE/TFTP_EXPECT_SUM to verify)
# WOLFIP_SPEED_TEST=1 TCP throughput server on port 9 (drive with nc/dd/pv)
#WOLFBOOT_TEST_TFTP=1
#WOLFIP_SPEED_TEST=1
34 changes: 34 additions & 0 deletions config/examples/nxp-t2080.config
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,37 @@ WOLFBOOT_LOAD_DTS_ADDRESS?=0x200000
# wolfCrypt Test and Benchmark (requires larger partition size)
#WOLFCRYPT_TEST?=1
#WOLFCRYPT_BENCHMARK?=1

# -----------------------------------------------------------------------------
# wolfIP network test in the test-app (optional)
# -----------------------------------------------------------------------------
# Compiles the wolfIP TCP/IP stack + the NXP QorIQ FMan ethernet port
# (mEMAC/MDIO/SGMII, FM1@DTSEC1) into the test-app and runs a board-side
# network test. Build the app FLAT and 32-bit (ELF=0, OS_64BIT=0) at a low
# load address (WOLFBOOT_LOAD_ADDRESS=0x100000) -- the elf32 load path and
# the 64-bit RTOS handoff are not used here. The wolfIP objects are built
# -fno-plt -D_FORTIFY_SOURCE=0 (the test-app does no PLT/GOT runtime fixup).
# Point WOLFBOOT_LIB_WOLFIP at a wolfIP checkout (or add it as lib/wolfip).
#ENABLE_WOLFIP=1
#WOLFBOOT_LIB_WOLFIP=../lib/wolfip
# Test mode (default with neither flag = acquire a DHCP lease and stop):
# WOLFBOOT_TEST_TFTP=1 RRQ a file from a host tftpd, report size+checksum
# (set CFLAGS_EXTRA TFTP_EXPECT_SIZE/TFTP_EXPECT_SUM to verify)
# WOLFIP_SPEED_TEST=1 TCP throughput server on port 9 (drive with nc/dd/pv)
#WOLFBOOT_TEST_TFTP=1
#WOLFIP_SPEED_TEST=1
#
# Per-board wolfIP ethernet wiring (defaults above are CW VPX3-152 / RDB =
# FM1@DTSEC1, SGMII, PHY probed at addr 0x2). Override per the board device
# tree if the wired port differs:
#
# NAII 68PPC2 (hardware-verified): PRIME port is FM1@DTSEC3 = RGMII with the
# Marvell PHY at MDIO addr 0 (68ppc2.dts ethernet@e4000: phy-connection-type
# "rgmii-id", phy-handle -> ethernet-phy@0 reg <0>). The MDIO scan would
# otherwise grab DTSEC4's PHY at addr 1, so set the address explicitly:
#CFLAGS_EXTRA+=-DNXP_FMAN_MEMAC_IDX=3
#CFLAGS_EXTRA+=-DNXP_FMAN_IF_SGMII=0
#CFLAGS_EXTRA+=-DNXP_FMAN_PHY_ADDR=0
#
# NAII NOR is dual-bank with only the top 128KB boot sector common to both
# banks; flash the ucode/app with the boot-bank select in its runtime state.
13 changes: 13 additions & 0 deletions docs/Targets.md
Original file line number Diff line number Diff line change
Expand Up @@ -5918,6 +5918,19 @@ variants are supported:
Example configuration: [/config/examples/nxp-t2080.config](/config/examples/nxp-t2080.config).
See [Board Selection](#board-selection) below for per-board setup.

> **FMan microcode (DPAA/wolfIP):** when DPAA/FMan is enabled, wolfBoot
> uploads the FMan microcode from NOR at `FMAN_FW_ADDR` (`hal/nxp_t2080.c`).
> This default is board-gated: CW VPX3-152 (256 MB NOR) uses `0xFFE60000`;
> the T2080 RDB and NAII 68PPC2 (128 MB NOR at `0xE8000000`) use `0xEFF00000`
> (just below the wolfBoot region, like the T1040 RDB). The address is
> bounds-checked against the NOR window, so a wrong value fails gracefully
> instead of machine-checking. Flash the matching `fsl_fman_ucode_*` blob at
> that address. wolfIP-on-FMan is hardware-verified on the CW VPX3-152
> (FM1@DTSEC1, SGMII) and the NAII 68PPC2 (FM1@DTSEC3, RGMII, PHY @ addr 0 --
> see the wolfIP block in the example config). NAII NOR is dual-bank with only
> the top 128 KB boot sector common to both banks, so flash the ucode/app with
> the boot-bank select in its runtime state.

### Design NXP T2080 PPC

The QorIQ requires a Reset Configuration Word (RCW) to define the boot parameters, which resides at the start of the flash (`0xE8000000` for 128 MB boards, `0xF0000000` for the 256 MB CW VPX3-152).
Expand Down
4 changes: 2 additions & 2 deletions hal/nxp_t10xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -3293,9 +3293,9 @@ int hal_flash_write(uint32_t address, const uint8_t *data, int len)
for (i=0; i<nwords; i++) {
const uint8_t* ptr = &data[pos];
#if FLASH_CFI_WIDTH == 16
FLASH_IO16_WRITE(sector, i, *((const uint16_t*)ptr));
FLASH_IO16_WRITE(sector, offset + i, *((const uint16_t*)ptr));
#else
FLASH_IO8_WRITE(sector, i, *ptr);
FLASH_IO8_WRITE(sector, offset + i, *ptr);
#endif
pos += (FLASH_CFI_WIDTH/8);
}
Expand Down
25 changes: 25 additions & 0 deletions hal/nxp_t2080.c
Original file line number Diff line number Diff line change
Expand Up @@ -582,8 +582,18 @@ static void hal_cpld_init(void)
/* FMAN microcode upload for T2080.
* Firmware is in NOR flash at FMAN_FW_ADDR (typically 0xFFE60000).
* Uses same QE firmware format as T1040. */
/* FMan microcode NOR address. Board-specific: the CW VPX3-152 relocates NOR
* to 0xF0000000 (256MB) and keeps the ucode near the top; the T2080 RDB and
* NAII 68PPC2 have a 128MB NOR at 0xE8000000 with the ucode just below the
* wolfBoot region (matches the T1040 RDB). A wrong address here is read in
* hal_fman_init() and an out-of-NOR value machine-checks, so the default is
* board-gated and bounds-checked at runtime. */
#ifndef FMAN_FW_ADDR
#ifdef BOARD_CW_VPX3152
#define FMAN_FW_ADDR 0xFFE60000UL
#else
#define FMAN_FW_ADDR 0xEFF00000UL
#endif
#endif
#define FMAN_BASE (CCSRBAR + 0x400000UL)
#define FMAN_IRAM (FMAN_BASE + 0xC4000UL)
Expand Down Expand Up @@ -643,6 +653,21 @@ static int hal_fman_init(void)
const struct qe_header *hdr = &fw->header;
unsigned int i;

/* Guard: FMAN_FW_ADDR must lie inside the NOR flash window, else the
* magic read below faults (machine check) -- e.g. a wrong board's
* address on a smaller NOR. Fail gracefully instead. Compare via the
* offset from the base (not base+size) so the upper bound does not
* overflow uintptr_t on a 256 MB NOR mapped at the top of the 32-bit
* address space (CW VPX3-152: 0xF0000000 + 256 MB wraps to 0). The
* first clause guarantees addr >= base, so the subtraction is safe. */
if ((uintptr_t)FMAN_FW_ADDR < (uintptr_t)FLASH_BASE_ADDR ||
((uintptr_t)FMAN_FW_ADDR - (uintptr_t)FLASH_BASE_ADDR) >=
(uintptr_t)FLASH_BANK_SIZE) {
wolfBoot_printf("FMAN: fw addr 0x%x outside NOR, skipping\n",
(unsigned)FMAN_FW_ADDR);
return -1;
}

/* Check firmware magic */
if (hdr->magic[0] != 'Q' || hdr->magic[1] != 'E' || hdr->magic[2] != 'F') {
wolfBoot_printf("FMAN: no firmware at 0x%x\n", FMAN_FW_ADDR);
Expand Down
22 changes: 16 additions & 6 deletions src/update_ram.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ extern uint32_t kernel_load_addr;
extern uint32_t dts_load_addr;

#if defined(__WOLFBOOT) && defined(WOLFBOOT_LOAD_ADDRESS)
extern uint8_t _end[]; /* linker symbol: end of wolfBoot BSS */
extern uint8_t _end[]; /* linker symbol: end of wolfBoot BSS */
extern uint8_t _start_text[]; /* linker symbol: start of wolfBoot text */
#endif

#if ((defined(EXT_FLASH) && defined(NO_XIP)) || \
Expand All @@ -67,6 +68,9 @@ int wolfBoot_ramboot(struct wolfBoot_image *img, uint8_t *src, uint8_t *dst)
{
int ret;
uint32_t img_size;
#if defined(__WOLFBOOT) && defined(WOLFBOOT_LOAD_ADDRESS)
uint8_t *img_end;
#endif
BENCHMARK_DECLARE();

/* read header into RAM */
Expand Down Expand Up @@ -114,11 +118,17 @@ int wolfBoot_ramboot(struct wolfBoot_image *img, uint8_t *src, uint8_t *dst)
#endif

#if defined(__WOLFBOOT) && defined(WOLFBOOT_LOAD_ADDRESS)
/* Runtime overlap check: ensure image destination does not overwrite
* wolfBoot's own code/data/bss in RAM. */
if ((uintptr_t)dst < (uintptr_t)_end) {
wolfBoot_printf("Error: image dest %p overlaps wolfBoot end %p\n",
dst, _end);
/* Runtime overlap check: ensure the image load region does not intersect
* wolfBoot's own code/data/bss in RAM. Full interval-overlap test (not
* just dst < _end) so it is correct whether wolfBoot is relocated to the
* bottom of RAM (image loads above it) or to the top -- the T1040/T1024
* two-stage boot relocates wolfBoot near the 2GB DDR top and the image
* loads low. wolfBoot occupies [_start_text, _end]. */
img_end = dst + IMAGE_HEADER_SIZE + img_size;
if ((uintptr_t)dst < (uintptr_t)_end &&
(uintptr_t)img_end > (uintptr_t)_start_text) {
wolfBoot_printf("Error: image %p..%p overlaps wolfBoot %p..%p\n",
dst, img_end, _start_text, _end);
return -1;
}
#endif
Expand Down
74 changes: 71 additions & 3 deletions test-app/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@

WOLFBOOT_LIB_WOLFSSL?=../lib/wolfssl
WOLFBOOT_LIB_WOLFTPM?=../lib/wolfTPM
WOLFBOOT_LIB_WOLFIP?=../lib/wolfip
WOLFSSL_LOCAL_OBJDIR?=wolfssl_obj
WOLFTPM_LOCAL_OBJDIR?=wolftpm_obj
WOLFIP_LOCAL_OBJDIR?=wolfip_obj
vpath %.c $(WOLFBOOT_LIB_WOLFSSL)
vpath %.S $(WOLFBOOT_LIB_WOLFSSL)
vpath %.c $(WOLFBOOT_LIB_WOLFTPM)
vpath %.S $(WOLFBOOT_LIB_WOLFTPM)
vpath %.c $(WOLFBOOT_LIB_WOLFIP)

WOLFBOOT_ROOT?=..
TARGET?=none
Expand Down Expand Up @@ -593,8 +596,6 @@ ifeq ($(TARGET),nxp_t2080)
ifneq ($(SIGN),NONE)
APP_OBJS+=../src/keystore.o
endif
CFLAGS+=-ffunction-sections -fdata-sections

# PowerPC e6500
PPC64=1
endif
Expand Down Expand Up @@ -1094,6 +1095,60 @@ endif
WOLFSSL_CFLAGS:=$(CFLAGS)
WOLFTPM_CFLAGS:=$(CFLAGS)

# Optional wolfIP network stack in the test-app.
# ENABLE_WOLFIP=1 compile the wolfIP ethernet port (nxp_fman) and a
# link/PHY smoke test into the app.
# WOLFBOOT_TEST_TFTP=1 additionally pull in wolfIP core + TFTP client for
# the full network TFTP-fetch test.
# For local iteration point WOLFBOOT_LIB_WOLFIP at a wolfIP checkout, e.g.
# make WOLFBOOT_LIB_WOLFIP=/path/to/wolfip ENABLE_WOLFIP=1 ...
ifeq ($(ENABLE_WOLFIP),1)
# ENABLE_WOLFIP needs a wolfIP checkout at WOLFBOOT_LIB_WOLFIP. Fail early
# with a clear message rather than a confusing compile error later.
ifeq ($(wildcard $(WOLFBOOT_LIB_WOLFIP)/src/wolfip.c),)
$(error ENABLE_WOLFIP=1 but no wolfIP sources found at WOLFBOOT_LIB_WOLFIP=$(WOLFBOOT_LIB_WOLFIP). Set WOLFBOOT_LIB_WOLFIP to a wolfIP checkout, e.g. make WOLFBOOT_LIB_WOLFIP=/path/to/wolfip ENABLE_WOLFIP=1 ...)
endif
# Select the wolfIP ethernet port by target: LS1028A (AArch64) uses the
# ENETC port; the QorIQ PowerPC parts use the FMan port.
ifeq ($(TARGET),nxp_ls1028a)
WOLFIP_PORT:=nxp_enetc
WOLFIP_PORT_OBJ:=nxp_enetc.o
CFLAGS+=-DWOLFIP_PORT_ENETC
else
WOLFIP_PORT:=nxp_fman
WOLFIP_PORT_OBJ:=nxp_fman.o
# The PowerPC test-app is a standalone binary whose _app_entry does no
# BSS-PLT fixup; -mbss-plt (arch.mk) would route cross-module libc calls
# (e.g. variable-size memcpy in the wolfIP driver) through an
# uninitialized PLT stub that branches to 0, and the cross-gcc's default
# _FORTIFY_SOURCE rewrites memcpy/memmove into __memcpy_chk/__memmove_chk
# (glibc symbols absent here -> R_PPC_JMP_SLOT imports with zero GOT
# slots). -fno-plt + fortify-off keep those calls direct and unfortified.
# Scoped to the wolfIP build so default (non-wolfIP) builds are unchanged.
CFLAGS+=-ffunction-sections -fdata-sections
CFLAGS+=-fno-plt -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
endif
WOLFIP_PORTDIR:=$(WOLFBOOT_LIB_WOLFIP)/src/port/$(WOLFIP_PORT)
CFLAGS+=-DENABLE_WOLFIP
# wolfIP core (wolfip.c) provides the stack incl. DHCP/ICMP/TCP/UDP.
WOLFIP_OBJS:=$(WOLFIP_PORTDIR)/$(WOLFIP_PORT_OBJ) \
$(WOLFBOOT_LIB_WOLFIP)/src/wolfip.o
ifeq ($(WOLFBOOT_TEST_TFTP),1)
CFLAGS+=-DWOLFBOOT_TEST_TFTP
WOLFIP_OBJS+=$(WOLFBOOT_LIB_WOLFIP)/src/tftp/wolftftp.o
endif
ifeq ($(WOLFIP_SPEED_TEST),1)
CFLAGS+=-DWOLFIP_SPEED_TEST
endif
APP_OBJS+=$(WOLFIP_OBJS) wolfip_tftp_test.o
# wolfIP TUs need the port headers first (so config.h resolves to the
# port copy) and tolerate wolfIP's own style; drop -Werror/-Wstack-usage.
WOLFIP_CFLAGS:=-I"$(WOLFIP_PORTDIR)" -I"$(WOLFBOOT_LIB_WOLFIP)" \
$(filter-out -Werror -Wstack-usage=$(STACK_USAGE_LIMIT),$(CFLAGS)) \
-DWOLFIP_ENABLE_TFTP=$(if $(filter 1,$(WOLFBOOT_TEST_TFTP)),1,0) \
-Wno-unused -Wno-sign-compare -Wno-missing-field-initializers
endif

ifeq ($(WOLFHSM_CLIENT),1)
CFLAGS += -DSTRING_USER -I"$(WOLFBOOT_LIB_WOLFSSL)"
APP_OBJS += $(WOLFHSM_OBJS)
Expand Down Expand Up @@ -1128,6 +1183,9 @@ image.srec: image.elf
APP_OBJS := $(patsubst $(WOLFBOOT_LIB_WOLFSSL)/%, \
$(WOLFSSL_LOCAL_OBJDIR)/%, $(APP_OBJS))

APP_OBJS := $(patsubst $(WOLFBOOT_LIB_WOLFIP)/%, \
$(WOLFIP_LOCAL_OBJDIR)/%, $(APP_OBJS))

ifeq ($(ELF_FLASH_SCATTER),1)
# When ELF_FLASH_SCATTER=1, preprocess the ELF file with the squashelf tool
SQUASHELF_TOOL = ../tools/squashelf/squashelf
Expand Down Expand Up @@ -1194,9 +1252,19 @@ $(WOLFTPM_LOCAL_OBJDIR)/%.o: %.S
$(Q)mkdir -p $(dir $@)
$(Q)$(CC) $(WOLFTPM_CFLAGS) -c $(OUTPUT_FLAG) $@ $<

$(WOLFIP_LOCAL_OBJDIR)/%.o: %.c
@echo "\t[CC-$(ARCH)] $@"
$(Q)mkdir -p $(dir $@)
$(Q)$(CC) $(WOLFIP_CFLAGS) -c $(OUTPUT_FLAG) $@ $<

# Local test-app wolfIP glue, built with the wolfIP include/flag set.
wolfip_tftp_test.o: wolfip_tftp_test.c
@echo "\t[CC-$(ARCH)] $@"
$(Q)$(CC) $(WOLFIP_CFLAGS) -c $(OUTPUT_FLAG) $@ $<

clean:
$(Q)rm -f *.bin *.elf tags *.o $(LSCRIPT) $(APP_OBJS) wcs/*.o
$(Q)rm -rf $(WOLFSSL_LOCAL_OBJDIR) $(WOLFTPM_LOCAL_OBJDIR)
$(Q)rm -rf $(WOLFSSL_LOCAL_OBJDIR) $(WOLFTPM_LOCAL_OBJDIR) $(WOLFIP_LOCAL_OBJDIR)

$(LSCRIPT): $(LSCRIPT_TEMPLATE) FORCE
$(Q)printf "%d" $(WOLFBOOT_PARTITION_BOOT_ADDRESS) > .wolfboot-offset
Expand Down
Loading
Loading