Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
c0dc2f3
mcxe247: standalone interrupt-driven wolfIP driver, TCP/UDP speed test
twcook86 Nov 13, 2026
2881d23
mcxe247: stop the speed test with Ctrl-C, harden the UDP tests
twcook86 Nov 13, 2026
b90528a
mcxe247: build wolfIP without -ffreestanding
twcook86 Nov 13, 2026
edd15f8
improve FAST_MEMCPY with word copies and cortex-m unaligned reads
twcook86 Nov 15, 2026
57c87bd
run cpu at 80 MHz and turn on flash code cache
twcook86 Nov 16, 2026
6605057
mcxe247: build wolfIP with -O2 and a poll budget of 8
twcook86 Nov 16, 2026
fffc89b
wolfip_speed.py: receive in the sender thread for UDP bidir
twcook86 Nov 16, 2026
100ce04
mcxe247: make the wolfIP speed test the default network test
twcook86 Nov 16, 2026
98360f1
mcxe247: run memcpy and the wolfIP checksum from SRAM_L
twcook86 Nov 16, 2026
3b87042
mcxe247: run the wolfIP speed test in HSRUN at 112 MHz
twcook86 Nov 16, 2026
87bf65c
string: post-increment the FAST_MEMCPY word loop
twcook86 Nov 16, 2026
4a86def
wolfip speed test: fix review findings in the server and host script
twcook86 Nov 17, 2026
f690dfb
fix xmodem issues
twcook86 Nov 25, 2026
76dd55e
Address pr comments
twcook86 Dec 1, 2026
36fd998
mcxe247: make the unaligned memcpy opt-in, fix review nits
twcook86 Dec 1, 2026
96d5055
minor fix
twcook86 Dec 1, 2026
d60f52d
fix xmodem eot issue
twcook86 Dec 1, 2026
579f07f
mcxe247: fix review findings in clock and speed test
twcook86 Dec 2, 2026
6792247
mcxe247: address review findings
twcook86 Dec 3, 2026
e94374b
mcxe247: count the pass that ends a speed test, bound low-rate waits
twcook86 Dec 3, 2026
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,9 @@ tools/unit-tests/unit-pkcs11_store
tools/unit-tests/unit-sectorflags
tools/unit-tests/unit-spi-flash
tools/unit-tests/unit-string
tools/unit-tests/unit-string-unaligned
tools/unit-tests/unit-wolfip-speed
tools/unit-tests/unit-xmodem-rx
tools/unit-tests/unit-update-flash
tools/unit-tests/unit-update-flash-enc
tools/unit-tests/unit-update-flash-enc-cache
Expand Down
52 changes: 39 additions & 13 deletions config/examples/mcxe247.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
#
# MCXE247: Cortex-M4F, 2MB flash (1.5MB Program Flash + 512KB FlexNVM), 256KB
# SRAM. It is register compatible with the S32K148 and uses the s32k1xx HAL.
# Default: RUN mode at 48 MHz (FIRC - internal RC oscillator)
# Default: RUN mode at 80 MHz (crystal + SPLL); the wolfIP speed test uses HSRUN
# at 112 MHz.
#
# Build: cp config/examples/mcxe247.config .config && make

Expand Down Expand Up @@ -30,12 +31,38 @@ DUALBANK_SWAP?=0
# Select the MCXE247 variant. SRAM is ECC protected and holds no valid ECC after
# power-on. WOLFBOOT_RAM_ECC_INIT clears the SRAM the bootloader uses
# (0x1FFFC000-0x20002FFF) at reset so its ECC is valid. The rest of SRAM is the
# application's to initialize.
# application's to initialize (see APP_RAM_ECC_INIT).
CFLAGS_EXTRA+=-DMCXE247 -DWOLFBOOT_RAM_ECC_INIT

# Word-at-a-time memcpy/memset in src/string.c (bootloader and test-app). The
# Cortex-M4 loads unaligned words from RAM and flash, so with
# FAST_MEMCPY_UNALIGNED memcpy copies words even when source and destination
# alignments differ; about doubles the wolfIP network test rates. Nothing on
# this target copies from peripheral registers with memcpy.
CFLAGS_EXTRA+=-DFAST_MEMCPY -DFAST_MEMCPY_UNALIGNED

# Run at 80 MHz from the 8 MHz crystal (SOSC + SPLL) with the 4 KB flash code
# cache on. Before it starts the application wolfBoot turns the cache off
# (it stays on only if its invalidate times out) and hands over on the 8 MHz
# SIRC with the FIRC off (WOLFBOOT_RESTORE_CLOCK, the default), or on the
# 48 MHz FIRC with WOLFBOOT_RESTORE_CLOCK=0; the test-app then switches both
# on again.
# Remove to run from the 48 MHz internal oscillator.
CFLAGS_EXTRA+=-DS32K1XX_CLOCK_80MHZ -DS32K1XX_CODE_CACHE

# The wolfIP speed test runs in HSRUN at 112 MHz (bus 56 MHz, flash 28 MHz)
# and returns to RUN at 80 MHz when it stops. Flash cannot be programmed in
# HSRUN, so the console commands that write flash run at 80 MHz.
CFLAGS_EXTRA+=-DS32K1XX_HSRUN_SPEED_TEST

# 4KB sectors
WOLFBOOT_SECTOR_SIZE?=0x1000

# The application's vector table follows the image header and is used in
# place (VTOR). The table must be 1 KB aligned, or the core fetches the vectors
# of IRQ 48 and up from the wrong slots.
IMAGE_HEADER_SIZE?=1024

# Memory layout (Program Flash 0x00000000 - 0x0017FFFF):
# Bootloader: 0x00000000 - 0x0000BFFF (48 KB)
# Boot Partition: 0x0000C000 - 0x000C3FFF (736 KB)
Expand All @@ -54,20 +81,19 @@ CFLAGS_EXTRA+=-DDEBUG_UART_RX_PORT=S32K_PORT_D -DDEBUG_UART_RX_PIN=17
CFLAGS_EXTRA+=-DDEBUG_UART_RX_MUX=PORT_PCR_MUX_ALT3

# wolfIP network test in the test-app (optional)
# Adds the "network" console command. Needs a wolfIP checkout and an MCUXpresso
# SDK (for the fsl_enet driver).
# Adds the "network" console command. Needs a wolfIP checkout with the
# nxp_mcxe_enet driver.
ENABLE_WOLFIP?=0
WOLFBOOT_LIB_WOLFIP?=../lib/wolfip
MCUXPRESSO?=$(PWD)/../NXP/mcuxpresso-sdk/mcuxsdk
# Without WOLFBOOT_TEST_TFTP the command only acquires a DHCP lease. The file
# must fit the 40 KB receive buffer.
WOLFBOOT_TEST_TFTP?=1
# By default the command acquires a DHCP lease and runs a TCP and UDP
# throughput server on port 9, driven from the host by
# tools/scripts/wolfip_speed.py.
WOLFIP_SPEED_TEST?=1
# WOLFBOOT_TEST_TFTP=1 makes the command fetch a file over TFTP instead (it
# overrides WOLFIP_SPEED_TEST). The file must fit the 40 KB receive buffer.
# With both set to 0 the command only acquires a DHCP lease.
WOLFBOOT_TEST_TFTP?=0
CFLAGS_EXTRA+=-DHOST_IP_STR='"192.168.50.1"' -DTFTP_FILENAME='"wolfip_test.bin"'
# WOLFIP_SPEED_TEST=1 makes the command run a TCP throughput server on port 9
# instead (it never returns; reset the board to stop it). WOLFBOOT_TEST_TFTP
# overrides it: with both set to 1 the command runs the TFTP fetch and the speed
# server is never started.
WOLFIP_SPEED_TEST?=0

# Debugging options
DEBUG?=0
Expand Down
4 changes: 3 additions & 1 deletion config/examples/nxp-ls1028a.config
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ WOLFBOOT_DTS_UPDATE_ADDRESS?=0x20F00000
# Test mode (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)
# WOLFIP_SPEED_TEST=1 throughput server on port 9 (drive with
# tools/scripts/wolfip_speed.py; a raw TCP client
# sends 'r' first to only send, 't' to only receive)
#WOLFBOOT_TEST_TFTP=1
#WOLFIP_SPEED_TEST=1
2 changes: 0 additions & 2 deletions config/examples/nxp-s32k142.config
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ WOLFBOOT_PARTITION_UPDATE_ADDRESS?=0x25000
WOLFBOOT_PARTITION_SWAP_ADDRESS?=0x3E000

# Clock mode: Default is RUN mode with FIRC (48 MHz internal RC)
# To enable HSRUN mode (112 MHz), uncomment below (requires SOSC + SPLL, not fully implemented):
#CFLAGS_EXTRA+=-DS32K1XX_CLOCK_HSRUN

# Optionally enable watchdog
#CFLAGS_EXTRA+=-DWATCHDOG
Expand Down
2 changes: 0 additions & 2 deletions config/examples/nxp-s32k144.config
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ WOLFBOOT_PARTITION_UPDATE_ADDRESS?=0x44000
WOLFBOOT_PARTITION_SWAP_ADDRESS?=0x7C000

# Clock mode: Default is RUN mode with FIRC (48 MHz internal RC)
# To enable HSRUN mode (112 MHz), uncomment below (requires SOSC + SPLL, not fully implemented):
#CFLAGS_EXTRA+=-DS32K1XX_CLOCK_HSRUN

# Optionally enable watchdog
#CFLAGS_EXTRA+=-DWATCHDOG
Expand Down
2 changes: 0 additions & 2 deletions config/examples/nxp-s32k146.config
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ WOLFBOOT_PARTITION_UPDATE_ADDRESS?=0x80000
WOLFBOOT_PARTITION_SWAP_ADDRESS?=0xF4000

# Clock mode: Default is RUN mode with FIRC (48 MHz internal RC)
# To enable HSRUN mode (112 MHz), uncomment below (requires SOSC + SPLL, not fully implemented):
#CFLAGS_EXTRA+=-DS32K1XX_CLOCK_HSRUN

# Optionally enable watchdog
#CFLAGS_EXTRA+=-DWATCHDOG
Expand Down
2 changes: 0 additions & 2 deletions config/examples/nxp-s32k148.config
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ WOLFBOOT_PARTITION_UPDATE_ADDRESS?=0xC4000
WOLFBOOT_PARTITION_SWAP_ADDRESS?=0x17C000

# Clock mode: Default is RUN mode with FIRC (48 MHz internal RC)
# To enable HSRUN mode (112 MHz), uncomment below (requires SOSC + SPLL, not fully implemented):
#CFLAGS_EXTRA+=-DS32K1XX_CLOCK_HSRUN

# Optionally enable watchdog
#CFLAGS_EXTRA+=-DWATCHDOG
Expand Down
4 changes: 3 additions & 1 deletion config/examples/nxp-t1024.config
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ CFLAGS_EXTRA+=-DWOLFBOOT_USE_RAMBOOT
# Test mode (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)
# WOLFIP_SPEED_TEST=1 throughput server on port 9 (drive with
# tools/scripts/wolfip_speed.py; a raw TCP client
# sends 'r' first to only send, 't' to only receive)
#WOLFBOOT_TEST_TFTP=1
#WOLFIP_SPEED_TEST=1
4 changes: 3 additions & 1 deletion config/examples/nxp-t1040.config
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ CFLAGS_EXTRA+=-DWOLFBOOT_USE_RAMBOOT
# Test mode (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)
# WOLFIP_SPEED_TEST=1 throughput server on port 9 (drive with
# tools/scripts/wolfip_speed.py; a raw TCP client
# sends 'r' first to only send, 't' to only receive)
#WOLFBOOT_TEST_TFTP=1
#WOLFIP_SPEED_TEST=1
4 changes: 3 additions & 1 deletion config/examples/nxp-t2080.config
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,9 @@ WOLFBOOT_LOAD_DTS_ADDRESS?=0x200000
# Test mode (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)
# WOLFIP_SPEED_TEST=1 throughput server on port 9 (drive with
# tools/scripts/wolfip_speed.py; a raw TCP client
# sends 'r' first to only send, 't' to only receive)
#WOLFBOOT_TEST_TFTP=1
#WOLFIP_SPEED_TEST=1
#
Expand Down
Loading
Loading