@@ -158,17 +158,20 @@ It is recommended to use a python script to generate those files
158
158
159
159
https://github.com/ARMmbed/mbed-os/blob/master/targets/TARGET_STM/tools/STM32_gen_PeripheralPins.py
160
160
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
162
162
163
163
```
164
164
$ python targets/TARGET_STM/tools/STM32_gen_PeripheralPins.py -h
165
165
166
- Script version 1.17
166
+ SScript version 1.19
167
+
168
+ Checking STM32_open_pin_data repo...
169
+ *** git clone done
170
+
167
171
usage: STM32_gen_PeripheralPins.py [-h] (-l | -b | -m xml | -t HW | -c CUSTOM)
172
+ [-g]
168
173
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
172
175
173
176
More information in targets/TARGET_STM/README.md
174
177
@@ -182,6 +185,7 @@ optional arguments:
182
185
Parameter can be a filter like L496 (only the first file found will be parsed).
183
186
-c CUSTOM, --custom CUSTOM
184
187
specify a custom board .ioc file description to use (use double quotes).
188
+ -g, --gpio Add GPIO PinMap table
185
189
186
190
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
191
@@ -198,19 +202,22 @@ STM32F427Z(G-I)Tx.xml
198
202
199
203
$ python targets/TARGET_STM/tools/STM32_gen_PeripheralPins.py -m "STM32F427V(G-I)Tx.xml"
200
204
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
203
211
204
212
* 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
207
215
* I/O pins found: 135 connected: 0
208
216
209
217
* 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
212
220
* I/O pins found: 135 connected: 0
213
-
214
221
```
215
222
216
223
### Use of custom_targets.json
0 commit comments