Merge pull request #4481 from kegilbert/add_bootloader_support_stm32f439xI-rebase

Add bootloader support stm32f439xI - Rebase
pull/4478/head^2
Sam Grove 2017-06-08 15:55:59 -05:00 committed by GitHub
commit ee8bd05ff6
8 changed files with 56 additions and 21 deletions

View File

@ -51,7 +51,7 @@ Stack_Size EQU 0x00000400
EXPORT __initial_sp EXPORT __initial_sp
Stack_Mem SPACE Stack_Size Stack_Mem SPACE Stack_Size
__initial_sp EQU 0x20020000 ; Top of RAM __initial_sp EQU 0x20030000 ; Top of RAM
; <h> Heap Configuration ; <h> Heap Configuration

View File

@ -1,3 +1,4 @@
#! armcc -E
; Scatter-Loading Description File ; Scatter-Loading Description File
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Copyright (c) 2015, STMicroelectronics ; Copyright (c) 2015, STMicroelectronics
@ -27,19 +28,30 @@
; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; 2 MB FLASH (0x200000) + 256 KB SRAM (0x40000) #if !defined(MBED_APP_START)
LR_IROM1 0x08000000 0x200000 { ; load region size_region #define MBED_APP_START 0x08000000
#endif
ER_IROM1 0x08000000 0x200000 { ; load address = execution address #if !defined(MBED_APP_SIZE)
#define MBED_APP_SIZE 0x200000
#endif
; STM32F439xI: 2048 KB FLASH (0x200000) + 256 KB SRAM (0x30000 + 0x10000)
LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
ER_IROM1 MBED_APP_START MBED_APP_SIZE { ; load address = execution address
*.o (RESET, +First) *.o (RESET, +First)
*(InRoot$$Sections) *(InRoot$$Sections)
.ANY (+RO) .ANY (+RO)
} }
; Total: 107 vectors = 428 bytes (0x1AC) to be reserved in RAM ; Total: 107 vectors = 428 bytes (0x1AC) to be used
RW_IRAM1 (0x20000000+0x1AC) (0x20000-0x1AC) { ; RW data ; should match ER_IROM1::RESET/4 and cmsis_nvic.h::NVIC_NUM_VECTORS
RW_IRAM1 (0x20000000 + (107*4)) (0x30000 - (107*4)) { ; RW data
.ANY (+RW +ZI)
}
RW_IRAM2 (0x10000000) 0x10000 {
.ANY (+RW +ZI) .ANY (+RW +ZI)
} }
} }

View File

@ -1,3 +1,4 @@
#! armcc -E
; Scatter-Loading Description File ; Scatter-Loading Description File
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Copyright (c) 2015, STMicroelectronics ; Copyright (c) 2015, STMicroelectronics
@ -27,10 +28,18 @@
; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; 2 MB FLASH (0x200000) + 192 KB SRAM (0x30000) #if !defined(MBED_APP_START)
LR_IROM1 0x08000000 0x200000 { ; load region size_region #define MBED_APP_START 0x08000000
#endif
ER_IROM1 0x08000000 0x200000 { ; load address = execution address #if !defined(MBED_APP_SIZE)
#define MBED_APP_SIZE 0x200000
#endif
; 2 MB FLASH (0x200000) + 256 KB SRAM (0x30000 + 0x10000)
LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
ER_IROM1 MBED_APP_START MBED_APP_SIZE { ; load address = execution address
*.o (RESET, +First) *.o (RESET, +First)
*(InRoot$$Sections) *(InRoot$$Sections)
.ANY (+RO) .ANY (+RO)
@ -41,5 +50,8 @@ LR_IROM1 0x08000000 0x200000 { ; load region size_region
.ANY (+RW +ZI) .ANY (+RW +ZI)
} }
RW_IRAM2 (0x10000000) (0x10000) { ; RW data
.ANY (+RW +ZI)
}
} }

View File

@ -1,7 +1,15 @@
#if !defined(MBED_APP_START)
#define MBED_APP_START 0x08000000
#endif
#if !defined(MBED_APP_SIZE)
#define MBED_APP_SIZE 2048k
#endif
/* Linker script to configure memory regions. */ /* Linker script to configure memory regions. */
MEMORY MEMORY
{ {
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 2048k FLASH (rx) : ORIGIN = MBED_APP_START, LENGTH = MBED_APP_SIZE
CCM (rwx) : ORIGIN = 0x10000000, LENGTH = 64K CCM (rwx) : ORIGIN = 0x10000000, LENGTH = 64K
RAM (rwx) : ORIGIN = 0x200001AC, LENGTH = 192k - 0x1AC RAM (rwx) : ORIGIN = 0x200001AC, LENGTH = 192k - 0x1AC
} }

View File

@ -1,11 +1,13 @@
/*###ICF### Section handled by ICF editor, don't touch! ****/ /*###ICF### Section handled by ICF editor, don't touch! ****/
/*-Editor annotation file-*/ /*-Editor annotation file-*/
/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
if (!isdefinedsymbol(MBED_APP_START)) { define symbol MBED_APP_START = 0x08000000; }
if (!isdefinedsymbol(MBED_APP_SIZE)) { define symbol MBED_APP_SIZE = 0x200000; }
/*-Specials-*/ /*-Specials-*/
define symbol __ICFEDIT_intvec_start__ = 0x08000000; define symbol __ICFEDIT_intvec_start__ = MBED_APP_START;
/*-Memory Regions-*/ /*-Memory Regions-*/
define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; define symbol __ICFEDIT_region_ROM_start__ = MBED_APP_START;
define symbol __ICFEDIT_region_ROM_end__ = 0x081FFFFF; define symbol __ICFEDIT_region_ROM_end__ = MBED_APP_START + MBED_APP_SIZE - 1;
define symbol __ICFEDIT_region_NVIC_start__ = 0x20000000; define symbol __ICFEDIT_region_NVIC_start__ = 0x20000000;
define symbol __ICFEDIT_region_NVIC_end__ = 0x200001AF; define symbol __ICFEDIT_region_NVIC_end__ = 0x200001AF;
define symbol __ICFEDIT_region_RAM_start__ = 0x200001B0; define symbol __ICFEDIT_region_RAM_start__ = 0x200001B0;
@ -13,7 +15,7 @@ define symbol __ICFEDIT_region_RAM_end__ = 0x2002FFFF;
define symbol __ICFEDIT_region_CCMRAM_start__ = 0x10000000; define symbol __ICFEDIT_region_CCMRAM_start__ = 0x10000000;
define symbol __ICFEDIT_region_CCMRAM_end__ = 0x1000FFFF; define symbol __ICFEDIT_region_CCMRAM_end__ = 0x1000FFFF;
/*-Sizes-*/ /*-Sizes-*/
/*Heap 1/3 of ram and stack 1/8*/ /*Heap 64kB and stack 24kB */
define symbol __ICFEDIT_size_cstack__ = 0x6000; define symbol __ICFEDIT_size_cstack__ = 0x6000;
define symbol __ICFEDIT_size_heap__ = 0x10000; define symbol __ICFEDIT_size_heap__ = 0x10000;
/**** End of ICF editor section. ###ICF###*/ /**** End of ICF editor section. ###ICF###*/

View File

@ -31,7 +31,7 @@
#ifndef MBED_CMSIS_NVIC_H #ifndef MBED_CMSIS_NVIC_H
#define MBED_CMSIS_NVIC_H #define MBED_CMSIS_NVIC_H
// STM32F429ZI // STM32F439xI
// CORE: 16 vectors = 64 bytes from 0x00 to 0x3F // CORE: 16 vectors = 64 bytes from 0x00 to 0x3F
// MCU Peripherals: 91 vectors = 364 bytes from 0x40 to 0x1AB // MCU Peripherals: 91 vectors = 364 bytes from 0x40 to 0x1AB
// Total: 107 vectors = 428 bytes (0x1AC) to be reserved in RAM // Total: 107 vectors = 428 bytes (0x1AC) to be reserved in RAM

View File

@ -948,7 +948,8 @@
"detect_code": ["0797"], "detect_code": ["0797"],
"features": ["LWIP"], "features": ["LWIP"],
"release_versions": ["2", "5"], "release_versions": ["2", "5"],
"device_name": "STM32F439ZI" "device_name" : "STM32F439ZI",
"bootloader_supported": true
}, },
"NUCLEO_F446RE": { "NUCLEO_F446RE": {
"supported_form_factors": ["ARDUINO", "MORPHO"], "supported_form_factors": ["ARDUINO", "MORPHO"],