Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 83bc63f

Browse filesBrowse files
committed
[STM32MP157_DK] Start adding the first STM32MP1 Dev Board
1 parent 23eceb0 commit 83bc63f
Copy full SHA for 83bc63f

File tree

4 files changed

+399
-0
lines changed
Filter options

4 files changed

+399
-0
lines changed
+25Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
* This file could be generated thanks a python script: genpinmap_arduino.py
3+
*
4+
* This script allows to generate the pins mapping of a STM32 MCU.
5+
*
6+
* It is included with the STM32Tools package install with this core.
7+
* Go to:
8+
* <local Arduino directory>\packages\STM32\tools\STM32Tools\<version>\tools\src\genpinmap\
9+
* Tips: <local Arduino directory> is displayed in the "Preferences" dialog of the Arduino IDE.
10+
*
11+
* This script is able to generate the PeripheralPins.c using STM32
12+
* xml file description in Cube MX.
13+
* After file generation, review it carefully.
14+
* Comment a line if the pin is generated several times for the same IP
15+
* or if the pin should not be used
16+
* (overlaid with some HW on the board, for instance)
17+
*
18+
* USAGE: genpinmap_arduino.py <BOARD_NAME> <product xml file name>
19+
*
20+
* <BOARD_NAME> is the name of the board as it will be named in variant folder
21+
* <product xml file name> is the STM32 file description in Cube MX
22+
*
23+
* !!This xml file contains non alpha characters in its name, you should call it with quotes
24+
*
25+
*/

‎variants/STM32MP157_DK/ldscript.ld

Copy file name to clipboard
+26Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
*****************************************************************************
3+
**
4+
** File : ldscript.ld
5+
**
6+
** Abstract : Linker script for STM32 Device
7+
**
8+
** Set heap size, stack size and stack location according
9+
** to application requirements.
10+
**
11+
** Set memory bank area and size if external memory is used.
12+
**
13+
** Target : STMicroelectronics STM32
14+
**
15+
**
16+
*****************************************************************************
17+
*/
18+
/* Copy here linker script for the new STM32 Device
19+
* or
20+
* replace this file by the new one with the same file name
21+
* It could be get thanks STM32CubeMX after code generation for Toolchain/IDE: 'SW4STM32',
22+
* ldscript will be availabe in the root folder (STM32YYxxxxxx_FLASH.ld)
23+
* or
24+
* copied from a STM32CubeYY project examples
25+
* where 'YY' could be F0, F1, F2, F3, F4, F7, G0, H7, L0, L1, L4, WB)
26+
*/

‎variants/STM32MP157_DK/variant.cpp

Copy file name to clipboard
+168Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
/*
2+
*******************************************************************************
3+
* Copyright (c) 2017, 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+
31+
#include "pins_arduino.h"
32+
33+
#ifdef __cplusplus
34+
extern "C" {
35+
#endif
36+
37+
// Pin number
38+
// This array allows to wrap Arduino pin number(Dx or x)
39+
// to STM32 PinName (PX_n)
40+
const PinName digitalPin[] = {
41+
//PX_n, //Dx
42+
P, //D0
43+
P, //D1
44+
P, //D2
45+
P, //D3
46+
P, //D4
47+
P, //D5
48+
P, //D6
49+
P, //D7
50+
P, //D8
51+
P, //D9
52+
P, //D10
53+
P, //D11
54+
P, //D12
55+
P, //D13
56+
P, //D14
57+
P, //D15
58+
P, //D16
59+
P, //D17
60+
P, //D18
61+
P, //D19
62+
P, //D20
63+
P, //D21
64+
P, //D22
65+
P, //D23
66+
P, //D24
67+
P, //D25
68+
P, //D26
69+
P, //D27
70+
P, //D28
71+
P, //D29
72+
P, //D30
73+
P, //D31
74+
P, //D32
75+
P, //D33
76+
P, //D34
77+
P, //D35
78+
P, //D36
79+
P, //D37
80+
P, //D38
81+
P, //D39
82+
P, //D40
83+
P, //D41
84+
P, //D42
85+
P, //D43
86+
P, //D44
87+
P, //D45
88+
P, //D46
89+
P, //D47
90+
P, //D48
91+
P, //D49
92+
P, //D50
93+
P, //D51
94+
P, //D52
95+
P, //D53
96+
P, //D54
97+
P, //D55
98+
P, //D56
99+
P, //D57
100+
P, //D58
101+
P, //D59
102+
P, //D60
103+
P, //D61
104+
P, //D62
105+
P, //D63
106+
P, //D64
107+
P, //D65
108+
P, //D66
109+
P, //D67
110+
P, //D68
111+
P, //D69
112+
P, //D70
113+
P, //D71
114+
P, //D72
115+
P, //D73
116+
P, //D74
117+
P, //D75
118+
P, //D76
119+
P, //D77
120+
P, //D78/A0
121+
P, //D79/A1
122+
P, //D80/A2
123+
P, //D81/A3
124+
P, //D82/A4
125+
P, //D83/A5
126+
P, //D84/A6
127+
P, //D85/A7
128+
P, //D86/A8
129+
P, //D87/A9
130+
// Duplicated pins in order to be aligned with PinMap_ADC
131+
P, //D88/A10 = D
132+
P, //D89/A11 = D
133+
P, //D90/A12 = D
134+
P, //D91/A13 = D
135+
P, //D92/A14 = D
136+
P, //D93/A15 = D
137+
P, //D94/A16 = D
138+
P //D95/A17 = D
139+
};
140+
141+
#ifdef __cplusplus
142+
}
143+
#endif
144+
145+
// ----------------------------------------------------------------------------
146+
147+
#ifdef __cplusplus
148+
extern "C" {
149+
#endif
150+
151+
/**
152+
* @brief System Clock Configuration
153+
* @param None
154+
* @retval None
155+
*/
156+
WEAK void SystemClock_Config(void)
157+
{
158+
// Here copy the desired System Clock Configuration
159+
// It could be generated thanks STM32CubeMX after code generation for Toolchain/IDE: 'SW4STM32',
160+
// available in src/main.c
161+
// or
162+
// copied from a STM32CubeYY project examples
163+
// where 'YY' could be F0, F1, F2, F3, F4, F7, G0, H7, L0, L1, L4, WB
164+
}
165+
166+
#ifdef __cplusplus
167+
}
168+
#endif

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.