Skip to content

Commit 994cece

Browse files
committed
[disco_f769ni] adding target
1 parent 72b0d46 commit 994cece

File tree

24 files changed

+16388
-0
lines changed

24 files changed

+16388
-0
lines changed

hal/targets.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,6 +1106,17 @@
11061106
"features": ["IPV4"],
11071107
"release_versions": ["2", "5"]
11081108
},
1109+
"DISCO_F769NI": {
1110+
"inherits": ["Target"],
1111+
"core": "Cortex-M7FD",
1112+
"extra_labels": ["STM", "STM32F7", "STM32F769", "STM32F769NI"],
1113+
"supported_toolchains": ["ARM", "GCC_ARM", "IAR"],
1114+
"default_toolchain": "ARM",
1115+
"progen": {"target": "disco-f769ni"},
1116+
"detect_code": ["0817"],
1117+
"device_has": ["ANALOGIN", "ANALOGOUT", "I2C", "I2CSLAVE", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SLEEP", "SPI", "SPISLAVE", "STDIO_MESSAGES"],
1118+
"release_versions": ["2"]
1119+
},
11091120
"DISCO_L476VG": {
11101121
"inherits": ["Target"],
11111122
"core": "Cortex-M4F",

hal/targets/cmsis/TARGET_STM/TARGET_STM32F7/TARGET_DISCO_F769NI/TOOLCHAIN_ARM_STD/startup_stm32f769xx.S

Lines changed: 479 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
; Scatter-Loading Description File
2+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3+
; Copyright (c) 2016, STMicroelectronics
4+
; All rights reserved.
5+
;
6+
; Redistribution and use in source and binary forms, with or without
7+
; modification, are permitted provided that the following conditions are met:
8+
;
9+
; 1. Redistributions of source code must retain the above copyright notice,
10+
; this list of conditions and the following disclaimer.
11+
; 2. Redistributions in binary form must reproduce the above copyright notice,
12+
; this list of conditions and the following disclaimer in the documentation
13+
; and/or other materials provided with the distribution.
14+
; 3. Neither the name of STMicroelectronics nor the names of its contributors
15+
; may be used to endorse or promote products derived from this software
16+
; without specific prior written permission.
17+
;
18+
; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19+
; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20+
; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21+
; DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
22+
; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23+
; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24+
; SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
25+
; CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
26+
; OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27+
; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
29+
30+
; STM32F769NI: 2048 KB FLASH (0x200000) + 512 KB SRAM (0x80000)
31+
LR_IROM1 0x08000000 0x200000 { ; load region size_region
32+
33+
ER_IROM1 0x08000000 0x200000 { ; load address = execution address
34+
*.o (RESET, +First)
35+
*(InRoot$$Sections)
36+
.ANY (+RO)
37+
}
38+
39+
; Total: 126 vectors = 504 bytes (0x1F8) to be reserved in RAM
40+
RW_IRAM1 (0x20000000+0x1F8) (0x80000-0x1F8) { ; RW data
41+
.ANY (+RW +ZI)
42+
}
43+
44+
}
45+
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
/* mbed Microcontroller Library - stackheap
2+
* Setup a fixed single stack/heap memory model,
3+
* between the top of the RW/ZI region and the stackpointer
4+
*******************************************************************************
5+
* Copyright (c) 2014, STMicroelectronics
6+
* All rights reserved.
7+
*
8+
* Redistribution and use in source and binary forms, with or without
9+
* modification, are permitted provided that the following conditions are met:
10+
*
11+
* 1. Redistributions of source code must retain the above copyright notice,
12+
* this list of conditions and the following disclaimer.
13+
* 2. Redistributions in binary form must reproduce the above copyright notice,
14+
* this list of conditions and the following disclaimer in the documentation
15+
* and/or other materials provided with the distribution.
16+
* 3. Neither the name of STMicroelectronics nor the names of its contributors
17+
* may be used to endorse or promote products derived from this software
18+
* without specific prior written permission.
19+
*
20+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21+
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30+
*******************************************************************************
31+
*/
32+
33+
#ifdef __cplusplus
34+
extern "C" {
35+
#endif
36+
37+
#include <rt_misc.h>
38+
#include <stdint.h>
39+
40+
extern char Image$$RW_IRAM1$$ZI$$Limit[];
41+
42+
extern __value_in_regs struct __initial_stackheap __user_setup_stackheap(uint32_t R0, uint32_t R1, uint32_t R2, uint32_t R3) {
43+
uint32_t zi_limit = (uint32_t)Image$$RW_IRAM1$$ZI$$Limit;
44+
uint32_t sp_limit = __current_sp();
45+
46+
zi_limit = (zi_limit + 7) & ~0x7; // ensure zi_limit is 8-byte aligned
47+
48+
struct __initial_stackheap r;
49+
r.heap_base = zi_limit;
50+
r.heap_limit = sp_limit;
51+
return r;
52+
}
53+
54+
#ifdef __cplusplus
55+
}
56+
#endif
Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
/* Linker script to configure memory regions. */
2+
MEMORY
3+
{
4+
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 2048K
5+
RAM (rwx) : ORIGIN = 0x200001F8, LENGTH = 512K - 0x1F8
6+
}
7+
8+
/* Linker script to place sections and symbol values. Should be used together
9+
* with other linker script that defines memory regions FLASH and RAM.
10+
* It references following symbols, which must be defined in code:
11+
* Reset_Handler : Entry of reset handler
12+
*
13+
* It defines following symbols, which code can use without definition:
14+
* __exidx_start
15+
* __exidx_end
16+
* __etext
17+
* __data_start__
18+
* __preinit_array_start
19+
* __preinit_array_end
20+
* __init_array_start
21+
* __init_array_end
22+
* __fini_array_start
23+
* __fini_array_end
24+
* __data_end__
25+
* __bss_start__
26+
* __bss_end__
27+
* __end__
28+
* end
29+
* __HeapLimit
30+
* __StackLimit
31+
* __StackTop
32+
* __stack
33+
* _estack
34+
*/
35+
ENTRY(Reset_Handler)
36+
37+
SECTIONS
38+
{
39+
.text :
40+
{
41+
KEEP(*(.isr_vector))
42+
*(.text*)
43+
KEEP(*(.init))
44+
KEEP(*(.fini))
45+
46+
/* .ctors */
47+
*crtbegin.o(.ctors)
48+
*crtbegin?.o(.ctors)
49+
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
50+
*(SORT(.ctors.*))
51+
*(.ctors)
52+
53+
/* .dtors */
54+
*crtbegin.o(.dtors)
55+
*crtbegin?.o(.dtors)
56+
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
57+
*(SORT(.dtors.*))
58+
*(.dtors)
59+
60+
*(.rodata*)
61+
62+
KEEP(*(.eh_frame*))
63+
} > FLASH
64+
65+
.ARM.extab :
66+
{
67+
*(.ARM.extab* .gnu.linkonce.armextab.*)
68+
} > FLASH
69+
70+
__exidx_start = .;
71+
.ARM.exidx :
72+
{
73+
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
74+
} > FLASH
75+
__exidx_end = .;
76+
77+
__etext = .;
78+
_sidata = .;
79+
80+
.data : AT (__etext)
81+
{
82+
__data_start__ = .;
83+
_sdata = .;
84+
*(vtable)
85+
*(.data*)
86+
87+
. = ALIGN(4);
88+
/* preinit data */
89+
PROVIDE_HIDDEN (__preinit_array_start = .);
90+
KEEP(*(.preinit_array))
91+
PROVIDE_HIDDEN (__preinit_array_end = .);
92+
93+
. = ALIGN(4);
94+
/* init data */
95+
PROVIDE_HIDDEN (__init_array_start = .);
96+
KEEP(*(SORT(.init_array.*)))
97+
KEEP(*(.init_array))
98+
PROVIDE_HIDDEN (__init_array_end = .);
99+
100+
101+
. = ALIGN(4);
102+
/* finit data */
103+
PROVIDE_HIDDEN (__fini_array_start = .);
104+
KEEP(*(SORT(.fini_array.*)))
105+
KEEP(*(.fini_array))
106+
PROVIDE_HIDDEN (__fini_array_end = .);
107+
108+
KEEP(*(.jcr*))
109+
. = ALIGN(4);
110+
/* All data end */
111+
__data_end__ = .;
112+
_edata = .;
113+
114+
} > RAM
115+
116+
.bss :
117+
{
118+
. = ALIGN(4);
119+
__bss_start__ = .;
120+
_sbss = .;
121+
*(.bss*)
122+
*(COMMON)
123+
. = ALIGN(4);
124+
__bss_end__ = .;
125+
_ebss = .;
126+
} > RAM
127+
128+
.heap (COPY):
129+
{
130+
__end__ = .;
131+
end = __end__;
132+
*(.heap*)
133+
__HeapLimit = .;
134+
} > RAM
135+
136+
/* .stack_dummy section doesn't contains any symbols. It is only
137+
* used for linker to calculate size of stack sections, and assign
138+
* values to stack symbols later */
139+
.stack_dummy (COPY):
140+
{
141+
*(.stack*)
142+
} > RAM
143+
144+
/* Set stack top to end of RAM, and stack limit move down by
145+
* size of stack_dummy section */
146+
__StackTop = ORIGIN(RAM) + LENGTH(RAM);
147+
_estack = __StackTop;
148+
__StackLimit = __StackTop - SIZEOF(.stack_dummy);
149+
PROVIDE(__stack = __StackTop);
150+
151+
/* Check if data + heap + stack exceeds RAM limit */
152+
ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack")
153+
}

0 commit comments

Comments
 (0)