wolfBoot/config/examples/mcxe247.config

76 lines
2.5 KiB
Plaintext

# wolfBoot configuration for NXP MCX E247 (FRDM-MCXE247)
#
# 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)
#
# Build: cp config/examples/mcxe247.config .config && make
ARCH?=ARM
CORTEX_M4?=1
NO_MPU=1
TARGET?=s32k1xx
SIGN?=ECC256
HASH?=SHA256
VTOR?=1
NO_ASM?=0
EXT_FLASH?=0
SPI_FLASH?=0
ALLOW_DOWNGRADE?=0
# Flash can be programmed only once between erases
NVM_FLASH_WRITEONCE?=1
WOLFBOOT_VERSION?=0
V?=0
SPMATH?=1
RAM_CODE?=1
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.
CFLAGS_EXTRA+=-DMCXE247 -DWOLFBOOT_RAM_ECC_INIT
# 4KB sectors
WOLFBOOT_SECTOR_SIZE?=0x1000
# Memory layout (Program Flash 0x00000000 - 0x0017FFFF):
# Bootloader: 0x00000000 - 0x0000BFFF (48 KB)
# Boot Partition: 0x0000C000 - 0x000C3FFF (736 KB)
# Update Partition: 0x000C4000 - 0x0017BFFF (736 KB)
# Swap Sector: 0x0017C000 - 0x0017CFFF (4 KB)
WOLFBOOT_PARTITION_SIZE?=0xB8000
WOLFBOOT_PARTITION_BOOT_ADDRESS?=0xC000
WOLFBOOT_PARTITION_UPDATE_ADDRESS?=0xC4000
WOLFBOOT_PARTITION_SWAP_ADDRESS?=0x17C000
# Console on the MCU-Link VCOM port: LPUART2, PTE12 (TX) and PTD17 (RX), ALT3
CFLAGS_EXTRA+=-DDEBUG_UART_NUM=2
CFLAGS_EXTRA+=-DDEBUG_UART_TX_PORT=S32K_PORT_E -DDEBUG_UART_TX_PIN=12
CFLAGS_EXTRA+=-DDEBUG_UART_TX_MUX=PORT_PCR_MUX_ALT3
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).
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
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
DEBUG_SYMBOLS?=0
DEBUG_UART?=1