ARCH=PPC
TARGET=nxp_p1021
SIGN?=ECC384
HASH?=SHA384
IMAGE_HEADER_SIZE?=512
DEBUG?=0
DEBUG_UART?=1
VTOR?=1
CORTEX_M0?=0
NO_ASM?=0
EXT_FLASH?=1
SPI_FLASH?=0
NO_XIP?=1
UART_FLASH?=0
ALLOW_DOWNGRADE?=0
NVM_FLASH_WRITEONCE?=0
WOLFBOOT_VERSION?=0
NO_MPU?=0
SPMATH?=0
SPMATHALL?=1
RAM_CODE?=0
DUALBANK_SWAP?=0
WOLFTPM?=0
ELF?=1

# Flash Sector (Block) Size (16KB)
WOLFBOOT_SECTOR_SIZE=0x4000

# Maximum size of wolfBoot stage 1 loader (can be increased for debugging)
# Needs to be 4KB 0x1000 to fit into boot ROM loaded region
WOLFBOOT_STAGE1_SIZE=0x1000

# wolfBoot partition size (128KB)
BOOTLOADER_PARTITION_SIZE=0x20000

# Application Partition Size (16MB)
WOLFBOOT_PARTITION_SIZE=0x1000000


## NAND Flash Offsets ##
# Location in Flash for stage 1 loader (XIP from boot ROM)
WOLFBOOT_STAGE1_FLASH_ADDR=0x0
# Location in Flash for wolfBoot
WOLFBOOT_ORIGIN=0x8000
# Location in Flash for Application Partition
WOLFBOOT_PARTITION_BOOT_ADDRESS=  0x200000
# Location in Flash for Update Partition
WOLFBOOT_PARTITION_UPDATE_ADDRESS=0x1200000
# Location in Flash for temporary sector used during updates
WOLFBOOT_PARTITION_SWAP_ADDRESS=  0x2200000

## Loader Destinations (DDR) ##

# Address in RAM to load stage 1 loader (can't be 0x0)
WOLFBOOT_STAGE1_BASE_ADDR=0x8000

# Address in RAM to load wolfBoot (end of DDR at 512MB-1MB)
WOLFBOOT_STAGE1_LOAD_ADDR=0x1FF00000

# Address in RAM to load application partition (at 480MB)
WOLFBOOT_LOAD_ADDRESS=0x1E000000

# Read from flash (must be multiple of NAND page size 512 bytes)
CFLAGS_EXTRA+=-DWOLFBOOT_SHA_BLOCK_SIZE=4096
