NUVOTON: Fix for target.boot-stack-size config in linker script (#351)

"target.boot-stack-size" can expand to MBED_CONF_TARGET_BOOT_STACK_SIZE
or legacy MBED_BOOT_STACK_SIZE. Though MBED_BOOT_STACK_SIZE is unsupported
in Mbed CE, make its preprocess consistent in linker scripts by prioritizing
MBED_CONF_TARGET_BOOT_STACK_SIZE, then MBED_BOOT_STACK_SIZE for being
compatible.
pull/15530/head
ccli8 2024-09-23 10:22:33 +08:00 committed by GitHub
parent cfee81c7ce
commit 037fe9b619
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 56 additions and 16 deletions

View File

@ -20,8 +20,12 @@
#include "../partition_M2354_mem.h"
#if !defined(MBED_BOOT_STACK_SIZE)
#define MBED_BOOT_STACK_SIZE 0x400
#if !defined(MBED_CONF_TARGET_BOOT_STACK_SIZE)
# if defined(MBED_BOOT_STACK_SIZE)
# define MBED_CONF_TARGET_BOOT_STACK_SIZE MBED_BOOT_STACK_SIZE
# else
# define MBED_CONF_TARGET_BOOT_STACK_SIZE 0x400
# endif
#endif
LR_IROM1 MBED_APP_START
@ -34,7 +38,7 @@ LR_IROM1 MBED_APP_START
.ANY (+RO)
}
ARM_LIB_STACK MBED_RAM_APP_START EMPTY MBED_BOOT_STACK_SIZE
ARM_LIB_STACK MBED_RAM_APP_START EMPTY MBED_CONF_TARGET_BOOT_STACK_SIZE
{
}

View File

@ -22,11 +22,15 @@
#include "../partition_M2354_mem.h"
#if !defined(MBED_BOOT_STACK_SIZE)
#define MBED_BOOT_STACK_SIZE 0x400
#if !defined(MBED_CONF_TARGET_BOOT_STACK_SIZE)
# if defined(MBED_BOOT_STACK_SIZE)
# define MBED_CONF_TARGET_BOOT_STACK_SIZE MBED_BOOT_STACK_SIZE
# else
# define MBED_CONF_TARGET_BOOT_STACK_SIZE 0x400
# endif
#endif
StackSize = MBED_BOOT_STACK_SIZE;
StackSize = MBED_CONF_TARGET_BOOT_STACK_SIZE;
MEMORY
{

View File

@ -21,7 +21,11 @@
#include "../M251_mem.h"
#if !defined(MBED_CONF_TARGET_BOOT_STACK_SIZE)
#define MBED_CONF_TARGET_BOOT_STACK_SIZE 0x400
# if defined(MBED_BOOT_STACK_SIZE)
# define MBED_CONF_TARGET_BOOT_STACK_SIZE MBED_BOOT_STACK_SIZE
# else
# define MBED_CONF_TARGET_BOOT_STACK_SIZE 0x400
# endif
#endif
StackSize = MBED_CONF_TARGET_BOOT_STACK_SIZE;

View File

@ -23,7 +23,11 @@
#include "../M261_mem.h"
#if !defined(MBED_CONF_TARGET_BOOT_STACK_SIZE)
#define MBED_CONF_TARGET_BOOT_STACK_SIZE 0x400
# if defined(MBED_BOOT_STACK_SIZE)
# define MBED_CONF_TARGET_BOOT_STACK_SIZE MBED_BOOT_STACK_SIZE
# else
# define MBED_CONF_TARGET_BOOT_STACK_SIZE 0x400
# endif
#endif
M_CRASH_DATA_RAM_SIZE = 0x100;

View File

@ -23,7 +23,11 @@
#include "../M451_mem.h"
#if !defined(MBED_CONF_TARGET_BOOT_STACK_SIZE)
#define MBED_CONF_TARGET_BOOT_STACK_SIZE 0x400
# if defined(MBED_BOOT_STACK_SIZE)
# define MBED_CONF_TARGET_BOOT_STACK_SIZE MBED_BOOT_STACK_SIZE
# else
# define MBED_CONF_TARGET_BOOT_STACK_SIZE 0x400
# endif
#endif
StackSize = MBED_CONF_TARGET_BOOT_STACK_SIZE;

View File

@ -22,8 +22,12 @@
#include "../M460_mem.h"
#if !defined(MBED_BOOT_STACK_SIZE)
#define MBED_BOOT_STACK_SIZE 0x400
#if !defined(MBED_CONF_TARGET_BOOT_STACK_SIZE)
# if defined(MBED_BOOT_STACK_SIZE)
# define MBED_CONF_TARGET_BOOT_STACK_SIZE MBED_BOOT_STACK_SIZE
# else
# define MBED_CONF_TARGET_BOOT_STACK_SIZE 0x400
# endif
#endif
#if !defined(NU_HYPERRAM_START)
@ -35,7 +39,7 @@
#endif
M_CRASH_DATA_RAM_SIZE = 0x100;
StackSize = MBED_BOOT_STACK_SIZE;
StackSize = MBED_CONF_TARGET_BOOT_STACK_SIZE;
MEMORY
{

View File

@ -23,7 +23,11 @@
#include "../M480_mem.h"
#if !defined(MBED_CONF_TARGET_BOOT_STACK_SIZE)
#define MBED_CONF_TARGET_BOOT_STACK_SIZE 0x400
# if defined(MBED_BOOT_STACK_SIZE)
# define MBED_CONF_TARGET_BOOT_STACK_SIZE MBED_BOOT_STACK_SIZE
# else
# define MBED_CONF_TARGET_BOOT_STACK_SIZE 0x400
# endif
#endif
M_CRASH_DATA_RAM_SIZE = 0x100;

View File

@ -23,7 +23,11 @@
#include "../NANO100_mem.h"
#if !defined(MBED_CONF_TARGET_BOOT_STACK_SIZE)
#define MBED_CONF_TARGET_BOOT_STACK_SIZE 0x400
# if defined(MBED_BOOT_STACK_SIZE)
# define MBED_CONF_TARGET_BOOT_STACK_SIZE MBED_BOOT_STACK_SIZE
# else
# define MBED_CONF_TARGET_BOOT_STACK_SIZE 0x400
# endif
#endif
StackSize = MBED_CONF_TARGET_BOOT_STACK_SIZE;

View File

@ -11,7 +11,11 @@
#endif
#if !defined(MBED_CONF_TARGET_BOOT_STACK_SIZE)
#define MBED_CONF_TARGET_BOOT_STACK_SIZE 0x400
# if defined(MBED_BOOT_STACK_SIZE)
# define MBED_CONF_TARGET_BOOT_STACK_SIZE MBED_BOOT_STACK_SIZE
# else
# define MBED_CONF_TARGET_BOOT_STACK_SIZE 0x400
# endif
#endif
M_CRASH_DATA_RAM_SIZE = 0x100;

View File

@ -11,7 +11,11 @@
#endif
#if !defined(MBED_CONF_TARGET_BOOT_STACK_SIZE)
#define MBED_CONF_TARGET_BOOT_STACK_SIZE 0x400
# if defined(MBED_BOOT_STACK_SIZE)
# define MBED_CONF_TARGET_BOOT_STACK_SIZE MBED_BOOT_STACK_SIZE
# else
# define MBED_CONF_TARGET_BOOT_STACK_SIZE 0x400
# endif
#endif
M_CRASH_DATA_RAM_SIZE = 0x100;