Skip to content

Commit 0368a84

Browse files
authored
Merge pull request #6041 from jeromecoutant/PR_STDIO_bug
STM32 STDIO pin redefinition
2 parents 817f9a5 + be90983 commit 0368a84

File tree

1 file changed

+26
-36
lines changed

1 file changed

+26
-36
lines changed

targets/targets.json

Lines changed: 26 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -710,6 +710,12 @@
710710
"lse_available": {
711711
"help": "Define if a Low Speed External xtal (LSE) is available on the board (0 = No, 1 = Yes). If Yes, the LSE will be used to clock the RTC, LPUART, ... otherwise the Low Speed Internal clock (LSI) will be used",
712712
"value": "1"
713+
},
714+
"stdio_uart_tx": {
715+
"help": "default TX STDIO pins is defined in PinNames.h file, but it can be overridden"
716+
},
717+
"stdio_uart_rx": {
718+
"help": "default RX STDIO pins is defined in PinNames.h file, but it can be overridden"
713719
}
714720
},
715721
"device_has": ["ANALOGIN", "I2C", "I2CSLAVE", "I2C_ASYNCH", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SLEEP", "SPI", "SPISLAVE", "SPI_ASYNCH", "STDIO_MESSAGES"]
@@ -1103,14 +1109,6 @@
11031109
"device_name": "STM32F412ZG",
11041110
"bootloader_supported": true,
11051111
"config": {
1106-
"stdio_uart_tx": {
1107-
"help": "Value PB_6",
1108-
"value": "PB_6"
1109-
},
1110-
"stdio_uart_rx": {
1111-
"help": "Value PB_7",
1112-
"value": "PB_7"
1113-
},
11141112
"clock_source": {
11151113
"help": "Mask value : USE_PLL_HSE_EXTC | USE_PLL_HSE_XTAL (need HW patch) | USE_PLL_HSI",
11161114
"value": "USE_PLL_HSI",
@@ -1954,14 +1952,6 @@
19541952
"help": "Value: Defines how an on-board modem is wired up to the MCU, e.g., data connection can be a UART or USB and so forth.",
19551953
"value": 1,
19561954
"macro_name": "MODEM_ON_BOARD_UART"
1957-
},
1958-
"stdio_uart_tx": {
1959-
"help": "Value PB_6",
1960-
"value": "PB_6"
1961-
},
1962-
"stdio_uart_rx": {
1963-
"help": "Value PB_7",
1964-
"value": "PB_7"
19651955
}
19661956
},
19671957
"overrides": {
@@ -2007,16 +1997,12 @@
20071997
"hse_value": {
20081998
"value": "24000000",
20091999
"macro_name": "HSE_VALUE"
2010-
},
2011-
"stdio_uart_tx": {
2012-
"help": "Value PA_2",
2013-
"value": "PA_2"
2014-
},
2015-
"stdio_uart_rx": {
2016-
"help": "Value PA_3",
2017-
"value": "PA_3"
20182000
}
20192001
},
2002+
"overrides": {
2003+
"stdio_uart_tx": "PA_2",
2004+
"stdio_uart_rx": "PA_3"
2005+
},
20202006
"supported_toolchains": ["ARM", "GCC_ARM", "IAR"],
20212007
"device_has_add": ["ANALOGOUT", "FLASH"],
20222008
"release_versions": ["5"],
@@ -2060,28 +2046,32 @@
20602046
"supported_form_factors": ["ARDUINO"],
20612047
"release_versions": ["5"],
20622048
"config": {
2063-
"stdio_uart_tx": {
2064-
"help": "Value: D8(default) or D1",
2065-
"value": "D8"
2049+
"stdio_uart_tx_help": {
2050+
"help": "Value: D8(default) or D1"
20662051
},
2067-
"stdio_uart_rx": {
2068-
"help": "Value: D2(default) or D0",
2069-
"value": "D2"
2052+
"stdio_uart_rx_help": {
2053+
"help": "Value: D2(default) or D0"
20702054
}
2055+
},
2056+
"overrides": {
2057+
"stdio_uart_tx": "D8",
2058+
"stdio_uart_rx": "D2"
20712059
}
20722060
},
20732061
"MBED_CONNECT_ODIN": {
20742062
"inherits": ["MODULE_UBLOX_ODIN_W2"],
20752063
"release_versions": ["5"],
20762064
"config": {
2077-
"stdio_uart_tx": {
2078-
"help": "Value: PA_9(default) or PD_8",
2079-
"value": "PA_9"
2065+
"stdio_uart_tx_help": {
2066+
"help": "Value: PA_9(default) or PD_8"
20802067
},
2081-
"stdio_uart_rx": {
2082-
"help": "Value: PA_10(default) or PD_9",
2083-
"value": "PA_10"
2068+
"stdio_uart_rx_help": {
2069+
"help": "Value: PA_10(default) or PD_9"
20842070
}
2071+
},
2072+
"overrides": {
2073+
"stdio_uart_tx": "PA_9",
2074+
"stdio_uart_rx": "PA_10"
20852075
}
20862076
},
20872077
"MTB_UBLOX_ODIN_W2": {

0 commit comments

Comments
 (0)