mirror of https://github.com/ARMmbed/mbed-os.git
KW41Z: Add Bootloader support
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>pull/8662/head
parent
cb4924151e
commit
76930c0979
|
@ -51,14 +51,26 @@
|
||||||
#define __ram_vector_table_size__ 0x00000000
|
#define __ram_vector_table_size__ 0x00000000
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define m_interrupts_start 0x00000000
|
#if !defined(MBED_APP_START)
|
||||||
|
#define MBED_APP_START 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !defined(MBED_APP_SIZE)
|
||||||
|
#define MBED_APP_SIZE 0x80000
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !defined(MBED_BOOT_STACK_SIZE)
|
||||||
|
#define MBED_BOOT_STACK_SIZE 0x400
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define m_interrupts_start MBED_APP_START
|
||||||
#define m_interrupts_size 0x00000200
|
#define m_interrupts_size 0x00000200
|
||||||
|
|
||||||
#define m_flash_config_start 0x00000400
|
#define m_flash_config_start MBED_APP_START + 0x400
|
||||||
#define m_flash_config_size 0x00000010
|
#define m_flash_config_size 0x00000010
|
||||||
|
|
||||||
#define m_text_start 0x00000410
|
#define m_text_start MBED_APP_START + 0x410
|
||||||
#define m_text_size 0x0007FBF0
|
#define m_text_size MBED_APP_SIZE - 0x410
|
||||||
|
|
||||||
#define m_interrupts_ram_start 0x1FFF8000
|
#define m_interrupts_ram_start 0x1FFF8000
|
||||||
#define m_interrupts_ram_size __ram_vector_table_size__
|
#define m_interrupts_ram_size __ram_vector_table_size__
|
||||||
|
@ -70,7 +82,7 @@
|
||||||
#if (defined(__stack_size__))
|
#if (defined(__stack_size__))
|
||||||
#define Stack_Size __stack_size__
|
#define Stack_Size __stack_size__
|
||||||
#else
|
#else
|
||||||
#define Stack_Size 0x0400
|
#define Stack_Size MBED_BOOT_STACK_SIZE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (defined(__heap_size__))
|
#if (defined(__heap_size__))
|
||||||
|
|
|
@ -48,9 +48,21 @@ ENTRY(Reset_Handler)
|
||||||
|
|
||||||
__ram_vector_table__ = 1;
|
__ram_vector_table__ = 1;
|
||||||
|
|
||||||
|
#if !defined(MBED_APP_START)
|
||||||
|
#define MBED_APP_START 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !defined(MBED_APP_SIZE)
|
||||||
|
#define MBED_APP_SIZE 0x80000
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !defined(MBED_BOOT_STACK_SIZE)
|
||||||
|
#define MBED_BOOT_STACK_SIZE 0x400
|
||||||
|
#endif
|
||||||
|
|
||||||
/* With the RTOS in use, this does not affect the main stack size. The size of
|
/* With the RTOS in use, this does not affect the main stack size. The size of
|
||||||
* the stack where main runs is determined via the RTOS. */
|
* the stack where main runs is determined via the RTOS. */
|
||||||
__stack_size__ = 0x400;
|
__stack_size__ = MBED_BOOT_STACK_SIZE;
|
||||||
|
|
||||||
__heap_size__ = 0x6000;
|
__heap_size__ = 0x6000;
|
||||||
|
|
||||||
|
@ -61,9 +73,9 @@ M_VECTOR_RAM_SIZE = DEFINED(__ram_vector_table__) ? 0x0200 : 0x0;
|
||||||
/* Specify the memory areas */
|
/* Specify the memory areas */
|
||||||
MEMORY
|
MEMORY
|
||||||
{
|
{
|
||||||
m_interrupts (RX) : ORIGIN = 0x00000000, LENGTH = 0x00000200
|
m_interrupts (RX) : ORIGIN = MBED_APP_START, LENGTH = 0x00000200
|
||||||
m_flash_config (RX) : ORIGIN = 0x00000400, LENGTH = 0x00000010
|
m_flash_config (RX) : ORIGIN = MBED_APP_START + 0x400, LENGTH = 0x00000010
|
||||||
m_text (RX) : ORIGIN = 0x00000410, LENGTH = 0x0007FBF0
|
m_text (RX) : ORIGIN = MBED_APP_START + 0x410, LENGTH = MBED_APP_SIZE - 0x410
|
||||||
m_data (RW) : ORIGIN = 0x1FFF8000, LENGTH = 0x00020000
|
m_data (RW) : ORIGIN = 0x1FFF8000, LENGTH = 0x00020000
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,21 +44,32 @@
|
||||||
*/
|
*/
|
||||||
define symbol __ram_vector_table__ = 1;
|
define symbol __ram_vector_table__ = 1;
|
||||||
|
|
||||||
/* Heap 1/4 of ram and stack 1/8 */
|
if (!isdefinedsymbol(MBED_APP_START)) {
|
||||||
define symbol __stack_size__=0x4000;
|
define symbol MBED_APP_START = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isdefinedsymbol(MBED_APP_SIZE)) {
|
||||||
|
define symbol MBED_APP_SIZE = 0x80000;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isdefinedsymbol(MBED_BOOT_STACK_SIZE)) {
|
||||||
|
define symbol MBED_BOOT_STACK_SIZE = 0x400;
|
||||||
|
}
|
||||||
|
|
||||||
|
define symbol __stack_size__=MBED_BOOT_STACK_SIZE;
|
||||||
define symbol __heap_size__=0x8000;
|
define symbol __heap_size__=0x8000;
|
||||||
|
|
||||||
define symbol __ram_vector_table_size__ = isdefinedsymbol(__ram_vector_table__) ? 0x00000200 : 0;
|
define symbol __ram_vector_table_size__ = isdefinedsymbol(__ram_vector_table__) ? 0x00000200 : 0;
|
||||||
define symbol __ram_vector_table_offset__ = isdefinedsymbol(__ram_vector_table__) ? 0x000001FF : 0;
|
define symbol __ram_vector_table_offset__ = isdefinedsymbol(__ram_vector_table__) ? 0x000001FF : 0;
|
||||||
|
|
||||||
define symbol m_interrupts_start = 0x00000000;
|
define symbol m_interrupts_start = MBED_APP_START;
|
||||||
define symbol m_interrupts_end = 0x000001FF;
|
define symbol m_interrupts_end = MBED_APP_START + 0x1FF;
|
||||||
|
|
||||||
define symbol m_flash_config_start = 0x00000400;
|
define symbol m_flash_config_start = MBED_APP_START + 0x400;
|
||||||
define symbol m_flash_config_end = 0x0000040F;
|
define symbol m_flash_config_end = MBED_APP_START + 0x40F;
|
||||||
|
|
||||||
define symbol m_text_start = 0x00000410;
|
define symbol m_text_start = MBED_APP_START + 0x410;
|
||||||
define symbol m_text_end = 0x0007FFFF;
|
define symbol m_text_end = MBED_APP_START + MBED_APP_SIZE - 1;
|
||||||
|
|
||||||
define symbol m_interrupts_ram_start = 0x1FFF8000;
|
define symbol m_interrupts_ram_start = 0x1FFF8000;
|
||||||
define symbol m_interrupts_ram_end = 0x1FFF8000 + __ram_vector_table_offset__;
|
define symbol m_interrupts_ram_end = 0x1FFF8000 + __ram_vector_table_offset__;
|
||||||
|
|
|
@ -616,7 +616,8 @@
|
||||||
"detect_code": ["0201"],
|
"detect_code": ["0201"],
|
||||||
"device_has": ["USTICKER", "LPTICKER", "RTC", "ANALOGIN", "ANALOGOUT", "I2C", "I2CSLAVE", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "SERIAL", "SLEEP", "SPI", "SPISLAVE", "TRNG", "STDIO_MESSAGES", "FLASH"],
|
"device_has": ["USTICKER", "LPTICKER", "RTC", "ANALOGIN", "ANALOGOUT", "I2C", "I2CSLAVE", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "SERIAL", "SLEEP", "SPI", "SPISLAVE", "TRNG", "STDIO_MESSAGES", "FLASH"],
|
||||||
"release_versions": ["2", "5"],
|
"release_versions": ["2", "5"],
|
||||||
"device_name": "MKW41Z512xxx4"
|
"device_name": "MKW41Z512xxx4",
|
||||||
|
"bootloader_supported": true
|
||||||
},
|
},
|
||||||
"MCU_K24F1M": {
|
"MCU_K24F1M": {
|
||||||
"core": "Cortex-M4F",
|
"core": "Cortex-M4F",
|
||||||
|
|
Loading…
Reference in New Issue