|
1 | 1 | """
|
2 | 2 | * mbed Microcontroller Library
|
3 | 3 | * Copyright (c) 2006-2018 ARM Limited
|
| 4 | +* Copyright (c) 2019 STMicroelectronics |
4 | 5 | *
|
5 | 6 | * Licensed under the Apache License, Version 2.0 (the "License");
|
6 | 7 | * you may not use this file except in compliance with the License.
|
|
26 | 27 | from xml.dom.minidom import parse, Node
|
27 | 28 | from argparse import RawTextHelpFormatter
|
28 | 29 |
|
29 |
| -GENPINMAP_VERSION = "1.5" |
| 30 | +GENPINMAP_VERSION = "1.7" |
30 | 31 |
|
31 | 32 | ADD_DEVICE_IF = 0
|
32 | 33 | ADD_QSPI_FEATURE = 1
|
|
79 | 80 | "NUCLEO_F446RE":"TIM5",
|
80 | 81 | "NUCLEO_F410RB":"TIM5",
|
81 | 82 | "NUCLEO_F429ZI":"TIM5",
|
| 83 | +"STM32F427V(G-I)Tx":"TIM5", |
82 | 84 | "NUCLEO_F446ZE":"TIM5",
|
83 | 85 | "NUCLEO_F412ZG":"TIM5",
|
84 | 86 | "NUCLEO_F413ZH":"TIM5",
|
|
99 | 101 | "NUCLEO_L4R5ZI":"TIM5",
|
100 | 102 | "NUCLEO_L4R5ZI_P":"TIM5",
|
101 | 103 |
|
| 104 | +"NUCLEO_WB55R":"TIM16", |
102 | 105 | "DISCO_F051R8":"TIM1",
|
103 | 106 | "DISCO_F100RB":"TIM4",
|
104 | 107 | "DISCO_F303VC":"TIM2",
|
|
114 | 117 | "DISCO_L072CZ_LRWAN1":"TIM21",
|
115 | 118 | "DISCO_L475VG_IOT01A":"TIM5",
|
116 | 119 | "DISCO_L476VG":"TIM5",
|
117 |
| -"DISCO_L496AG":"TIM5" |
| 120 | +"DISCO_L496AG":"TIM5", |
| 121 | +"DISCO_L4R9A":"TIM5" |
118 | 122 | }
|
119 | 123 |
|
120 | 124 |
|
@@ -852,7 +856,10 @@ def print_qspi(l):
|
852 | 856 | CommentedLine = "//"
|
853 | 857 | s1 = "%-16s" % (CommentedLine + " {" + p[0] + ',')
|
854 | 858 | # p[2] : QUADSPI_BK1_IO3 / QUADSPI_CLK / QUADSPI_NCS
|
855 |
| - s1 += "%-8s" % ('QSPI_1,') |
| 859 | + if "OCTOSPIM_P2" in p[2]: |
| 860 | + s1 += "%-8s" % ('QSPI_2,') |
| 861 | + else: |
| 862 | + s1 += "%-8s" % ('QSPI_1,') |
856 | 863 | result = result.replace("GPIO_AF10_OTG_FS", "GPIO_AF10_QSPI")
|
857 | 864 | s1 += 'STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, ' + result +')},'
|
858 | 865 | s1 += ' // ' + p[2]
|
@@ -1001,13 +1008,13 @@ def parse_pins():
|
1001 | 1008 | store_can(pin, name, sig)
|
1002 | 1009 | if "ETH" in sig:
|
1003 | 1010 | store_eth(pin, name, sig)
|
1004 |
| - if "QUADSPI" in sig: |
| 1011 | + if "QUADSPI" in sig or "OCTOSPI" in sig: |
1005 | 1012 | store_qspi(pin, name, sig)
|
1006 | 1013 | if "USB" in sig:
|
1007 | 1014 | store_usb(pin, name, sig)
|
1008 | 1015 | if "RCC_OSC" in sig:
|
1009 | 1016 | store_osc(pin, name, sig)
|
1010 |
| - if "SYS_" in sig: |
| 1017 | + if "SYS_" in sig or "PWR_" in sig or "DEBUG_" in sig: |
1011 | 1018 | store_sys(pin, name, sig)
|
1012 | 1019 |
|
1013 | 1020 |
|
@@ -1072,6 +1079,8 @@ def parse_BoardFile(fileName):
|
1072 | 1079 | PinLabel[EachPin] = "STDIO_UART_RX"
|
1073 | 1080 | else:
|
1074 | 1081 | PinLabel[EachPin] = "STDIO_UART_TX"
|
| 1082 | + elif "_RESERVED" in PinLabel[EachPin]: |
| 1083 | + PinLabel[EachPin] = "RESERVED_RADIO" |
1075 | 1084 | except:
|
1076 | 1085 | pass
|
1077 | 1086 |
|
@@ -1225,16 +1234,22 @@ def parse_BoardFile(fileName):
|
1225 | 1234 | TargetName += "DISCO_"
|
1226 | 1235 | elif "Evaluation" in board_file_name:
|
1227 | 1236 | TargetName += "EVAL_"
|
1228 |
| - m = re.search(r'STM32([\w][\dR]{3}[\w]{0,2})[\w]*_Board', board_file_name) |
| 1237 | + m = re.search(r'STM32([\w]{1,2}[\dR]{3}[\w]{0,2})[\w]*_Board', board_file_name) |
1229 | 1238 | if m:
|
1230 | 1239 | TargetName += "%s" % m.group(1)
|
1231 | 1240 | # specific case
|
1232 | 1241 | if "-P" in args.target:
|
1233 | 1242 | TargetName += "_P"
|
| 1243 | + |
| 1244 | + if "H743ZI2" in board_file_name: |
| 1245 | + TargetName += "2" |
| 1246 | + |
1234 | 1247 | if TargetName == "DISCO_L072C":
|
1235 | 1248 | TargetName += "Z_LRWAN1"
|
1236 |
| - if TargetName == "DISCO_L475V": |
| 1249 | + elif TargetName == "DISCO_L475V": |
1237 | 1250 | TargetName += "G_IOT01A"
|
| 1251 | + elif TargetName == "DISCO_G071RBT": |
| 1252 | + TargetName = "DISCO_G071RB" |
1238 | 1253 | else:
|
1239 | 1254 | quit()
|
1240 | 1255 |
|
|
0 commit comments