Skip to content

Commit 2d25882

Browse files
committed
STM32_gen_PeripheralPins.py v1.17
- GPIO xml parsing correction (#13711) - Octo SPI support - bug correction - warning style correction - new TIM_MST choice algo - full PinNames.h file creation - output directory is now targets_custom/TARGET_STM/TARGET_STM32XX/TARGET_STM32XXXX
1 parent ad40b1b commit 2d25882

File tree

2 files changed

+713
-467
lines changed

2 files changed

+713
-467
lines changed

targets/TARGET_STM/README.md

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -163,13 +163,15 @@ STM32CubeMX has to be installed first. Path has to be specified in the `cube_pat
163163
```
164164
$ python tools/targets/STM32_gen_PeripheralPins.py -h
165165
166-
Script version 1.9
167-
usage: STM32_gen_PeripheralPins.py [-h] [-l | -b | -m xml | -t HW | -c CUSTOM]
166+
Script version 1.17
167+
usage: STM32_gen_PeripheralPins.py [-h] (-l | -b | -m xml | -t HW | -c CUSTOM)
168168
169169
Script will generate PeripheralPins.c thanks to the xml files description available in
170170
STM32CubeMX directory defined in 'cube_path.json':
171171
C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX
172172
173+
More information in targets/TARGET_STM/README.md
174+
173175
optional arguments:
174176
-h, --help show this help message and exit
175177
-l, --list list available mcu xml files description in STM32CubeMX
@@ -182,6 +184,7 @@ optional arguments:
182184
specify a custom board .ioc file description to use (use double quotes).
183185
184186
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, ...)
187+
185188
```
186189

187190
How to generate files for a custom boards based on a STM32F427 MCU:
@@ -195,13 +198,19 @@ STM32F427Z(G-I)Tx.xml
195198
196199
$ python tools/targets/STM32_gen_PeripheralPins.py -m "STM32F427V(G-I)Tx.xml"
197200
198-
Script version 1.9
199-
CubeMX DB version DB.5.0.60
201+
Script version 1.17
202+
CubeMX DB version DB.6.0.0
200203
201-
* Output directory: C:\github\mbed\STM32F427V(G-I)Tx
202-
* Generating PeripheralPins.c and PinNames.h with 'STM32F427V(G-I)Tx.xml'
204+
* 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'
203206
* GPIO file: C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX\db\mcu\IP\GPIO-STM32F427_gpio_v1_0_Modes.xml
204-
* I/O pins found: 82 connected: 0
207+
* I/O pins found: 135 connected: 0
208+
209+
* 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
212+
* I/O pins found: 135 connected: 0
213+
205214
```
206215

207216
### Use of custom_targets.json
@@ -213,9 +222,9 @@ Example with a board based on STM32F103C8 (like BluePill):
213222

214223
```
215224
$ python tools/targets/STM32_gen_PeripheralPins.py -m "STM32F103C(8-B)Tx.xml"
216-
// PeripheralPins.c and PinNames.h template files are created in STM32H745ZITx directory
225+
// PeripheralPins.c and PinNames.h template files are created in targets_custom/TARGET_STM/TARGET_STM32F1/TARGET_STM32F103x8/TARGET_STM32F103C8T directory
217226
218-
$ mv STM32F103C\(8-B\)Tx/ TARGET_BLUEPILL_F103C8
227+
$ mv TARGET_STM32F103C8T TARGET_BLUEPILL_F103C8
219228
// Edit PeripheralPins.c and PinNames.h to match your board configuration
220229
221230
// Create a custom_targets.json with:
@@ -241,9 +250,9 @@ Example with a board based on STM32H745ZI
241250

242251
```
243252
$ python tools/targets/STM32_gen_PeripheralPins.py -m "STM32H745ZITx.xml"
244-
// PeripheralPins.c and PinNames.h template files are created in STM32H745ZITx directory
253+
// PeripheralPins.c and PinNames.h template files are created in targets_custom/TARGET_STM/TARGET_STM32H7/TARGET_STM32H745xI/TARGET_STM32H745ZIT directory
245254
246-
$ mv STM32H745ZITx TARGET_H745ZI_BOARD
255+
$ mv TARGET_STM32H745ZIT TARGET_H745ZI_BOARD
247256
// Edit PeripheralPins.c and PinNames.h to match your board configuration
248257
249258
// Create a custom_targets.json with:

0 commit comments

Comments
 (0)