Skip to content

Commit 626804a

Browse files
authored
Merge pull request #13992 from jeromecoutant/PR_SCRIPT
STM32_gen_PeripheralPins.py v1.19
2 parents 3a71f31 + 186a258 commit 626804a

File tree

2 files changed

+138
-78
lines changed

2 files changed

+138
-78
lines changed

targets/TARGET_STM/README.md

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -158,17 +158,20 @@ It is recommended to use a python script to generate those files
158158

159159
https://github.com/ARMmbed/mbed-os/blob/master/targets/TARGET_STM/tools/STM32_gen_PeripheralPins.py
160160

161-
STM32CubeMX has to be installed first. Path has to be specified in the `cube_path.json` file.
161+
This script is using MCU database from https://github.com/STMicroelectronics/STM32_open_pin_data.git repo
162162

163163
```
164164
$ python targets/TARGET_STM/tools/STM32_gen_PeripheralPins.py -h
165165
166-
Script version 1.17
166+
SScript version 1.19
167+
168+
Checking STM32_open_pin_data repo...
169+
*** git clone done
170+
167171
usage: STM32_gen_PeripheralPins.py [-h] (-l | -b | -m xml | -t HW | -c CUSTOM)
172+
[-g]
168173
169-
Script will generate PeripheralPins.c thanks to the xml files description available in
170-
STM32CubeMX directory defined in 'cube_path.json':
171-
C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX
174+
Script will generate PeripheralPins.c thanks to the xml files description available in STM32_open_pin_data GitHub repo
172175
173176
More information in targets/TARGET_STM/README.md
174177
@@ -182,6 +185,7 @@ optional arguments:
182185
Parameter can be a filter like L496 (only the first file found will be parsed).
183186
-c CUSTOM, --custom CUSTOM
184187
specify a custom board .ioc file description to use (use double quotes).
188+
-g, --gpio Add GPIO PinMap table
185189
186190
Once generated, you have to check and comment pins that can not be used (specific HW, internal ADC channels, remove PWM using us ticker timer, ...)
187191
@@ -198,19 +202,22 @@ STM32F427Z(G-I)Tx.xml
198202
199203
$ python targets/TARGET_STM/tools/STM32_gen_PeripheralPins.py -m "STM32F427V(G-I)Tx.xml"
200204
201-
Script version 1.17
202-
CubeMX DB version DB.6.0.0
205+
Script version 1.19
206+
207+
Checking STM32_open_pin_data repo...
208+
Already up to date.
209+
210+
STM32_open_pin_data DB version STM32CubeMX-DB.6.0.10
203211
204212
* Output directory: targets_custom\TARGET_STM\TARGET_STM32F4\TARGET_STM32F427xG\TARGET_STM32F427VGT
205-
* Generating PeripheralPins.c and PinNames.h with 'C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX\db\mcu\STM32F427V(G-I)Tx.xml'
206-
* GPIO file: C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX\db\mcu\IP\GPIO-STM32F427_gpio_v1_0_Modes.xml
213+
* Generating PeripheralPins.c and PinNames.h with 'STM32_open_pin_data\mcu\STM32F427V(G-I)Tx.xml'
214+
* GPIO file: STM32_open_pin_data\mcu\IP\GPIO-STM32F427_gpio_v1_0_Modes.xml
207215
* I/O pins found: 135 connected: 0
208216
209217
* Output directory: targets_custom\TARGET_STM\TARGET_STM32F4\TARGET_STM32F427xI\TARGET_STM32F427VIT
210-
* Generating PeripheralPins.c and PinNames.h with 'C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX\db\mcu\STM32F427V(G-I)Tx.xml'
211-
* GPIO file: C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX\db\mcu\IP\GPIO-STM32F427_gpio_v1_0_Modes.xml
218+
* Generating PeripheralPins.c and PinNames.h with 'STM32_open_pin_data\mcu\STM32F427V(G-I)Tx.xml'
219+
* GPIO file: STM32_open_pin_data\mcu\IP\GPIO-STM32F427_gpio_v1_0_Modes.xml
212220
* I/O pins found: 135 connected: 0
213-
214221
```
215222

216223
### Use of custom_targets.json

0 commit comments

Comments
 (0)