diff --git a/targets/TARGET_STM/tools/STM32_gen_PeripheralPins.py b/targets/TARGET_STM/tools/STM32_gen_PeripheralPins.py index 63f0e875998..4731e5ea94e 100644 --- a/targets/TARGET_STM/tools/STM32_gen_PeripheralPins.py +++ b/targets/TARGET_STM/tools/STM32_gen_PeripheralPins.py @@ -27,6 +27,8 @@ from argparse import RawTextHelpFormatter import subprocess +if sys.version_info[0] < 3: raise Exception("Python 3+ is required (recommended latest one)") + GENPINMAP_VERSION = "1.20.5" ADD_DEVICE_IF = 0