Skip to content

Commit e7bc10e

Browse files
committed
Add genpinmap script
This tool allows to generate the pins mapping of an STM32 MCU. This script is able to generate the PeripheralPins.c using STM32 xml file description in Cube MX. After file generation, review it carefully. Comment a line if the pin is generated several times for the same IP or if the pin should not be used (overlaid with some HW on the board, for instance) USAGE: genpinmap_arduino.py <BOARD_NAME> <product xml file name> <BOARD_NAME> is the name of the board as it will be named in mbed <product xml file name> is the STM32 file description in Cube MX !!This xml file contains non alpha characters in its name, you should call it with quotes Fix stm32duino#10 Signed-off-by: Frederic.Pillon <[email protected]>
1 parent 5b2d2ef commit e7bc10e

File tree

4 files changed

+657
-0
lines changed

4 files changed

+657
-0
lines changed

src/genpinmap/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Arduino

src/genpinmap/genpinmap_arduino.bat

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
:: See xml file name in C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX\db\mcu
2+
3+
:: GPIO AF function not supported:: python genpinmap_arduino.py NUCLEO_F030R8 "STM32F030R8Tx.xml"
4+
:: GPIO AF function not supported::python genpinmap_arduino.py DISCO_F051R8 "STM32F051R8Tx.xml"
5+
6+
python genpinmap_arduino.py NUCLEO_F030R8 "STM32F030R8Tx.xml"
7+
python genpinmap_arduino.py NUCLEO_F091RC "STM32F091R(B-C)Tx.xml"
8+
python genpinmap_arduino.py NUCLEO_F303RE "STM32F303R(D-E)Tx.xml"
9+
python genpinmap_arduino.py NUCLEO_F429ZI "STM32F429Z(E-G-I)Tx.xml"
10+
python genpinmap_arduino.py DISCO_F407G "STM32F407V(E-G)Tx.xml"
11+
python genpinmap_arduino.py DISCO_F746NG "STM32F746N(E-G)Hx.xml"
12+
python genpinmap_arduino.py NUCLEO_L053R8 "STM32L053R(6-8)Tx.xml"
13+
python genpinmap_arduino.py NUCLEO_L432KC "STM32L432K(B-C)Ux.xml"
14+
python genpinmap_arduino.py NUCLEO_L476RG "STM32L475R(C-E-G)Tx.xml"
15+
16+
pause
17+
::python genpinmap_arduino.py B96B_F446VE "STM32F446V(C-E)Tx.xml"
18+
::python genpinmap_arduino.py DISCO_F303VC "STM32F303V(B-C)Tx.xml"
19+
::python genpinmap_arduino.py DISCO_F334C8 "STM32F334C(4-6-8)Tx.xml"
20+
::python genpinmap_arduino.py DISCO_F429ZI "STM32F429Z(E-G-I)Tx.xml"
21+
::python genpinmap_arduino.py DISCO_F469NI "STM32F469N(E-G-I)Hx.xml"
22+
::python genpinmap_arduino.py DISCO_F746NG "STM32F746N(E-G)Hx.xml"
23+
::python genpinmap_arduino.py DISCO_L053C8 "STM32L053C(6-8)Tx.xml"
24+
::python genpinmap_arduino.py DISCO_L476VG "STM32L476V(C-E-G)Tx.xml"
25+
::pause
26+
::python genpinmap_arduino.py NUCLEO_F031K6 "STM32F031K6Tx.xml"
27+
::python genpinmap_arduino.py NUCLEO_F042K6 "STM32F042K6Tx.xml"
28+
::python genpinmap_arduino.py NUCLEO_F070RB "STM32F070RBTx.xml"
29+
::python genpinmap_arduino.py NUCLEO_F072RB "STM32F072R(8-B)Tx.xml"
30+
::python genpinmap_arduino.py NUCLEO_F091RC "STM32F091R(B-C)Tx.xml"
31+
::pause
32+
::python genpinmap_arduino.py NUCLEO_F103RB "STM32F103R(8-B)Tx.xml"
33+
::python genpinmap_arduino.py NUCLEO_F302R8 "STM32F302R(6-8)Tx.xml"
34+
::python genpinmap_arduino.py NUCLEO_F303K8 "STM32F303R(6-8)Tx.xml"
35+
::python genpinmap_arduino.py NUCLEO_F303RE "STM32F303R(D-E)Tx.xml"
36+
::python genpinmap_arduino.py NUCLEO_F334R8 "STM32F334R(6-8)Tx.xml"
37+
::pause
38+
::python genpinmap_arduino.py NUCLEO_F401RE "STM32F401R(D-E)Tx.xml"
39+
::python genpinmap_arduino.py NUCLEO_F410RB "STM32F410R(8-B)Tx.xml"
40+
::python genpinmap_arduino.py NUCLEO_F411RE "STM32F411R(C-E)Tx.xml"
41+
::python genpinmap_arduino.py NUCLEO_F446RE "STM32F446R(C-E)Tx.xml"
42+
::python genpinmap_arduino.py NUCLEO_F446ZE "STM32F446Z(C-E)Tx.xml"
43+
::pause
44+
::python genpinmap_arduino.py NUCLEO_F746ZG "STM32F746Z(E-G)Tx.xml"
45+
::python genpinmap_arduino.py NUCLEO_F767ZI "STM32F767Z(G-I)Tx.xml"
46+
::pause
47+
::python genpinmap_arduino.py NUCLEO_L011K4 "STM32L011K(3-4)Tx.xml"
48+
::python genpinmap_arduino.py NUCLEO_L031K6 "STM32L031K(4-6)Tx.xml"
49+
::python genpinmap_arduino.py NUCLEO_L053R8 "STM32L053R(6-8)Tx.xml"
50+
::python genpinmap_arduino.py NUCLEO_L073RZ "STM32L073R(B-Z)Tx.xml"
51+
::pause
52+
::python genpinmap_arduino.py NUCLEO_L152RE "STM32L152RETx.xml"
53+
::python genpinmap_arduino.py NUCLEO_L476RG "STM32L475R(C-E-G)Tx.xml"
54+
::pause

0 commit comments

Comments
 (0)