boards/stm32wl5/flash: add support to define bootloader partition
Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
This commit is contained in:
parent
5e75dd9be3
commit
7cb421e866
@ -46,6 +46,19 @@ comment "FLASH partitioning and mounting requires !DISABLE_MOUNTPOINT"
|
|||||||
|
|
||||||
if ARCH_BOARD_FLASH_MOUNT
|
if ARCH_BOARD_FLASH_MOUNT
|
||||||
|
|
||||||
|
config ARCH_BOARD_FLASH_BL_PROG_SIZE
|
||||||
|
int "Size reserved for bootloader program code"
|
||||||
|
default 0
|
||||||
|
---help---
|
||||||
|
How much memory to reserve for bootloader program code.
|
||||||
|
If you are using bootloader in your application, specify
|
||||||
|
max size of bootloader partition. This memory will be
|
||||||
|
reserved at the beginning of flash, and CPU1 progmem will
|
||||||
|
be right after bootloader.
|
||||||
|
|
||||||
|
If you don't use bootloader and just want to run program
|
||||||
|
directly after reset, set this to 0.
|
||||||
|
|
||||||
config ARCH_BOARD_FLASH_CPU1_PROG_SIZE
|
config ARCH_BOARD_FLASH_CPU1_PROG_SIZE
|
||||||
int "Size reserved for CPU1 program code"
|
int "Size reserved for CPU1 program code"
|
||||||
default 127
|
default 127
|
||||||
|
@ -41,6 +41,10 @@
|
|||||||
|
|
||||||
/* Define default values to silent compiler warning about undefined macro */
|
/* Define default values to silent compiler warning about undefined macro */
|
||||||
|
|
||||||
|
#ifndef CONFIG_ARCH_BOARD_FLASH_BL_PROG_SIZE
|
||||||
|
#define CONFIG_ARCH_BOARD_FLASH_BL_PROG_SIZE 0
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_ARCH_BOARD_FLASH_CPU1_PROG_SIZE
|
#ifndef CONFIG_ARCH_BOARD_FLASH_CPU1_PROG_SIZE
|
||||||
#define CONFIG_ARCH_BOARD_FLASH_CPU1_PROG_SIZE 0
|
#define CONFIG_ARCH_BOARD_FLASH_CPU1_PROG_SIZE 0
|
||||||
#endif
|
#endif
|
||||||
@ -65,7 +69,8 @@
|
|||||||
#define CONFIG_ARCH_BOARD_FLASH_PART4_SIZE 0
|
#define CONFIG_ARCH_BOARD_FLASH_PART4_SIZE 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (CONFIG_ARCH_BOARD_FLASH_CPU1_PROG_SIZE + \
|
#if (CONFIG_ARCH_BOARD_FLASH_BL_PROG_SIZE + \
|
||||||
|
CONFIG_ARCH_BOARD_FLASH_CPU1_PROG_SIZE + \
|
||||||
CONFIG_ARCH_BOARD_FLASH_CPU2_PROG_SIZE + \
|
CONFIG_ARCH_BOARD_FLASH_CPU2_PROG_SIZE + \
|
||||||
CONFIG_ARCH_BOARD_FLASH_PART1_SIZE + \
|
CONFIG_ARCH_BOARD_FLASH_PART1_SIZE + \
|
||||||
CONFIG_ARCH_BOARD_FLASH_PART2_SIZE + \
|
CONFIG_ARCH_BOARD_FLASH_PART2_SIZE + \
|
||||||
@ -74,7 +79,8 @@
|
|||||||
# error "Sum of all flash pertitions cannot be bigger than 128"
|
# error "Sum of all flash pertitions cannot be bigger than 128"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (CONFIG_ARCH_BOARD_FLASH_CPU1_PROG_SIZE + \
|
#if (CONFIG_ARCH_BOARD_FLASH_BL_PROG_SIZE + \
|
||||||
|
CONFIG_ARCH_BOARD_FLASH_CPU1_PROG_SIZE + \
|
||||||
CONFIG_ARCH_BOARD_FLASH_CPU2_PROG_SIZE + \
|
CONFIG_ARCH_BOARD_FLASH_CPU2_PROG_SIZE + \
|
||||||
CONFIG_ARCH_BOARD_FLASH_PART1_SIZE + \
|
CONFIG_ARCH_BOARD_FLASH_PART1_SIZE + \
|
||||||
CONFIG_ARCH_BOARD_FLASH_PART2_SIZE + \
|
CONFIG_ARCH_BOARD_FLASH_PART2_SIZE + \
|
||||||
@ -101,6 +107,15 @@ struct part_table
|
|||||||
|
|
||||||
static const struct part_table part_table[] =
|
static const struct part_table part_table[] =
|
||||||
{
|
{
|
||||||
|
#if CONFIG_ARCH_BOARD_FLASH_BL_PROG_SIZE > 0
|
||||||
|
{
|
||||||
|
.size = CONFIG_ARCH_BOARD_FLASH_BL_PROG_SIZE,
|
||||||
|
.name = "bl-progmem",
|
||||||
|
.mnt = NULL,
|
||||||
|
.fs = "rawfs"
|
||||||
|
},
|
||||||
|
#endif
|
||||||
|
|
||||||
{
|
{
|
||||||
.size = CONFIG_ARCH_BOARD_FLASH_CPU1_PROG_SIZE,
|
.size = CONFIG_ARCH_BOARD_FLASH_CPU1_PROG_SIZE,
|
||||||
.name = "cpu1-progmem",
|
.name = "cpu1-progmem",
|
||||||
|
Loading…
Reference in New Issue
Block a user