Skip to content

Commit 0c679a8

Browse files
authored
Merge pull request #4989 from maclobdell/k66f_flash_iap_bootloader_noflashdrvr
add flash iap and bootloader support to K66F
2 parents 2af7213 + e6b0a2b commit 0c679a8

File tree

4 files changed

+40
-16
lines changed

4 files changed

+40
-16
lines changed

targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_K66F/device/TOOLCHAIN_ARM_STD/MK66FN2M0xxx18.sct

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

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

58-
#define m_flash_config_start 0x00000400
66+
#define m_flash_config_start MBED_APP_START + 0x400
5967
#define m_flash_config_size 0x00000010
6068

61-
#define m_text_start 0x00000410
62-
#define m_text_size 0x001FFBF0
69+
#define m_text_start MBED_APP_START + 0x410
70+
#define m_text_size MBED_APP_SIZE - 0x410
6371

6472
#define m_interrupts_ram_start 0x1FFF0000
6573
#define m_interrupts_ram_size __ram_vector_table_size__

targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_K66F/device/TOOLCHAIN_GCC_ARM/MK66FN2M0xxx18.ld

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

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

6674
/* Specify the memory areas */
6775
MEMORY
6876
{
69-
m_interrupts (RX) : ORIGIN = 0x00000000, LENGTH = 0x00000400
70-
m_flash_config (RX) : ORIGIN = 0x00000400, LENGTH = 0x00000010
71-
m_text (RX) : ORIGIN = 0x00000410, LENGTH = 0x001FFBF0
77+
m_interrupts (RX) : ORIGIN = MBED_APP_START, LENGTH = 0x400
78+
m_flash_config (RX) : ORIGIN = MBED_APP_START + 0x400, LENGTH = 0x10
79+
m_text (RX) : ORIGIN = MBED_APP_START + 0x410, LENGTH = MBED_APP_SIZE - 0x410
7280
m_data (RW) : ORIGIN = 0x1FFF0000, LENGTH = 0x00010000
7381
m_data_2 (RW) : ORIGIN = 0x20000000, LENGTH = 0x00030000
7482
}

targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_K66F/device/TOOLCHAIN_IAR/MK66FN2M0xxx18.icf

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,25 @@ define symbol __ram_vector_table__ = 1;
4949
define symbol __stack_size__=0x8000;
5050
define symbol __heap_size__=0x10000;
5151

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

55-
define symbol m_interrupts_start = 0x00000000;
56-
define symbol m_interrupts_end = 0x000003FF;
63+
define symbol m_interrupts_start = MBED_APP_START;
64+
define symbol m_interrupts_end = MBED_APP_START + 0x3FF;
5765

58-
define symbol m_flash_config_start = 0x00000400;
59-
define symbol m_flash_config_end = 0x0000040F;
66+
define symbol m_flash_config_start = MBED_APP_START + 0x400;
67+
define symbol m_flash_config_end = MBED_APP_START + 0x40F;
6068

61-
define symbol m_text_start = 0x00000410;
62-
define symbol m_text_end = 0x001FFFFF;
69+
define symbol m_text_start = MBED_APP_START + 0x410;
70+
define symbol m_text_end = MBED_APP_START + MBED_APP_SIZE - 1;
6371

6472
define symbol m_interrupts_ram_start = 0x1FFF0000;
6573
define symbol m_interrupts_ram_end = 0x1FFF0000 + __ram_vector_table_offset__;
@@ -112,4 +120,3 @@ place in DATA_region { block ZI };
112120
place in DATA_region { last block HEAP };
113121
place in CSTACK_region { block CSTACK };
114122
place in m_interrupts_ram_region { section m_interrupts_ram };
115-

targets/targets.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -649,10 +649,11 @@
649649
"macros": ["CPU_MK66FN2M0VMD18", "FSL_RTOS_MBED"],
650650
"inherits": ["Target"],
651651
"detect_code": ["0311"],
652-
"device_has": ["ANALOGIN", "ANALOGOUT", "I2C", "I2CSLAVE", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_FC", "SLEEP", "SPI", "SPISLAVE", "STDIO_MESSAGES", "TRNG"],
652+
"device_has": ["ANALOGIN", "ANALOGOUT", "I2C", "I2CSLAVE", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_FC", "SLEEP", "SPI", "SPISLAVE", "STDIO_MESSAGES", "TRNG", "FLASH"],
653653
"features": ["LWIP"],
654654
"release_versions": ["2", "5"],
655-
"device_name": "MK66FN2M0xxx18"
655+
"device_name": "MK66FN2M0xxx18",
656+
"bootloader_supported": true
656657
},
657658
"K82F": {
658659
"supported_form_factors": ["ARDUINO"],

0 commit comments

Comments
 (0)