-
Notifications
You must be signed in to change notification settings - Fork 147
Expand file tree
/
Copy pathpolarfire_mpfs250_qspi.config
More file actions
109 lines (90 loc) · 2.92 KB
/
polarfire_mpfs250_qspi.config
File metadata and controls
109 lines (90 loc) · 2.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
ARCH?=RISCV64
TARGET?=mpfs250
# ECC P384 + SHA384
SIGN?=ECC384
HASH?=SHA384
IMAGE_HEADER_SIZE=512
# ML-DSA 87 + SHA256
#SIGN=ML_DSA
#HASH=SHA256
#ML_DSA_LEVEL=5
#IMAGE_SIGNATURE_SIZE=4627
#IMAGE_HEADER_SIZE=12288
WOLFBOOT_VERSION?=1
ARMORED?=0
DEBUG?=0
DEBUG_SYMBOLS?=1
DEBUG_UART?=1
VTOR?=1
NO_XIP?=1
NVM_FLASH_WRITEONCE?=0
UART_FLASH?=0
V?=0
NO_MPU?=1
RAM_CODE?=0
SPMATH?=1
DUALBANK_SWAP?=0
PKA?=0
ENCRYPT=0
WOLFTPM?=0
ELF?=1
#DEBUG_ELF?=1
# Use RISC-V assembly version of ECDSA and SHA
NO_ASM?=0
# QSPI Flash Configuration
# Using Micron MT25QL01GBBB (128MB, 64KB sectors)
EXT_FLASH?=1
SPI_FLASH?=0
# SPI Flash Controller Selection:
# MPFS_SC_SPI: Use SC QSPI Controller (0x37020100) for fabric-connected flash.
# Direct register access to System Controller's QSPI instance.
# DEFAULT: Use MSS QSPI Controller (0x21000000) for external flash
# on MSS QSPI pins.
CFLAGS_EXTRA+=-DMPFS_SC_SPI
# Enable SD card temporarily (wolfBoot still loads from SD, apps from QSPI)
# For pure QSPI boot, HSS would need to load wolfBoot from QSPI
DISK_SDCARD?=0
DISK_EMMC?=0
# DDR Address for wolfBoot to start from
# Comes from hal/mpfs.yaml
WOLFBOOT_ORIGIN?=0x80000000
# DDR Address where application image will be loaded from flash
# Used by update_ram.c for non-XIP boot
# Must be well above wolfBoot's memory region
WOLFBOOT_LOAD_ADDRESS?=0x8E000000
# Flash geometry (64 KB sector)
WOLFBOOT_SECTOR_SIZE?=0x10000
# Partition layout for 128MB QSPI flash
# HSS Boot Info: 0x00000000 - 0x00000400 (1KB)
# wolfBoot partition: 0x00000400 - 0x0001FFFF (127KB)
# Boot partition: 0x00020000 - 0x01FFFFFF (~32MB)
# Update partition: 0x02000000 - 0x03FFFFFF (~32MB)
# Swap partition: 0x04000000 - 0x0400FFFF (64KB)
# Remaining: 0x04010000 - 0x07FFFFFF (~64MB available)
WOLFBOOT_PARTITION_SIZE?=0x1FE0000
WOLFBOOT_PARTITION_BOOT_ADDRESS?=0x20000
WOLFBOOT_PARTITION_UPDATE_ADDRESS?=0x2000000
WOLFBOOT_PARTITION_SWAP_ADDRESS?=0x4000000
# DTS (Device Tree)
WOLFBOOT_LOAD_DTS_ADDRESS?=0x8A000000
WOLFBOOT_DTS_BOOT_ADDRESS?=0x6000000 # DTS at 96MB (after swap)
WOLFBOOT_DTS_UPDATE_ADDRESS?=0x6010000 # DTS update at 96MB + 64KB
# Speed up reads from flash by using larger blocks
CFLAGS_EXTRA+=-DWOLFBOOT_SHA_BLOCK_SIZE=4096
# Optional Encryption
#CUSTOM_ENCRYPT_KEY=1
#ENCRYPT=1
#ENCRYPT_WITH_AES256=1
#OBJS_EXTRA=src/my_custom_encrypt_key.o
# Optional QSPI debugging
# Uncomment for verbose QSPI debug output
#CFLAGS_EXTRA+=-DDEBUG_QSPI
# Optional QSPI flash test (erase/write/read on update partition)
# Uncomment to run test during hal_init()
#CFLAGS_EXTRA+=-DTEST_EXT_FLASH
# UART QSPI programmer (disabled by default)
# When enabled, wolfBoot prompts on UART at startup to receive a signed firmware
# image and write it to QSPI flash -- no Libero/JTAG tool required for updates.
# Use: python3 tools/scripts/mpfs_qspi_prog.py <port> <image.bin> [qspi_offset]
# Requires EXT_FLASH=1 (already set) and DEBUG_UART=1.
UART_QSPI_PROGRAM?=0