# wolfBoot configuration for NXP S32K144 # # S32K144: Cortex-M4F, 512KB Flash, 64KB SRAM # Flash sector size: 4KB (larger flash variants use 4KB sectors) # Default: RUN mode at 48 MHz (FIRC - internal RC oscillator) # # Build: cp config/examples/nxp-s32k144.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 # S32K1xx flash requires erase before write (cannot re-program same location) # This is required for sector swap trailer flag updates to work correctly NVM_FLASH_WRITEONCE?=1 WOLFBOOT_VERSION?=0 V?=0 SPMATH?=1 RAM_CODE?=1 DUALBANK_SWAP?=0 # Select S32K144 variant for correct flash size and sector size CFLAGS_EXTRA+=-DS32K144 # 4KB sectors (S32K144/146/148 with 512KB+ flash) WOLFBOOT_SECTOR_SIZE?=0x1000 # Memory layout for S32K144 (512KB Flash): # Bootloader: 0x00000000 - 0x0000BFFF (48 KB) # Boot Partition: 0x0000C000 - 0x00043FFF (224 KB) # Update Partition: 0x00044000 - 0x0007BFFF (224 KB) # Swap Sector: 0x0007C000 - 0x0007CFFF (4 KB) WOLFBOOT_PARTITION_SIZE?=0x38000 WOLFBOOT_PARTITION_BOOT_ADDRESS?=0xC000 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 # Flash Option Byte (FOPT) override (default 0xFF) # Example: disable RESET_PIN_CFG (use PTA5 as GPIO instead of RESET) #CFLAGS_EXTRA+=-DWOLFBOOT_FOPT=0xF7 # Debugging options (uncomment as needed) DEBUG?=0 DEBUG_SYMBOLS?=0 DEBUG_UART?=0 #CFLAGS_EXTRA+=-DDEBUG_HARDFAULT