Skip to content

Commit b1904a5

Browse files
author
Cruz Monrreal
authored
Merge pull request #8599 from bcostm/F769NI_bootloader
DISCO_F769NI: Add bootloader support
2 parents 8d014bc + 38a5f1e commit b1904a5

File tree

6 files changed

+50
-15
lines changed

6 files changed

+50
-15
lines changed

targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F769xI/TARGET_DISCO_F769NI/system_clock.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131

3232
#include "stm32f7xx.h"
3333
#include "mbed_error.h"
34+
#include "nvic_addr.h"
3435

3536
/*!< Uncomment the following line if you need to relocate your vector Table in
3637
Internal SRAM. */
@@ -92,7 +93,7 @@ void SystemInit(void)
9293
#ifdef VECT_TAB_SRAM
9394
SCB->VTOR = RAMDTCM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */
9495
#else
95-
SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */
96+
SCB->VTOR = NVIC_FLASH_VECTOR_ADDRESS; /* Vector Table Relocation in Internal FLASH */
9697
#endif
9798

9899
}

targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F769xI/device/TOOLCHAIN_ARM_MICRO/stm32f769xi.sct

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#! armcc -E
12
; Scatter-Loading Description File
23
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
34
; Copyright (c) 2016, STMicroelectronics
@@ -27,16 +28,25 @@
2728
; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2829
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2930

30-
; STM32F769NI: 2048 KB FLASH (0x200000) + 512 KB SRAM (0x80000)
31-
LR_IROM1 0x08000000 0x200000 { ; load region size_region
31+
#if !defined(MBED_APP_START)
32+
#define MBED_APP_START 0x08000000
33+
#endif
3234

33-
ER_IROM1 0x08000000 0x200000 { ; load address = execution address
35+
; 2048 KB FLASH (0x200000)
36+
#if !defined(MBED_APP_SIZE)
37+
#define MBED_APP_SIZE 0x200000
38+
#endif
39+
40+
LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
41+
42+
ER_IROM1 MBED_APP_START MBED_APP_SIZE { ; load address = execution address
3443
*.o (RESET, +First)
3544
*(InRoot$$Sections)
3645
.ANY (+RO)
3746
}
3847

39-
; Total: 126 vectors = 504 bytes (0x1F8) to be reserved in RAM
48+
; 512KB SRAM (0x80000)
49+
; Total: 126 vectors = 504 bytes (0x1F8 + 0 byte for 8-byte data alignment) to be reserved in RAM
4050
RW_IRAM1 (0x20000000+0x1F8) (0x80000-0x1F8) { ; RW data
4151
.ANY (+RW +ZI)
4252
}

targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F769xI/device/TOOLCHAIN_ARM_STD/stm32f769xi.sct

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#! armcc -E
12
; Scatter-Loading Description File
23
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
34
; Copyright (c) 2016, STMicroelectronics
@@ -27,16 +28,25 @@
2728
; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2829
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2930

30-
; STM32F769NI: 2048 KB FLASH (0x200000) + 512 KB SRAM (0x80000)
31-
LR_IROM1 0x08000000 0x200000 { ; load region size_region
31+
#if !defined(MBED_APP_START)
32+
#define MBED_APP_START 0x08000000
33+
#endif
3234

33-
ER_IROM1 0x08000000 0x200000 { ; load address = execution address
35+
; 2048 KB FLASH (0x200000)
36+
#if !defined(MBED_APP_SIZE)
37+
#define MBED_APP_SIZE 0x200000
38+
#endif
39+
40+
LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
41+
42+
ER_IROM1 MBED_APP_START MBED_APP_SIZE { ; load address = execution address
3443
*.o (RESET, +First)
3544
*(InRoot$$Sections)
3645
.ANY (+RO)
3746
}
3847

39-
; Total: 126 vectors = 504 bytes (0x1F8) to be reserved in RAM
48+
; 512KB SRAM (0x80000)
49+
; Total: 126 vectors = 504 bytes (0x1F8 + 0 byte for 8-byte data alignment) to be reserved in RAM
4050
RW_IRAM1 (0x20000000+0x1F8) (0x80000-0x1F8) { ; RW data
4151
.ANY (+RW +ZI)
4252
}

targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F769xI/device/TOOLCHAIN_GCC_ARM/STM32F769xI.ld

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
1+
#if !defined(MBED_APP_START)
2+
#define MBED_APP_START 0x08000000
3+
#endif
4+
5+
#if !defined(MBED_APP_SIZE)
6+
#define MBED_APP_SIZE 2048K
7+
#endif
8+
19
/* Linker script to configure memory regions. */
10+
/* Total: 126 vectors = 504 bytes (0x1F8 + 0 byte for 8-byte data alignment) to be reserved in RAM */
211
MEMORY
312
{
4-
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 2048K
13+
FLASH (rx) : ORIGIN = MBED_APP_START, LENGTH = MBED_APP_SIZE
514
RAM (rwx) : ORIGIN = 0x200001F8, LENGTH = 512K - 0x1F8
615
}
716

targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F769xI/device/TOOLCHAIN_IAR/stm32f769xi.icf

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
/* [ROM = 2048kb = 0x200000] */
2-
define symbol __intvec_start__ = 0x08000000;
3-
define symbol __region_ROM_start__ = 0x08000000;
4-
define symbol __region_ROM_end__ = 0x081FFFFF;
2+
if (!isdefinedsymbol(MBED_APP_START)) { define symbol MBED_APP_START = 0x08000000; }
3+
if (!isdefinedsymbol(MBED_APP_SIZE)) { define symbol MBED_APP_SIZE = 0x200000; }
54

6-
/* [RAM = 512kb = 0x80000] Vector table dynamic copy: 126 vectors = 504 bytes (0x1F8) to be reserved in RAM */
5+
define symbol __intvec_start__ = MBED_APP_START;
6+
define symbol __region_ROM_start__ = MBED_APP_START;
7+
define symbol __region_ROM_end__ = MBED_APP_START + MBED_APP_SIZE - 1;
8+
9+
/* [RAM = 512kb = 0x80000] */
10+
/* Total: 126 vectors = 504 bytes (0x1F8 + 0 byte for 8-byte data alignment) to be reserved in RAM */
711
define symbol __NVIC_start__ = 0x20000000;
8-
define symbol __NVIC_end__ = 0x200001F7; /* Aligned on 8 bytes */
12+
define symbol __NVIC_end__ = 0x200001F7;
913
define symbol __region_RAM_start__ = 0x200001F8;
1014
define symbol __region_RAM_end__ = 0x2007FFFF;
1115

targets/targets.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2076,6 +2076,7 @@
20762076
"detect_code": ["0817"],
20772077
"macros_add": ["USB_STM_HAL", "USBHOST_OTHER"],
20782078
"device_has_add": ["ANALOGOUT", "CAN", "EMAC", "SERIAL_ASYNCH", "TRNG", "FLASH"],
2079+
"bootloader_supported": true,
20792080
"release_versions": ["2", "5"],
20802081
"device_name": "STM32F769NI",
20812082
"overrides": {

0 commit comments

Comments
 (0)