Skip to content

MXRT1050: Add bootloader support #12359

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,25 @@
#define __ram_vector_table_size__ 0x00000000
#endif

#define m_flash_config_start 0x60000000
#if !defined(MBED_APP_START)
#define MBED_APP_START 0x60000000
#endif

#if !defined(MBED_APP_SIZE)
#define MBED_APP_SIZE 0x400000
#endif

#define m_flash_config_start MBED_APP_START
#define m_flash_config_size 0x00001000

#define m_ivt_start 0x60001000
#define m_ivt_start MBED_APP_START + 0x1000
#define m_ivt_size 0x00001000

#define m_interrupts_start 0x60002000
#define m_interrupts_start MBED_APP_START + 0x2000
#define m_interrupts_size 0x00000400

#define m_text_start 0x60002400
#define m_text_size 0x003FDC00
#define m_text_start MBED_APP_START + 0x2400
#define m_text_size MBED_APP_SIZE - 0x2400

#define m_text2_start 0x00000000
#define m_text2_size 0x00020000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ ENTRY(Reset_Handler)

__ram_vector_table__ = 1;

#if !defined(MBED_APP_START)
#define MBED_APP_START 0x60000000
#endif

#if !defined(MBED_APP_SIZE)
#define MBED_APP_SIZE 0x400000
#endif

#if !defined(MBED_BOOT_STACK_SIZE)
#define MBED_BOOT_STACK_SIZE 0x400
#endif
Expand All @@ -42,10 +50,10 @@ M_VECTOR_RAM_SIZE = DEFINED(__ram_vector_table__) ? 0x0400 : 0x0;
/* Specify the memory areas */
MEMORY
{
m_flash_config (RX) : ORIGIN = 0x60000000, LENGTH = 0x00001000
m_ivt (RX) : ORIGIN = 0x60001000, LENGTH = 0x00001000
m_interrupts (RX) : ORIGIN = 0x60002000, LENGTH = 0x00000400
m_text (RX) : ORIGIN = 0x60002400, LENGTH = 0x003FDC00
m_flash_config (RX) : ORIGIN = MBED_APP_START, LENGTH = 0x00001000
m_ivt (RX) : ORIGIN = MBED_APP_START + 0x1000, LENGTH = 0x00001000
m_interrupts (RX) : ORIGIN = MBED_APP_START + 0x2000, LENGTH = 0x00000400
m_text (RX) : ORIGIN = MBED_APP_START + 0x2400, LENGTH = MBED_APP_SIZE - 0x2400
m_text2 (RX) : ORIGIN = 0x00000000, LENGTH = 0x00020000
m_data (RW) : ORIGIN = 0x80000000, LENGTH = 0x01E00000
m_ncache (RW) : ORIGIN = 0x81E00000, LENGTH = 0x00200000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@

define symbol __ram_vector_table__ = 1;

if (!isdefinedsymbol(MBED_APP_START)) {
define symbol MBED_APP_START = 0x60000000;
}

if (!isdefinedsymbol(MBED_APP_SIZE)) {
define symbol MBED_APP_SIZE = 0x400000;
}

/* Sizes */
if (!isdefinedsymbol(MBED_BOOT_STACK_SIZE)) {
define symbol MBED_BOOT_STACK_SIZE = 0x400;
Expand All @@ -38,11 +46,11 @@ define symbol __heap_size__=0x10000;
define symbol __ram_vector_table_size__ = isdefinedsymbol(__ram_vector_table__) ? 0x00000400 : 0;
define symbol __ram_vector_table_offset__ = isdefinedsymbol(__ram_vector_table__) ? 0x000003FF : 0;

define symbol m_interrupts_start = 0x60002000;
define symbol m_interrupts_end = 0x600023FF;
define symbol m_interrupts_start = MBED_APP_START + 0x2000;
define symbol m_interrupts_end = MBED_APP_START + 0x23FF;

define symbol m_text_start = 0x60002400;
define symbol m_text_end = 0x603FFFFF;
define symbol m_text_start = MBED_APP_START + 0x2400;
define symbol m_text_end = MBED_APP_START + MBED_APP_SIZE - 1;

define symbol m_text2_start = 0x00000000;
define symbol m_text2_end = 0x0001FFFF;
Expand All @@ -62,10 +70,10 @@ define symbol m_data3_end = 0x81DFFFFF;
define symbol m_ncache_start = 0x81E00000;
define symbol m_ncache_end = 0x81FFFFFF;

define exported symbol m_boot_hdr_conf_start = 0x60000000;
define symbol m_boot_hdr_ivt_start = 0x60001000;
define symbol m_boot_hdr_boot_data_start = 0x60001020;
define symbol m_boot_hdr_dcd_data_start = 0x60001030;
define exported symbol m_boot_hdr_conf_start = MBED_APP_START;
define symbol m_boot_hdr_ivt_start = MBED_APP_START + 0x1000;
define symbol m_boot_hdr_boot_data_start = MBED_APP_START + 0x1020;
define symbol m_boot_hdr_dcd_data_start = MBED_APP_START + 0x1030;

/* Sizes */
if (isdefinedsymbol(__stack_size__)) {
Expand Down
1 change: 1 addition & 0 deletions targets/targets.json
Original file line number Diff line number Diff line change
Expand Up @@ -2864,6 +2864,7 @@
"LWIP"
],
"device_name": "MIMXRT1052",
"bootloader_supported": true,
"overrides": {
"deep-sleep-latency": 5,
"network-default-interface-type": "ETHERNET"
Expand Down