Skip to content

Commit 2b5f031

Browse files
authored
Merge pull request #2039 from LMESTM/dev_NUCLEO_F446ZE
Add nucleo_f446ze
2 parents 4c03193 + 6671e1a commit 2b5f031

File tree

42 files changed

+13901
-19
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+13901
-19
lines changed

hal/targets.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -751,6 +751,18 @@
751751
"device_has": ["ANALOGIN", "ANALOGOUT", "CAN", "ERROR_RED", "I2C", "I2CSLAVE", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SLEEP", "SPI", "SPISLAVE", "STDIO_MESSAGES"],
752752
"default_build": "small"
753753
},
754+
"NUCLEO_F446ZE": {
755+
"supported_form_factors": ["ARDUINO", "MORPHO"],
756+
"core": "Cortex-M4F",
757+
"default_toolchain": "uARM",
758+
"extra_labels": ["STM", "STM32F4", "STM32F446ZE"],
759+
"supported_toolchains": ["ARM", "uARM", "GCC_ARM", "IAR"],
760+
"inherits": ["Target"],
761+
"progen": {"target": "nucleo-f446ze"},
762+
"detect_code": ["0778"],
763+
"device_has": ["ANALOGIN", "ANALOGOUT", "CAN", "ERROR_RED", "I2C", "I2CSLAVE", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SLEEP", "SPI", "SPISLAVE", "STDIO_MESSAGES"],
764+
"default_build": "small"
765+
},
754766
"B96B_F446VE": {
755767
"supported_form_factors": ["ARDUINO", "MORPHO"],
756768
"core": "Cortex-M4F",

hal/targets/cmsis/TARGET_STM/TARGET_STM32F4/TARGET_NUCLEO_F446ZE/TOOLCHAIN_ARM_MICRO/startup_stm32f446xx.s

Lines changed: 440 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) 2015, 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+
; 512 KB FLASH (0x80000) + 128 KB SRAM (0x20000)
31+
LR_IROM1 0x08000000 0x80000 { ; load region size_region
32+
33+
ER_IROM1 0x08000000 0x80000 { ; load address = execution address
34+
*.o (RESET, +First)
35+
*(InRoot$$Sections)
36+
.ANY (+RO)
37+
}
38+
39+
; Total: 113 vectors = 452 bytes (0x1C4) to be reserved in RAM
40+
RW_IRAM1 (0x20000000+0x1C4) (0x20000-0x1C4) { ; 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) 2015, 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

0 commit comments

Comments
 (0)