Skip to content

Nordic add app_start config system support for NRF52840 for bootloader #5691

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
Dec 28, 2017
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

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#! armcc -E

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

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

LR_IROM1 MBED_APP_START MBED_APP_SIZE {
ER_IROM1 MBED_APP_START MBED_APP_SIZE {
*.o (RESET, +First)
*(InRoot$$Sections)
.ANY (+RO)
}
RW_IRAM0 0x20003288 UNINIT 0x000000F8 { ;no init section
*(*noinit)
}
RW_IRAM1 0x20003380 0x0003cc80 {
.ANY (+RW +ZI)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,17 @@

/* Linker script to configure memory regions. */

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

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

MEMORY
{
FLASH (rx) : ORIGIN = 0x21000, LENGTH = 0xDF000
FLASH (rx) : ORIGIN = MBED_APP_START, LENGTH = MBED_APP_SIZE
RAM (rwx) : ORIGIN = 0x20003288, LENGTH = 0x3cd78
}

Expand Down Expand Up @@ -130,7 +138,7 @@ SECTIONS
PROVIDE(__start_fs_data = .);
KEEP(*(.fs_data))
PROVIDE(__stop_fs_data = .);

*(.jcr)
. = ALIGN(4);
/* All data end */
Expand All @@ -146,7 +154,7 @@ SECTIONS
KEEP(*(.noinit))
PROVIDE(__stop_noinit = .);
} > RAM

.bss :
{
. = ALIGN(4);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@
/*###ICF### Section handled by ICF editor, don't touch! ****/
/*-Editor annotation file-*/
/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */

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

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

/*-Specials-*/
define symbol __ICFEDIT_intvec_start__ = 0x21000;
define symbol __ICFEDIT_intvec_start__ = MBED_APP_START;

/*-Memory Regions-*/
define symbol __ICFEDIT_region_ROM_start__ = 0x21000;
define symbol __ICFEDIT_region_ROM_end__ = 0xfffff;
define symbol __ICFEDIT_region_ROM_start__ = MBED_APP_START;
define symbol __ICFEDIT_region_ROM_end__ = MBED_APP_START + MBED_APP_SIZE - 1;
define symbol __ICFEDIT_region_RAM_start__ = 0x20003288;
define symbol __ICFEDIT_region_RAM_end__ = 0x2003ffff;
export symbol __ICFEDIT_region_RAM_start__;
export symbol __ICFEDIT_region_RAM_end__;

/*-Sizes-*/
/*Heap 1/4 of ram and stack 1/8*/
define symbol __ICFEDIT_size_cstack__ = 0x800;
Expand Down
3 changes: 2 additions & 1 deletion targets/targets.json
Original file line number Diff line number Diff line change
Expand Up @@ -3239,7 +3239,8 @@
"macros_add": ["BOARD_PCA10056", "CONFIG_GPIO_AS_PINRESET", "SWI_DISABLE0", "NRF52_ERRATA_20"],
"device_has_add": ["FLASH", "ANALOGIN", "I2C", "I2C_ASYNCH", "INTERRUPTIN", "LOWPOWERTIMER", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SERIAL_FC", "SLEEP", "SPI", "SPISLAVE", "TRNG"],
"release_versions": ["2", "5"],
"device_name": "nRF52840_xxAA"
"device_name": "nRF52840_xxAA",
"bootloader_supported": true
},
"BLUEPILL_F103C8": {
"inherits": ["FAMILY_STM32"],
Expand Down