Skip to content

Commit 81fde11

Browse files
authored
Merge pull request #4968 from dlfryar/master
Add bootloader support for NXP FRDM-KW24D
2 parents a74e95f + ffe84bd commit 81fde11

File tree

4 files changed

+40
-15
lines changed

4 files changed

+40
-15
lines changed

targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_KW24D/device/TOOLCHAIN_ARM_STD/MKW24D512xxx5.sct

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,22 @@
5151
#define __ram_vector_table_size__ 0x00000000
5252
#endif
5353

54-
#define m_interrupts_start 0x00000000
54+
#if !defined(MBED_APP_START)
55+
#define MBED_APP_START 0
56+
#endif
57+
58+
#if !defined(MBED_APP_SIZE)
59+
#define MBED_APP_SIZE 0x80000
60+
#endif
61+
62+
#define m_interrupts_start MBED_APP_START
5563
#define m_interrupts_size 0x00000400
5664

57-
#define m_flash_config_start 0x00000400
65+
#define m_flash_config_start MBED_APP_START + 0x400
5866
#define m_flash_config_size 0x00000010
5967

60-
#define m_text_start 0x00000410
61-
#define m_text_size 0x0007FBF0
68+
#define m_text_start MBED_APP_START + 0x410
69+
#define m_text_size MBED_APP_SIZE - 0x410
6270

6371
#define m_interrupts_ram_start 0x1FFF8000
6472
#define m_interrupts_ram_size __ram_vector_table_size__

targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_KW24D/device/TOOLCHAIN_GCC_ARM/MKW24D512xxx5.ld

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,24 @@ __stack_size__ = 0x400;
5858
* heap and the page heap in uVisor applications. */
5959
__heap_size__ = 0x4000;
6060

61+
#if !defined(MBED_APP_START)
62+
#define MBED_APP_START 0
63+
#endif
64+
65+
#if !defined(MBED_APP_SIZE)
66+
#define MBED_APP_SIZE 0x80000
67+
#endif
68+
6169
HEAP_SIZE = DEFINED(__heap_size__) ? __heap_size__ : 0x0400;
6270
STACK_SIZE = DEFINED(__stack_size__) ? __stack_size__ : 0x0400;
6371
M_VECTOR_RAM_SIZE = DEFINED(__ram_vector_table__) ? 0x0400 : 0x0;
6472

6573
/* Specify the memory areas */
6674
MEMORY
6775
{
68-
m_interrupts (RX) : ORIGIN = 0x00000000, LENGTH = 0x00000400
69-
m_flash_config (RX) : ORIGIN = 0x00000400, LENGTH = 0x00000010
70-
m_text (RX) : ORIGIN = 0x00000410, LENGTH = 0x0007FBF0
76+
m_interrupts (RX) : ORIGIN = MBED_APP_START, LENGTH = 0x400
77+
m_flash_config (RX) : ORIGIN = MBED_APP_START + 0x400, LENGTH = 0x10
78+
m_text (RX) : ORIGIN = MBED_APP_START + 0x410, LENGTH = MBED_APP_SIZE - 0x410
7179
m_data (RW) : ORIGIN = 0x1FFF8000, LENGTH = 0x00008000
7280
m_data_2 (RW) : ORIGIN = 0x20000000, LENGTH = 0x00008000
7381
}

targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_KW24D/device/TOOLCHAIN_IAR/MKW24D512xxx5.icf

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,25 @@ define symbol __ram_vector_table__ = 1;
4848
define symbol __stack_size__=0x2000;
4949
define symbol __heap_size__=0x4000;
5050

51+
if (!isdefinedsymbol(MBED_APP_START)) {
52+
define symbol MBED_APP_START = 0;
53+
}
54+
55+
if (!isdefinedsymbol(MBED_APP_SIZE)) {
56+
define symbol MBED_APP_SIZE = 0x80000;
57+
}
58+
5159
define symbol __ram_vector_table_size__ = isdefinedsymbol(__ram_vector_table__) ? 0x00000400 : 0;
5260
define symbol __ram_vector_table_offset__ = isdefinedsymbol(__ram_vector_table__) ? 0x000003FF : 0;
5361

54-
define symbol m_interrupts_start = 0x00000000;
55-
define symbol m_interrupts_end = 0x000003FF;
62+
define symbol m_interrupts_start = MBED_APP_START;
63+
define symbol m_interrupts_end = MBED_APP_START + 0x3FF;
5664

57-
define symbol m_flash_config_start = 0x00000400;
58-
define symbol m_flash_config_end = 0x0000040F;
65+
define symbol m_flash_config_start = MBED_APP_START + 0x400;
66+
define symbol m_flash_config_end = MBED_APP_START + 0x40F;
5967

60-
define symbol m_text_start = 0x00000410;
61-
define symbol m_text_end = 0x0007FFFF;
68+
define symbol m_text_start = MBED_APP_START + 0x410;
69+
define symbol m_text_end = MBED_APP_START + MBED_APP_SIZE - 1;
6270

6371
define symbol m_interrupts_ram_start = 0x1FFF8000;
6472
define symbol m_interrupts_ram_end = 0x1FFF8000 + __ram_vector_table_offset__;

targets/targets.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -563,9 +563,10 @@
563563
"macros": ["CPU_MKW24D512VHA5", "FSL_RTOS_MBED"],
564564
"inherits": ["Target"],
565565
"detect_code": ["0250"],
566-
"device_has": ["ANALOGIN", "I2C", "I2CSLAVE", "INTERRUPTIN", "LOWPOWERTIMER", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_FC", "SLEEP", "SPI", "SPISLAVE", "STDIO_MESSAGES", "TRNG"],
566+
"device_has": ["ANALOGIN", "I2C", "I2CSLAVE", "INTERRUPTIN", "LOWPOWERTIMER", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_FC", "SLEEP", "SPI", "SPISLAVE", "STDIO_MESSAGES", "TRNG", "FLASH"],
567567
"release_versions": ["2", "5"],
568-
"device_name": "MKW24D512xxx5"
568+
"device_name": "MKW24D512xxx5",
569+
"bootloader_supported": true
569570
},
570571
"KW41Z": {
571572
"supported_form_factors": ["ARDUINO"],

0 commit comments

Comments
 (0)