Arduino_Tools/src/genpinmap/genpinmap_arduino.sh
Frederic.Pillon e7bc10e0f0 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 #10

Signed-off-by: Frederic.Pillon <frederic.pillon@st.com>
2017-07-04 17:44:08 +02:00

34 lines
1.4 KiB
Bash
Executable file

#!/bin/bash -
#===============================================================================
#
# FILE: genpinmap_arduino.sh
#
# USAGE: ./genpinmap_arduino.sh
#
# DESCRIPTION:
#
# OPTIONS: None
# BUGS: ---
# NOTES: ---
# AUTHOR: fpistm
# ORGANIZATION: STMicroelectronics
# CREATED: 03/07/17 08:42
# REVISION: 1.0
#===============================================================================
set -o nounset # Treat unset variables as an error
# See xml file name in <STM32CubeMX install dir>\db\mcu
# GPIO AF function not supported:: python genpinmap_arduino.py NUCLEO_F030R8 "STM32F030R8Tx.xml"
# GPIO AF function not supported::python genpinmap_arduino.py DISCO_F051R8 "STM32F051R8Tx.xml"
#
python genpinmap_arduino.py NUCLEO_F030R8 "STM32F030R8Tx.xml"
python genpinmap_arduino.py NUCLEO_F091RC "STM32F091R(B-C)Tx.xml"
python genpinmap_arduino.py NUCLEO_F303RE "STM32F303R(D-E)Tx.xml"
python genpinmap_arduino.py NUCLEO_F429ZI "STM32F429Z(E-G-I)Tx.xml"
python genpinmap_arduino.py DISCO_F407G "STM32F407V(E-G)Tx.xml"
python genpinmap_arduino.py DISCO_F746NG "STM32F746N(E-G)Hx.xml"
python genpinmap_arduino.py NUCLEO_L053R8 "STM32L053R(6-8)Tx.xml"
python genpinmap_arduino.py NUCLEO_L432KC "STM32L432K(B-C)Ux.xml"
python genpinmap_arduino.py NUCLEO_L476RG "STM32L475R(C-E-G)Tx.xml"