diff --git a/CI/build/conf/cores_config.json b/CI/build/conf/cores_config.json
index 479420f736..54d89eb1cd 100644
--- a/CI/build/conf/cores_config.json
+++ b/CI/build/conf/cores_config.json
@@ -134,7 +134,7 @@
"RAK811_TRACKER",
"REMRAM_V1",
"Sparky_V1",
- "Wraith32_V1"
+ "WRAITH32_V1"
]
},
{
@@ -153,7 +153,7 @@
"boards": [
"EEXTR_F030_V1", "ELEKTOR_F072C8", "ELEKTOR_F072CB", "FYSETC_S6", "Generic_F103ZG",
"MALYANM200_F103CB", "PRNTR_V2", "PX_HER0", "STEVAL_MKSBOX1V1", "VAKE_F446VE",
- "VCCGND_F103ZET6", "VCCGND_F103ZET6Mini", "Wraith32_V1"
+ "VCCGND_F103ZET6", "VCCGND_F103ZET6Mini", "WRAITH32_V1"
]
},
{
@@ -282,7 +282,7 @@
{
"pattern": "SerialLoop|Tests_basic_functions",
"applicable": false,
- "boards": [ "NUCLEO_F031K6", "NUCLEO_L031K6", "Wraith32_V1" ]
+ "boards": [ "NUCLEO_F031K6", "NUCLEO_L031K6", "WRAITH32_V1" ]
},
{
"pattern": "(Alarm)?TimedWak(e)?up|SerialDeepSleep",
@@ -298,7 +298,7 @@
"pattern": "tone|p07_Keyboard",
"applicable": false,
"boards": [
- "ST3DP001_EVAL", "STEVAL_MKSBOX1V1", "VAKE_F446VE", "Wraith32_V1"
+ "ST3DP001_EVAL", "STEVAL_MKSBOX1V1", "VAKE_F446VE", "WRAITH32_V1"
]
},
{
diff --git a/README.md b/README.md
index eb5fec7625..cab39caebd 100644
--- a/README.md
+++ b/README.md
@@ -112,7 +112,7 @@ User can add a STM32 based board following this [wiki](https://github.com/stm32d
| Status | Device(s) | Name | Release | Notes |
| :----: | :-------: | ---- | :-----: | :---- |
-| :green_heart: | STM32F031K6 | [Nucleo F031K6](https://www.st.com/en/evaluation-tools/nucleo-f031k6.html) | *1.9.0* | |
+| :green_heart: | STM32F031K6T | [Nucleo F031K6](https://www.st.com/en/evaluation-tools/nucleo-f031k6.html) | *1.9.0* | |
| :green_heart: | STM32F303K8 | [Nucleo F303K8](http://www.st.com/en/evaluation-tools/nucleo-f303k8.html) | *1.1.0* | |
| :yellow_heart: | STM32G031K8 | [Nucleo G031K8](https://www.st.com/en/evaluation-tools/nucleo-g031k8.html) | **2.0.0** |
| :green_heart: | STM32G431KB | [Nucleo G431KB](https://www.st.com/en/evaluation-tools/nucleo-g431kb.html) | *1.7.0* | |
@@ -153,6 +153,15 @@ User can add a STM32 based board following this [wiki](https://github.com/stm32d
| Status | Device(s) | Name | Release | Notes |
| :----: | :-------: | ---- | :-----: | :---- |
| :green_heart: | STM32F030F4 | [STM32F030F4 Demo board](https://stm32-base.org/boards/STM32F030F4P6-STM32F030-DEMO-BOARD-V1.1) | *1.5.0* | |
+| :yellow_heart: | STM32F030C8 | Generic Board | **2.0.0** | |
+| :yellow_heart: | STM32F030F4 | Generic Board | **2.0.0** | |
+| :yellow_heart: | STM32F030R8 | Generic Board | **2.0.0** | |
+| :yellow_heart: | STM32F031K6T | Generic Board | **2.0.0** | |
+| :yellow_heart: | STM32F051K6U
STM32F051K8U | Generic Board | **2.0.0** | |
+| :yellow_heart: | STM32F070CB | Generic Board | **2.0.0** | |
+| :yellow_heart: | STM32F072C8
STM32F072CB | Generic Board | **2.0.0** | |
+| :yellow_heart: | STM32F072R8
STM32F072RB | Generic Board | **2.0.0** | |
+| :yellow_heart: | STM32F091RB
STM32F091RC | Generic Board | **2.0.0** | |
### Generic STM32F1 boards
@@ -305,7 +314,7 @@ User can add a STM32 based board following this [wiki](https://github.com/stm32d
| Status | Device(s) | Name | Release | Notes |
| :----: | :-------: | ---- | :-----: | :---- |
-| :green_heart: | STM32F051K6 | Wraith V1 ESC | *1.8.0* | |
+| :green_heart: | STM32F051K6U | [Wraith V1 ESC](https://www.readytoflyquads.com/35a-wraith32-v11-32bit-blheli-esc) | *1.8.0* | |
### Generic flight controllers
diff --git a/boards.txt b/boards.txt
index ddb5d0bda9..4f16ff5093 100644
--- a/boards.txt
+++ b/boards.txt
@@ -205,7 +205,7 @@ Nucleo_64.menu.pnum.NUCLEO_F030R8.build.mcu=cortex-m0
Nucleo_64.menu.pnum.NUCLEO_F030R8.build.board=NUCLEO_F030R8
Nucleo_64.menu.pnum.NUCLEO_F030R8.build.series=STM32F0xx
Nucleo_64.menu.pnum.NUCLEO_F030R8.build.product_line=STM32F030x8
-Nucleo_64.menu.pnum.NUCLEO_F030R8.build.variant=STM32F0xx/NUCLEO_F030R8
+Nucleo_64.menu.pnum.NUCLEO_F030R8.build.variant=STM32F0xx/F030R8Tx
Nucleo_64.menu.pnum.NUCLEO_F030R8.build.cmsis_lib_gcc=arm_cortexM0l_math
# NUCLEO_F072RB board
@@ -217,7 +217,7 @@ Nucleo_64.menu.pnum.NUCLEO_F072RB.build.mcu=cortex-m0
Nucleo_64.menu.pnum.NUCLEO_F072RB.build.board=NUCLEO_F072RB
Nucleo_64.menu.pnum.NUCLEO_F072RB.build.series=STM32F0xx
Nucleo_64.menu.pnum.NUCLEO_F072RB.build.product_line=STM32F072xB
-Nucleo_64.menu.pnum.NUCLEO_F072RB.build.variant=STM32F0xx/NUCLEO_F072RB
+Nucleo_64.menu.pnum.NUCLEO_F072RB.build.variant=STM32F0xx/F072R(8-B)Tx_F072RB
Nucleo_64.menu.pnum.NUCLEO_F072RB.build.cmsis_lib_gcc=arm_cortexM0l_math
# NUCLEO_F091RC board
@@ -229,7 +229,7 @@ Nucleo_64.menu.pnum.NUCLEO_F091RC.build.mcu=cortex-m0
Nucleo_64.menu.pnum.NUCLEO_F091RC.build.board=NUCLEO_F091RC
Nucleo_64.menu.pnum.NUCLEO_F091RC.build.series=STM32F0xx
Nucleo_64.menu.pnum.NUCLEO_F091RC.build.product_line=STM32F091xC
-Nucleo_64.menu.pnum.NUCLEO_F091RC.build.variant=STM32F0xx/NUCLEO_F091RC
+Nucleo_64.menu.pnum.NUCLEO_F091RC.build.variant=STM32F0xx/F091R(B-C)Tx_F091RC
Nucleo_64.menu.pnum.NUCLEO_F091RC.build.cmsis_lib_gcc=arm_cortexM0l_math
# NUCLEO_F103RB board
@@ -492,7 +492,7 @@ Nucleo_32.menu.pnum.NUCLEO_F031K6.build.mcu=cortex-m0
Nucleo_32.menu.pnum.NUCLEO_F031K6.build.board=NUCLEO_F031K6
Nucleo_32.menu.pnum.NUCLEO_F031K6.build.series=STM32F0xx
Nucleo_32.menu.pnum.NUCLEO_F031K6.build.product_line=STM32F031x6
-Nucleo_32.menu.pnum.NUCLEO_F031K6.build.variant=STM32F0xx/NUCLEO_F031K6
+Nucleo_32.menu.pnum.NUCLEO_F031K6.build.variant=STM32F0xx/F031K6Tx
Nucleo_32.menu.pnum.NUCLEO_F031K6.build.cmsis_lib_gcc=arm_cortexM0l_math
# NUCLEO_F303K8 board
@@ -611,7 +611,7 @@ Disco.menu.pnum.DISCO_F030R8.build.mcu=cortex-m0
Disco.menu.pnum.DISCO_F030R8.build.board=DISCO_F030R8
Disco.menu.pnum.DISCO_F030R8.build.series=STM32F0xx
Disco.menu.pnum.DISCO_F030R8.build.product_line=STM32F030x8
-Disco.menu.pnum.DISCO_F030R8.build.variant=STM32F0xx/DISCO_F030R8
+Disco.menu.pnum.DISCO_F030R8.build.variant=STM32F0xx/F030R8Tx
Disco.menu.pnum.DISCO_F030R8.build.cmsis_lib_gcc=arm_cortexM0l_math
# DISCO_F072RB board
@@ -623,7 +623,7 @@ Disco.menu.pnum.DISCO_F072RB.build.mcu=cortex-m0
Disco.menu.pnum.DISCO_F072RB.build.board=DISCO_F072RB
Disco.menu.pnum.DISCO_F072RB.build.series=STM32F0xx
Disco.menu.pnum.DISCO_F072RB.build.product_line=STM32F072xB
-Disco.menu.pnum.DISCO_F072RB.build.variant=STM32F0xx/DISCO_F072RB
+Disco.menu.pnum.DISCO_F072RB.build.variant=STM32F0xx/F072R(8-B)Tx_F072RB
Disco.menu.pnum.DISCO_F072RB.build.cmsis_lib_gcc=arm_cortexM0l_math
#DISCO_F100RB board
@@ -835,31 +835,191 @@ GenF0.build.cmsis_lib_gcc=arm_cortexM0l_math
GenF0.build.extra_flags=-D{build.product_line} {build.xSerial}
# DEMO_F030F4 board
-GenF0.menu.pnum.DEMO_F030F4=STM32F030F4 Demo board
-GenF0.menu.pnum.DEMO_F030F4.upload.maximum_data_size=4096
+GenF0.menu.pnum.DEMO_F030F4=STM32F030F4 Demo board (HSE 8Mhz)
GenF0.menu.pnum.DEMO_F030F4.upload.maximum_size=16384
+GenF0.menu.pnum.DEMO_F030F4.upload.maximum_data_size=4096
GenF0.menu.pnum.DEMO_F030F4.build.board=DEMO_F030F4
GenF0.menu.pnum.DEMO_F030F4.build.product_line=STM32F030x6
+GenF0.menu.pnum.DEMO_F030F4.build.variant=STM32F0xx/F030F4Px
GenF0.menu.pnum.DEMO_F030F4.build.variant_h=variant_{build.board}.h
-GenF0.menu.pnum.DEMO_F030F4.build.variant=STM32F0xx/DEMO_F030F4
# DEMO_F030F4_16M board
-GenF0.menu.pnum.DEMO_F030F4_16M=STM32F030F4 Demo board (16Mhz)
-GenF0.menu.pnum.DEMO_F030F4_16M.upload.maximum_data_size=4096
+GenF0.menu.pnum.DEMO_F030F4_16M=STM32F030F4 Demo board (HSE 16Mhz)
GenF0.menu.pnum.DEMO_F030F4_16M.upload.maximum_size=16384
+GenF0.menu.pnum.DEMO_F030F4_16M.upload.maximum_data_size=4096
GenF0.menu.pnum.DEMO_F030F4_16M.build.board=DEMO_F030F4_16M
GenF0.menu.pnum.DEMO_F030F4_16M.build.product_line=STM32F030x6
+GenF0.menu.pnum.DEMO_F030F4_16M.build.variant=STM32F0xx/F030F4Px
GenF0.menu.pnum.DEMO_F030F4_16M.build.variant_h=variant_DEMO_F030F4.h
-GenF0.menu.pnum.DEMO_F030F4_16M.build.variant=STM32F0xx/DEMO_F030F4
# DEMO_F030F4_HSI board
-GenF0.menu.pnum.DEMO_F030F4_HSI=STM32F030F4 Demo board (internal RC oscillator)
-GenF0.menu.pnum.DEMO_F030F4_HSI.upload.maximum_data_size=4096
+GenF0.menu.pnum.DEMO_F030F4_HSI=STM32F030F4 Demo board (HSI internal RC oscillator)
GenF0.menu.pnum.DEMO_F030F4_HSI.upload.maximum_size=16384
+GenF0.menu.pnum.DEMO_F030F4_HSI.upload.maximum_data_size=4096
GenF0.menu.pnum.DEMO_F030F4_HSI.build.board=DEMO_F030F4_HSI
GenF0.menu.pnum.DEMO_F030F4_HSI.build.product_line=STM32F030x6
+GenF0.menu.pnum.DEMO_F030F4_HSI.build.variant=STM32F0xx/F030F4Px
GenF0.menu.pnum.DEMO_F030F4_HSI.build.variant_h=variant_DEMO_F030F4.h
-GenF0.menu.pnum.DEMO_F030F4_HSI.build.variant=STM32F0xx/DEMO_F030F4
+
+# Generic F030C8Tx
+GenF0.menu.pnum.GENERIC_F030C8TX=Generic F030C8Tx
+GenF0.menu.pnum.GENERIC_F030C8TX.upload.maximum_size=65536
+GenF0.menu.pnum.GENERIC_F030C8TX.upload.maximum_data_size=8192
+GenF0.menu.pnum.GENERIC_F030C8TX.build.board=GENERIC_F030C8TX
+GenF0.menu.pnum.GENERIC_F030C8TX.build.product_line=STM32F030x8
+GenF0.menu.pnum.GENERIC_F030C8TX.build.variant=STM32F0xx/F030C8Tx
+
+# Generic F030F4Px
+GenF0.menu.pnum.GENERIC_F030F4PX=Generic F030F4Px
+GenF0.menu.pnum.GENERIC_F030F4PX.upload.maximum_size=16384
+GenF0.menu.pnum.GENERIC_F030F4PX.upload.maximum_data_size=4096
+GenF0.menu.pnum.GENERIC_F030F4PX.build.board=GENERIC_F030F4PX
+GenF0.menu.pnum.GENERIC_F030F4PX.build.product_line=STM32F030x6
+GenF0.menu.pnum.GENERIC_F030F4PX.build.variant=STM32F0xx/F030F4Px
+
+# Generic F030R8Tx
+GenF0.menu.pnum.GENERIC_F030R8TX=Generic F030R8Tx
+GenF0.menu.pnum.GENERIC_F030R8TX.upload.maximum_size=65536
+GenF0.menu.pnum.GENERIC_F030R8TX.upload.maximum_data_size=8192
+GenF0.menu.pnum.GENERIC_F030R8TX.build.board=GENERIC_F030R8TX
+GenF0.menu.pnum.GENERIC_F030R8TX.build.product_line=STM32F030x8
+GenF0.menu.pnum.GENERIC_F030R8TX.build.variant=STM32F0xx/F030R8Tx
+
+# Generic F031K6Tx
+GenF0.menu.pnum.GENERIC_F031K6TX=Generic F031K6Tx
+GenF0.menu.pnum.GENERIC_F031K6TX.upload.maximum_size=32768
+GenF0.menu.pnum.GENERIC_F031K6TX.upload.maximum_data_size=4096
+GenF0.menu.pnum.GENERIC_F031K6TX.build.board=GENERIC_F031K6TX
+GenF0.menu.pnum.GENERIC_F031K6TX.build.product_line=STM32F031x6
+GenF0.menu.pnum.GENERIC_F031K6TX.build.variant=STM32F0xx/F031K6Tx
+
+# Generic F051K6Ux
+GenF0.menu.pnum.GENERIC_F051K6UX=Generic F051K6Ux
+GenF0.menu.pnum.GENERIC_F051K6UX.upload.maximum_size=32768
+GenF0.menu.pnum.GENERIC_F051K6UX.upload.maximum_data_size=8192
+GenF0.menu.pnum.GENERIC_F051K6UX.build.board=GENERIC_F051K6UX
+GenF0.menu.pnum.GENERIC_F051K6UX.build.product_line=STM32F051x8
+GenF0.menu.pnum.GENERIC_F051K6UX.build.variant=STM32F0xx/F051K6Ux_F051K8Ux
+
+# Generic F051K8Ux
+GenF0.menu.pnum.GENERIC_F051K8UX=Generic F051K8Ux
+GenF0.menu.pnum.GENERIC_F051K8UX.upload.maximum_size=65536
+GenF0.menu.pnum.GENERIC_F051K8UX.upload.maximum_data_size=8192
+GenF0.menu.pnum.GENERIC_F051K8UX.build.board=GENERIC_F051K8UX
+GenF0.menu.pnum.GENERIC_F051K8UX.build.product_line=STM32F051x8
+GenF0.menu.pnum.GENERIC_F051K8UX.build.variant=STM32F0xx/F051K6Ux_F051K8Ux
+
+# Generic F070CBTx
+GenF0.menu.pnum.GENERIC_F070CBTX=Generic F070CBTx
+GenF0.menu.pnum.GENERIC_F070CBTX.upload.maximum_size=131072
+GenF0.menu.pnum.GENERIC_F070CBTX.upload.maximum_data_size=16384
+GenF0.menu.pnum.GENERIC_F070CBTX.build.board=GENERIC_F070CBTX
+GenF0.menu.pnum.GENERIC_F070CBTX.build.product_line=STM32F070xB
+GenF0.menu.pnum.GENERIC_F070CBTX.build.variant=STM32F0xx/F070CBTx
+
+# Generic F072C8Tx
+GenF0.menu.pnum.GENERIC_F072C8TX=Generic F072C8Tx
+GenF0.menu.pnum.GENERIC_F072C8TX.upload.maximum_size=65536
+GenF0.menu.pnum.GENERIC_F072C8TX.upload.maximum_data_size=16384
+GenF0.menu.pnum.GENERIC_F072C8TX.build.board=GENERIC_F072C8TX
+GenF0.menu.pnum.GENERIC_F072C8TX.build.product_line=STM32F072xB
+GenF0.menu.pnum.GENERIC_F072C8TX.build.variant=STM32F0xx/F072C(8-B)_F072CBYx
+
+# Generic F072CBTx
+GenF0.menu.pnum.GENERIC_F072CBTX=Generic F072CBTx
+GenF0.menu.pnum.GENERIC_F072CBTX.upload.maximum_size=131072
+GenF0.menu.pnum.GENERIC_F072CBTX.upload.maximum_data_size=16384
+GenF0.menu.pnum.GENERIC_F072CBTX.build.board=GENERIC_F072CBTX
+GenF0.menu.pnum.GENERIC_F072CBTX.build.product_line=STM32F072xB
+GenF0.menu.pnum.GENERIC_F072CBTX.build.variant=STM32F0xx/F072C(8-B)_F072CBYx
+
+# Generic F072C8Ux
+GenF0.menu.pnum.GENERIC_F072C8UX=Generic F072C8Ux
+GenF0.menu.pnum.GENERIC_F072C8UX.upload.maximum_size=65536
+GenF0.menu.pnum.GENERIC_F072C8UX.upload.maximum_data_size=16384
+GenF0.menu.pnum.GENERIC_F072C8UX.build.board=GENERIC_F072C8UX
+GenF0.menu.pnum.GENERIC_F072C8UX.build.product_line=STM32F072xB
+GenF0.menu.pnum.GENERIC_F072C8UX.build.variant=STM32F0xx/F072C(8-B)_F072CBYx
+
+# Generic F072CBUx
+GenF0.menu.pnum.GENERIC_F072CBUX=Generic F072CBUx
+GenF0.menu.pnum.GENERIC_F072CBUX.upload.maximum_size=131072
+GenF0.menu.pnum.GENERIC_F072CBUX.upload.maximum_data_size=16384
+GenF0.menu.pnum.GENERIC_F072CBUX.build.board=GENERIC_F072CBUX
+GenF0.menu.pnum.GENERIC_F072CBUX.build.product_line=STM32F072xB
+GenF0.menu.pnum.GENERIC_F072CBUX.build.variant=STM32F0xx/F072C(8-B)_F072CBYx
+
+# Generic F072CBYx
+GenF0.menu.pnum.GENERIC_F072CBYX=Generic F072CBYx
+GenF0.menu.pnum.GENERIC_F072CBYX.upload.maximum_size=131072
+GenF0.menu.pnum.GENERIC_F072CBYX.upload.maximum_data_size=16384
+GenF0.menu.pnum.GENERIC_F072CBYX.build.board=GENERIC_F072CBYX
+GenF0.menu.pnum.GENERIC_F072CBYX.build.product_line=STM32F072xB
+GenF0.menu.pnum.GENERIC_F072CBYX.build.variant=STM32F0xx/F072C(8-B)_F072CBYx
+
+# Generic F072R8Tx
+GenF0.menu.pnum.GENERIC_F072R8TX=Generic F072R8Tx
+GenF0.menu.pnum.GENERIC_F072R8TX.upload.maximum_size=65536
+GenF0.menu.pnum.GENERIC_F072R8TX.upload.maximum_data_size=16384
+GenF0.menu.pnum.GENERIC_F072R8TX.build.board=GENERIC_F072R8TX
+GenF0.menu.pnum.GENERIC_F072R8TX.build.product_line=STM32F072xB
+GenF0.menu.pnum.GENERIC_F072R8TX.build.variant=STM32F0xx/F072R(8-B)Tx_F072RB
+
+# Generic F072RBTx
+GenF0.menu.pnum.GENERIC_F072RBTX=Generic F072RBTx
+GenF0.menu.pnum.GENERIC_F072RBTX.upload.maximum_size=131072
+GenF0.menu.pnum.GENERIC_F072RBTX.upload.maximum_data_size=16384
+GenF0.menu.pnum.GENERIC_F072RBTX.build.board=GENERIC_F072RBTX
+GenF0.menu.pnum.GENERIC_F072RBTX.build.product_line=STM32F072xB
+GenF0.menu.pnum.GENERIC_F072RBTX.build.variant=STM32F0xx/F072R(8-B)Tx_F072RB
+
+# Generic F072RBHx
+GenF0.menu.pnum.GENERIC_F072RBHX=Generic F072RBHx
+GenF0.menu.pnum.GENERIC_F072RBHX.upload.maximum_size=131072
+GenF0.menu.pnum.GENERIC_F072RBHX.upload.maximum_data_size=16384
+GenF0.menu.pnum.GENERIC_F072RBHX.build.board=GENERIC_F072RBHX
+GenF0.menu.pnum.GENERIC_F072RBHX.build.product_line=STM32F072xB
+GenF0.menu.pnum.GENERIC_F072RBHX.build.variant=STM32F0xx/F072R(8-B)Tx_F072RB
+
+# Generic F072RBIx
+GenF0.menu.pnum.GENERIC_F072RBIX=Generic F072RBIx
+GenF0.menu.pnum.GENERIC_F072RBIX.upload.maximum_size=131072
+GenF0.menu.pnum.GENERIC_F072RBIX.upload.maximum_data_size=16384
+GenF0.menu.pnum.GENERIC_F072RBIX.build.board=GENERIC_F072RBIX
+GenF0.menu.pnum.GENERIC_F072RBIX.build.product_line=STM32F072xB
+GenF0.menu.pnum.GENERIC_F072RBIX.build.variant=STM32F0xx/F072R(8-B)Tx_F072RB
+
+# Generic F091RBTx
+GenF0.menu.pnum.GENERIC_F091RBTX=Generic F091RBTx
+GenF0.menu.pnum.GENERIC_F091RBTX.upload.maximum_size=131072
+GenF0.menu.pnum.GENERIC_F091RBTX.upload.maximum_data_size=32768
+GenF0.menu.pnum.GENERIC_F091RBTX.build.board=GENERIC_F091RBTX
+GenF0.menu.pnum.GENERIC_F091RBTX.build.product_line=STM32F091xC
+GenF0.menu.pnum.GENERIC_F091RBTX.build.variant=STM32F0xx/F091R(B-C)Tx_F091RC
+
+# Generic F091RCTx
+GenF0.menu.pnum.GENERIC_F091RCTX=Generic F091RCTx
+GenF0.menu.pnum.GENERIC_F091RCTX.upload.maximum_size=262144
+GenF0.menu.pnum.GENERIC_F091RCTX.upload.maximum_data_size=32768
+GenF0.menu.pnum.GENERIC_F091RCTX.build.board=GENERIC_F091RCTX
+GenF0.menu.pnum.GENERIC_F091RCTX.build.product_line=STM32F091xC
+GenF0.menu.pnum.GENERIC_F091RCTX.build.variant=STM32F0xx/F091R(B-C)Tx_F091RC
+
+# Generic F091RCHx
+GenF0.menu.pnum.GENERIC_F091RCHX=Generic F091RCHx
+GenF0.menu.pnum.GENERIC_F091RCHX.upload.maximum_size=262144
+GenF0.menu.pnum.GENERIC_F091RCHX.upload.maximum_data_size=32768
+GenF0.menu.pnum.GENERIC_F091RCHX.build.board=GENERIC_F091RCHX
+GenF0.menu.pnum.GENERIC_F091RCHX.build.product_line=STM32F091xC
+GenF0.menu.pnum.GENERIC_F091RCHX.build.variant=STM32F0xx/F091R(B-C)Tx_F091RC
+
+# Generic F091RCYx
+GenF0.menu.pnum.GENERIC_F091RCYX=Generic F091RCYx
+GenF0.menu.pnum.GENERIC_F091RCYX.upload.maximum_size=262144
+GenF0.menu.pnum.GENERIC_F091RCYX.upload.maximum_data_size=32768
+GenF0.menu.pnum.GENERIC_F091RCYX.build.board=GENERIC_F091RCYX
+GenF0.menu.pnum.GENERIC_F091RCYX.build.product_line=STM32F091xC
+GenF0.menu.pnum.GENERIC_F091RCYX.build.variant=STM32F0xx/F091R(B-C)Tx_F091RC
# Upload menu
GenF0.menu.upload_method.swdMethod=STM32CubeProgrammer (SWD)
@@ -2652,16 +2812,17 @@ ESC_board.build.board=FCE_board
ESC_board.build.variant_h=variant_{build.board}.h
ESC_board.build.extra_flags=-D{build.product_line} {build.enable_usb} {build.xSerial}
-# Wraith32_V1 board
-ESC_board.menu.pnum.Wraith32_V1=Wraith V1 ESC
-ESC_board.menu.pnum.Wraith32_V1.upload.maximum_size=32768
-ESC_board.menu.pnum.Wraith32_V1.upload.maximum_data_size=7936
-ESC_board.menu.pnum.Wraith32_V1.build.mcu=cortex-m0
-ESC_board.menu.pnum.Wraith32_V1.build.board=WRAITH32_F051K6
-ESC_board.menu.pnum.Wraith32_V1.build.series=STM32F0xx
-ESC_board.menu.pnum.Wraith32_V1.build.product_line=STM32F051x8
-ESC_board.menu.pnum.Wraith32_V1.build.variant=STM32F0xx/WRAITH32_F051K6
-ESC_board.menu.pnum.Wraith32_V1.build.cmsis_lib_gcc=arm_cortexM0l_math
+# WRAITH32_V1 board
+ESC_board.menu.pnum.WRAITH32_V1=Wraith V1 ESC
+ESC_board.menu.pnum.WRAITH32_V1.upload.maximum_size=32768
+ESC_board.menu.pnum.WRAITH32_V1.upload.maximum_data_size=7936
+ESC_board.menu.pnum.WRAITH32_V1.build.mcu=cortex-m0
+ESC_board.menu.pnum.WRAITH32_V1.build.board=WRAITH32_V1
+ESC_board.menu.pnum.WRAITH32_V1.build.series=STM32F0xx
+ESC_board.menu.pnum.WRAITH32_V1.build.product_line=STM32F051x8
+ESC_board.menu.pnum.WRAITH32_V1.build.variant=STM32F0xx/F051K6Ux_F051K8Ux
+ESC_board.menu.pnum.WRAITH32_V1.build.peripheral_pins=-DCUSTOM_PERIPHERAL_PINS
+ESC_board.menu.pnum.WRAITH32_V1.build.cmsis_lib_gcc=arm_cortexM0l_math
# Upload menu
ESC_board.menu.upload_method.swdMethod=STM32CubeProgrammer (SWD)
@@ -2730,8 +2891,9 @@ LoRa.menu.pnum.ELEKTOR_F072C8.build.mcu=cortex-m0
LoRa.menu.pnum.ELEKTOR_F072C8.build.board=ELEKTOR_F072C8
LoRa.menu.pnum.ELEKTOR_F072C8.build.series=STM32F0xx
LoRa.menu.pnum.ELEKTOR_F072C8.build.product_line=STM32F072xB
-LoRa.menu.pnum.ELEKTOR_F072C8.build.variant=STM32F0xx/ELEKTOR_F072Cx
+LoRa.menu.pnum.ELEKTOR_F072C8.build.variant=STM32F0xx/F072C(8-B)_F072CBYx
LoRa.menu.pnum.ELEKTOR_F072C8.build.variant_h=variant_ELEKTOR_F072Cx.h
+LoRa.menu.pnum.ELEKTOR_F072C8.build.peripheral_pins=-DCUSTOM_PERIPHERAL_PINS
LoRa.menu.pnum.ELEKTOR_F072C8.build.cmsis_lib_gcc=arm_cortexM0l_math
LoRa.menu.pnum.ELEKTOR_F072C8.build.extra_flags=-D{build.product_line} {build.xSerial}
@@ -2743,8 +2905,9 @@ LoRa.menu.pnum.ELEKTOR_F072CB.build.mcu=cortex-m0
LoRa.menu.pnum.ELEKTOR_F072CB.build.board=ELEKTOR_F072CB
LoRa.menu.pnum.ELEKTOR_F072CB.build.series=STM32F0xx
LoRa.menu.pnum.ELEKTOR_F072CB.build.product_line=STM32F072xB
-LoRa.menu.pnum.ELEKTOR_F072CB.build.variant=STM32F0xx/ELEKTOR_F072Cx
+LoRa.menu.pnum.ELEKTOR_F072CB.build.variant=STM32F0xx/F072C(8-B)_F072CBYx
LoRa.menu.pnum.ELEKTOR_F072CB.build.variant_h=variant_ELEKTOR_F072Cx.h
+LoRa.menu.pnum.ELEKTOR_F072CB.build.peripheral_pins=-DCUSTOM_PERIPHERAL_PINS
LoRa.menu.pnum.ELEKTOR_F072CB.build.cmsis_lib_gcc=arm_cortexM0l_math
LoRa.menu.pnum.ELEKTOR_F072CB.build.extra_flags=-D{build.product_line} {build.xSerial}
@@ -2858,7 +3021,8 @@ LoRa.menu.upload_method.dfuMethod.upload.tool=stm32CubeProg
3dprinter.menu.pnum.EEXTR_F030_V1.build.board=EEXTR_F030_V1
3dprinter.menu.pnum.EEXTR_F030_V1.build.series=STM32F0xx
3dprinter.menu.pnum.EEXTR_F030_V1.build.product_line=STM32F030x8
-3dprinter.menu.pnum.EEXTR_F030_V1.build.variant=STM32F0xx/EEXTR_F030_V1
+3dprinter.menu.pnum.EEXTR_F030_V1.build.variant=STM32F0xx/F030C8Tx
+3dprinter.menu.pnum.EEXTR_F030_V1.build.peripheral_pins=-DCUSTOM_PERIPHERAL_PINS
3dprinter.menu.pnum.EEXTR_F030_V1.build.cmsis_lib_gcc=arm_cortexM0l_math
# MALYANM200_F103CB board
@@ -2883,10 +3047,11 @@ LoRa.menu.upload_method.dfuMethod.upload.tool=stm32CubeProg
3dprinter.menu.pnum.MALYANM200_F070CB.build.board=MALYANM200_F070CB
3dprinter.menu.pnum.MALYANM200_F070CB.build.series=STM32F0xx
3dprinter.menu.pnum.MALYANM200_F070CB.build.product_line=STM32F070xB
-3dprinter.menu.pnum.MALYANM200_F070CB.build.variant=STM32F0xx/MALYANMx00_F070CB
+3dprinter.menu.pnum.MALYANM200_F070CB.build.variant=STM32F0xx/F070CBTx
3dprinter.menu.pnum.MALYANM200_F070CB.build.variant_h=variant_MALYANMx00_F070CB.h
3dprinter.menu.pnum.MALYANM200_F070CB.build.cmsis_lib_gcc=arm_cortexM0l_math
3dprinter.menu.pnum.MALYANM200_F070CB.build.startup_file=-DCUSTOM_STARTUP_FILE
+3dprinter.menu.pnum.MALYANM200_F070CB.build.ldscript=MALYANMx00_F070CB.ld
3dprinter.menu.pnum.MALYANM200_F070CB.build.flash_offset=0x2000
3dprinter.menu.pnum.MALYANM200_F070CB.build.extra_flags=-D{build.product_line} {build.enable_usb} {build.xSerial} -DVECT_TAB_OFFSET={build.flash_offset}
@@ -2898,10 +3063,11 @@ LoRa.menu.upload_method.dfuMethod.upload.tool=stm32CubeProg
3dprinter.menu.pnum.MALYANM300_F070CB.build.board=MALYANM300_F070CB
3dprinter.menu.pnum.MALYANM300_F070CB.build.series=STM32F0xx
3dprinter.menu.pnum.MALYANM300_F070CB.build.product_line=STM32F070xB
-3dprinter.menu.pnum.MALYANM300_F070CB.build.variant=STM32F0xx/MALYANMx00_F070CB
+3dprinter.menu.pnum.MALYANM300_F070CB.build.variant=STM32F0xx/F070CBTx
3dprinter.menu.pnum.MALYANM300_F070CB.build.variant_h=variant_MALYANMx00_F070CB.h
3dprinter.menu.pnum.MALYANM300_F070CB.build.cmsis_lib_gcc=arm_cortexM0l_math
3dprinter.menu.pnum.MALYANM300_F070CB.build.startup_file=-DCUSTOM_STARTUP_FILE
+3dprinter.menu.pnum.MALYANM200_F070CB.build.ldscript=MALYANMx00_F070CB.ld
3dprinter.menu.pnum.MALYANM300_F070CB.build.flash_offset=0x2000
3dprinter.menu.pnum.MALYANM300_F070CB.build.extra_flags=-D{build.product_line} {build.enable_usb} {build.xSerial} -DVECT_TAB_OFFSET={build.flash_offset}
@@ -3052,7 +3218,8 @@ Garatronic.menu.pnum.PYBSTICK26_DUINO.build.mcu=cortex-m0
Garatronic.menu.pnum.PYBSTICK26_DUINO.build.board=PYBSTICK26_DUINO
Garatronic.menu.pnum.PYBSTICK26_DUINO.build.series=STM32F0xx
Garatronic.menu.pnum.PYBSTICK26_DUINO.build.product_line=STM32F072xB
-Garatronic.menu.pnum.PYBSTICK26_DUINO.build.variant=STM32F0xx/PYBSTICK26_DUINO
+Garatronic.menu.pnum.PYBSTICK26_DUINO.build.variant=STM32F0xx/F072R(8-B)Tx_F072RB
+Garatronic.menu.pnum.PYBSTICK26_DUINO.build.peripheral_pins=-DCUSTOM_PERIPHERAL_PINS
Garatronic.menu.pnum.PYBSTICK26_DUINO.build.cmsis_lib_gcc=arm_cortexM0l_math
# PYBSTICK26(LITE) board with F401CE
diff --git a/variants/STM32F0xx/DEMO_F030F4/PeripheralPins.c b/variants/STM32F0xx/DEMO_F030F4/PeripheralPins.c
deleted file mode 100644
index ab90f78a7d..0000000000
--- a/variants/STM32F0xx/DEMO_F030F4/PeripheralPins.c
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- *******************************************************************************
- * Copyright (c) 2019, STMicroelectronics
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * 3. Neither the name of STMicroelectronics nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *******************************************************************************
- * Automatically generated from STM32F030F4Px.xml
- */
-#include "Arduino.h"
-#include "PeripheralPins.h"
-
-/* =====
- * Note: Commented lines are alternative possibilities which are not used per default.
- * If you change them, you will have to know what you do
- * =====
- */
-
-//*** ADC ***
-
-#ifdef HAL_ADC_MODULE_ENABLED
-WEAK const PinMap PinMap_ADC[] = {
- {PA_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC_IN0
- {PA_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC_IN1
- {PA_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC_IN2
- {PA_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC_IN3
- {PA_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC_IN4
- {PA_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC_IN5 - LED
- {PA_6, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC_IN6
- {PA_7, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC_IN7
- {PB_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC_IN9
- {NC, NP, 0}
-};
-#endif
-
-//*** No DAC ***
-
-//*** I2C ***
-
-#ifdef HAL_I2C_MODULE_ENABLED
-WEAK const PinMap PinMap_I2C_SDA[] = {
- {PA_10, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_I2C_MODULE_ENABLED
-WEAK const PinMap PinMap_I2C_SCL[] = {
- {PA_9, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)},
- {NC, NP, 0}
-};
-#endif
-
-//*** PWM ***
-
-#ifdef HAL_TIM_MODULE_ENABLED
-WEAK const PinMap PinMap_PWM[] = {
- {PA_4, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM14, 1, 0)}, // TIM14_CH1
- {PA_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 1, 0)}, // TIM3_CH1
- //{PA_6, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM16, 1, 0)}, // TIM16_CH1
- //{PA_7, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 1, 1)}, // TIM1_CH1N
- {PA_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 2, 0)}, // TIM3_CH2
- //{PA_7, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM14, 1, 0)}, // TIM14_CH1
- //{PA_7, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM17, 1, 0)}, // TIM17_CH1
- {PA_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 2, 0)}, // TIM1_CH2
- {PA_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 3, 0)}, // TIM1_CH3
- //{PB_1, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 3, 1)}, // TIM1_CH3N
- {PB_1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 4, 0)}, // TIM3_CH4
- //{PB_1, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM14, 1, 0)}, // TIM14_CH1
- {NC, NP, 0}
-};
-#endif
-
-//*** SERIAL ***
-
-#ifdef HAL_UART_MODULE_ENABLED
-WEAK const PinMap PinMap_UART_TX[] = {
- {PA_2, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
- {PA_9, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
- {PA_14, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_UART_MODULE_ENABLED
-WEAK const PinMap PinMap_UART_RX[] = {
- {PA_3, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
- {PA_10, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_UART_MODULE_ENABLED
-WEAK const PinMap PinMap_UART_RTS[] = {
- {PA_1, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_UART_MODULE_ENABLED
-WEAK const PinMap PinMap_UART_CTS[] = {
- {PA_0, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
- {NC, NP, 0}
-};
-#endif
-
-//*** SPI ***
-
-#ifdef HAL_SPI_MODULE_ENABLED
-WEAK const PinMap PinMap_SPI_MOSI[] = {
- {PA_7, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_SPI_MODULE_ENABLED
-WEAK const PinMap PinMap_SPI_MISO[] = {
- {PA_6, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_SPI_MODULE_ENABLED
-WEAK const PinMap PinMap_SPI_SCLK[] = {
- {PA_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)}, // LED
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_SPI_MODULE_ENABLED
-WEAK const PinMap PinMap_SPI_SSEL[] = {
- {PA_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {NC, NP, 0}
-};
-#endif
-
-//*** No CAN ***
-
-//*** No ETHERNET ***
-
-//*** No QUADSPI ***
-
-//*** No USB ***
diff --git a/variants/STM32F0xx/DEMO_F030F4/PinNamesVar.h b/variants/STM32F0xx/DEMO_F030F4/PinNamesVar.h
deleted file mode 100644
index 32d3641110..0000000000
--- a/variants/STM32F0xx/DEMO_F030F4/PinNamesVar.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/* SYS_WKUP */
-#ifdef PWR_WAKEUP_PIN1
- SYS_WKUP1 = PA_0,
-#endif
-#ifdef PWR_WAKEUP_PIN2
- SYS_WKUP2 = NC,
-#endif
-#ifdef PWR_WAKEUP_PIN3
- SYS_WKUP3 = NC,
-#endif
-#ifdef PWR_WAKEUP_PIN4
- SYS_WKUP4 = NC,
-#endif
-#ifdef PWR_WAKEUP_PIN5
- SYS_WKUP5 = NC,
-#endif
-#ifdef PWR_WAKEUP_PIN6
- SYS_WKUP6 = NC,
-#endif
-#ifdef PWR_WAKEUP_PIN7
- SYS_WKUP7 = NC,
-#endif
-#ifdef PWR_WAKEUP_PIN8
- SYS_WKUP8 = NC,
-#endif
diff --git a/variants/STM32F0xx/DEMO_F030F4/ldscript.ld b/variants/STM32F0xx/DEMO_F030F4/ldscript.ld
deleted file mode 100644
index 567c1c9d86..0000000000
--- a/variants/STM32F0xx/DEMO_F030F4/ldscript.ld
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
-*****************************************************************************
-**
-
-** File : LinkerScript.ld
-**
-** Abstract : Linker script for STM32F030F4Px Device with
-** 16KByte FLASH, 4KByte RAM
-**
-** Set heap size, stack size and stack location according
-** to application requirements.
-**
-** Set memory bank area and size if external memory is used.
-**
-** Target : STMicroelectronics STM32
-**
-**
-** Distribution: The file is distributed as is, without any warranty
-** of any kind.
-**
-*****************************************************************************
-** @attention
-**
-**
© COPYRIGHT(c) 2014 Ac6
-**
-** Redistribution and use in source and binary forms, with or without modification,
-** are permitted provided that the following conditions are met:
-** 1. Redistributions of source code must retain the above copyright notice,
-** this list of conditions and the following disclaimer.
-** 2. Redistributions in binary form must reproduce the above copyright notice,
-** this list of conditions and the following disclaimer in the documentation
-** and/or other materials provided with the distribution.
-** 3. Neither the name of Ac6 nor the names of its contributors
-** may be used to endorse or promote products derived from this software
-** without specific prior written permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-** SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-**
-*****************************************************************************
-*/
-
-/* Entry Point */
-ENTRY(Reset_Handler)
-
-/* Highest address of the user mode stack */
-_estack = 0x20001000; /* end of RAM */
-/* Generate a link error if heap and stack don't fit into RAM */
-_Min_Heap_Size = 0x200; /* required amount of heap */
-_Min_Stack_Size = 0x400; /* required amount of stack */
-
-/* Specify the memory areas */
-MEMORY
-{
-RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 4K
-FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 16K
-}
-
-/* Define output sections */
-SECTIONS
-{
- /* The startup code goes first into FLASH */
- .isr_vector :
- {
- . = ALIGN(4);
- KEEP(*(.isr_vector)) /* Startup code */
- . = ALIGN(4);
- } >FLASH
-
- /* The program code and other data goes into FLASH */
- .text :
- {
- . = ALIGN(4);
- *(.text) /* .text sections (code) */
- *(.text*) /* .text* sections (code) */
- *(.glue_7) /* glue arm to thumb code */
- *(.glue_7t) /* glue thumb to arm code */
- *(.eh_frame)
-
- KEEP (*(.init))
- KEEP (*(.fini))
-
- . = ALIGN(4);
- _etext = .; /* define a global symbols at end of code */
- } >FLASH
-
- /* Constant data goes into FLASH */
- .rodata :
- {
- . = ALIGN(4);
- *(.rodata) /* .rodata sections (constants, strings, etc.) */
- *(.rodata*) /* .rodata* sections (constants, strings, etc.) */
- . = ALIGN(4);
- } >FLASH
-
- .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >FLASH
- .ARM : {
- __exidx_start = .;
- *(.ARM.exidx*)
- __exidx_end = .;
- } >FLASH
-
- .preinit_array :
- {
- PROVIDE_HIDDEN (__preinit_array_start = .);
- KEEP (*(.preinit_array*))
- PROVIDE_HIDDEN (__preinit_array_end = .);
- } >FLASH
- .init_array :
- {
- PROVIDE_HIDDEN (__init_array_start = .);
- KEEP (*(SORT(.init_array.*)))
- KEEP (*(.init_array*))
- PROVIDE_HIDDEN (__init_array_end = .);
- } >FLASH
- .fini_array :
- {
- PROVIDE_HIDDEN (__fini_array_start = .);
- KEEP (*(SORT(.fini_array.*)))
- KEEP (*(.fini_array*))
- PROVIDE_HIDDEN (__fini_array_end = .);
- } >FLASH
-
- /* used by the startup to initialize data */
- _sidata = LOADADDR(.data);
-
- /* Initialized data sections goes into RAM, load LMA copy after code */
- .data :
- {
- . = ALIGN(4);
- _sdata = .; /* create a global symbol at data start */
- *(.data) /* .data sections */
- *(.data*) /* .data* sections */
-
- . = ALIGN(4);
- _edata = .; /* define a global symbol at data end */
- } >RAM AT> FLASH
-
-
- /* Uninitialized data section */
- . = ALIGN(4);
- .bss :
- {
- /* This is used by the startup in order to initialize the .bss secion */
- _sbss = .; /* define a global symbol at bss start */
- __bss_start__ = _sbss;
- *(.bss)
- *(.bss*)
- *(COMMON)
-
- . = ALIGN(4);
- _ebss = .; /* define a global symbol at bss end */
- __bss_end__ = _ebss;
- } >RAM
-
- /* User_heap_stack section, used to check that there is enough RAM left */
- ._user_heap_stack :
- {
- . = ALIGN(8);
- PROVIDE ( end = . );
- PROVIDE ( _end = . );
- . = . + _Min_Heap_Size;
- . = . + _Min_Stack_Size;
- . = ALIGN(8);
- } >RAM
-
-
-
- /* Remove information from the standard libraries */
- /DISCARD/ :
- {
- libc.a ( * )
- libm.a ( * )
- libgcc.a ( * )
- }
-
- .ARM.attributes 0 : { *(.ARM.attributes) }
-}
-
-
diff --git a/variants/STM32F0xx/DEMO_F030F4/variant_DEMO_F030F4.h b/variants/STM32F0xx/DEMO_F030F4/variant_DEMO_F030F4.h
deleted file mode 100644
index d80c489e31..0000000000
--- a/variants/STM32F0xx/DEMO_F030F4/variant_DEMO_F030F4.h
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- *******************************************************************************
- * Copyright (c) 2018, STMicroelectronics
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * 3. Neither the name of STMicroelectronics nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *******************************************************************************
- */
-#ifndef _VARIANT_ARDUINO_STM32_
-#define _VARIANT_ARDUINO_STM32_
-
-#ifdef __cplusplus
-extern "C" {
-#endif // __cplusplus
-
-/*----------------------------------------------------------------------------
- * Pins
- *----------------------------------------------------------------------------*/
-
-// USB connector on the top, MCU side
-// Left Side
-#define PA0 A0 //D0/A0
-#define PA1 A1 //D1/A1
-#define PA2 A2 //D2/A2 - TX
-#define PA3 A3 //D3/A3 - RX
-#define PA4 A4 //D4/A4 - LED
-// Right side
-#define PA5 A5 //D5/A5 - SCK
-#define PA6 A6 //D6/A6 - MISO
-#define PA7 A7 //D7/A7 - MOSI
-#define PB1 A8 //D8/A8 - SS
-#define PA9 9 //D9 - SCL (TX UART header)
-#define PA10 10 //D10 - SDA (RX UART header)
-#define PA13 11 //D11 - SWDIO
-#define PA14 12 //D12 - SWCLK
-// Boards without a crystal can use these pins as well:
-#define PF0 13
-#define PF1 14
-
-// This must be a literal with the same value as PEND
-#define NUM_DIGITAL_PINS 15
-// This must be a literal with a value less than or equal to MAX_ANALOG_INPUTS
-#define NUM_ANALOG_INPUTS 9
-
-// On-board LED pin number
-#define LED_BUILTIN PA4
-#define LED_GREEN LED_BUILTIN
-
-// SPI Definitions
-#define PIN_SPI_SS PB1
-#define PIN_SPI_MOSI PA7
-#define PIN_SPI_MISO PA6
-#define PIN_SPI_SCK PA5
-
-// I2C Definitions
-#define PIN_WIRE_SDA PA10 // Default for Arduino connector compatibility
-#define PIN_WIRE_SCL PA9 // Default for Arduino connector compatibility
-
-// Timer Definitions
-// Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin
-#define TIMER_TONE TIM17
-#define TIMER_SERVO TIM16
-
-// UART Definitions
-#define SERIAL_UART_INSTANCE 1
-// Default pin used for 'Serial' instance
-// Mandatory for Firmata
-#define PIN_SERIAL_RX PA3
-#define PIN_SERIAL_TX PA2
-
-#ifdef ARDUINO_DEMO_F030F4_16M
-#define HSE_VALUE 16000000U /*!< Value of the External oscillator in Hz */
-#endif
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-/*----------------------------------------------------------------------------
- * Arduino objects - C++ only
- *----------------------------------------------------------------------------*/
-
-#ifdef __cplusplus
- // These serial port names are intended to allow libraries and architecture-neutral
- // sketches to automatically default to the correct port name for a particular type
- // of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
- // the first hardware serial port whose RX/TX pins are not dedicated to another use.
- //
- // SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
- //
- // SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
- //
- // SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
- //
- // SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
- //
- // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
- // pins are NOT connected to anything by default.
- #define SERIAL_PORT_MONITOR Serial
- #define SERIAL_PORT_HARDWARE Serial
-#endif
-
-#endif /* _VARIANT_ARDUINO_STM32_ */
diff --git a/variants/STM32F0xx/DISCO_F030R8/PeripheralPins.c b/variants/STM32F0xx/DISCO_F030R8/PeripheralPins.c
deleted file mode 100644
index c3ad049728..0000000000
--- a/variants/STM32F0xx/DISCO_F030R8/PeripheralPins.c
+++ /dev/null
@@ -1,212 +0,0 @@
-/*
- *******************************************************************************
- * Copyright (c) 2019, STMicroelectronics
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * 3. Neither the name of STMicroelectronics nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *******************************************************************************
- * Automatically generated from STM32F030R8Tx.xml
- */
-#include "Arduino.h"
-#include "PeripheralPins.h"
-
-/* =====
- * Note: Commented lines are alternative possibilities which are not used per default.
- * If you change them, you will have to know what you do
- * =====
- */
-
-//*** ADC ***
-
-#ifdef HAL_ADC_MODULE_ENABLED
-WEAK const PinMap PinMap_ADC[] = {
- {PA_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC_IN0 - USER_BTN
- {PA_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC_IN1
- {PA_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC_IN2
- {PA_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC_IN3
- {PA_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC_IN4
- {PA_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC_IN5
- {PA_6, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC_IN6
- {PA_7, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC_IN7
- {PB_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC_IN8
- {PB_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC_IN9
- {PC_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC_IN10
- {PC_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC_IN11
- {PC_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC_IN12
- {PC_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC_IN13
- {PC_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC_IN14
- {PC_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC_IN15
- {NC, NP, 0}
-};
-#endif
-
-//*** No DAC ***
-
-//*** I2C ***
-
-#ifdef HAL_I2C_MODULE_ENABLED
-WEAK const PinMap PinMap_I2C_SDA[] = {
- {PB_7, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
- {PB_9, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
- {PB_11, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C2)},
- {PF_7, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF_NONE)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_I2C_MODULE_ENABLED
-WEAK const PinMap PinMap_I2C_SCL[] = {
- {PB_6, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
- {PB_8, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
- {PB_10, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C2)},
- {PF_6, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF_NONE)},
- {NC, NP, 0}
-};
-#endif
-
-//*** PWM ***
-
-#ifdef HAL_TIM_MODULE_ENABLED
-WEAK const PinMap PinMap_PWM[] = {
- {PA_2, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM15, 1, 0)}, // TIM15_CH1
- {PA_3, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM15, 2, 0)}, // TIM15_CH2
- {PA_4, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM14, 1, 0)}, // TIM14_CH1
- {PA_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 1, 0)}, // TIM3_CH1
- // {PA_6, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM16, 1, 0)}, // TIM16_CH1
- // {PA_7, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 1, 1)}, // TIM1_CH1N
- {PA_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 2, 0)}, // TIM3_CH2
- // {PA_7, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM14, 1, 0)}, // TIM14_CH1
- // {PA_7, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM17, 1, 0)}, // TIM17_CH1
- {PA_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 1, 0)}, // TIM1_CH1
- {PA_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 2, 0)}, // TIM1_CH2
- {PA_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 3, 0)}, // TIM1_CH3
- {PA_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 4, 0)}, // TIM1_CH4
- // {PB_0, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 2, 1)}, // TIM1_CH2N
- {PB_0, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 3, 0)}, // TIM3_CH3
- // {PB_1, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 3, 1)}, // TIM1_CH3N
- // {PB_1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 4, 0)}, // TIM3_CH4
- {PB_1, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM14, 1, 0)}, // TIM14_CH1
- {PB_4, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 1, 0)}, // TIM3_CH1
- {PB_5, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 2, 0)}, // TIM3_CH2
- {PB_6, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM16, 1, 1)}, // TIM16_CH1N
- {PB_7, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM17, 1, 1)}, // TIM17_CH1N
- {PB_8, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM16, 1, 0)}, // TIM16_CH1
- {PB_9, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM17, 1, 0)}, // TIM17_CH1
- {PB_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 1, 1)}, // TIM1_CH1N
- // {PB_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 2, 1)}, // TIM1_CH2N
- {PB_14, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM15, 1, 0)}, // TIM15_CH1
- // {PB_15, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 3, 1)}, // TIM1_CH3N
- // {PB_15, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM15, 1, 1)}, // TIM15_CH1N
- {PB_15, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM15, 2, 0)}, // TIM15_CH2
- {PC_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_MCO, 1, 0)}, // TIM3_CH1
- {PC_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_MCO, 2, 0)}, // TIM3_CH2
- {PC_8, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 3, 0)}, // TIM3_CH3 - LED_BLUE (LD4)
- {PC_9, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_MCO, 4, 0)}, // TIM3_CH4 - LED_GREEN (LD3)
- {NC, NP, 0}
-};
-#endif
-
-//*** SERIAL ***
-
-#ifdef HAL_UART_MODULE_ENABLED
-WEAK const PinMap PinMap_UART_TX[] = {
- {PA_2, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
- {PA_9, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
- {PA_14, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
- {PB_6, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART1)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_UART_MODULE_ENABLED
-WEAK const PinMap PinMap_UART_RX[] = {
- {PA_3, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
- {PA_10, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
- {PA_15, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
- {PB_7, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART1)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_UART_MODULE_ENABLED
-WEAK const PinMap PinMap_UART_RTS[] = {
- {PA_1, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
- {PA_12, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_UART_MODULE_ENABLED
-WEAK const PinMap PinMap_UART_CTS[] = {
- {PA_0, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)}, // USER_BTN
- {PA_11, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
- {NC, NP, 0}
-};
-#endif
-
-//*** SPI ***
-
-#ifdef HAL_SPI_MODULE_ENABLED
-WEAK const PinMap PinMap_SPI_MOSI[] = {
- {PA_7, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PB_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PB_15, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_SPI_MODULE_ENABLED
-WEAK const PinMap PinMap_SPI_MISO[] = {
- {PA_6, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PB_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PB_14, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_SPI_MODULE_ENABLED
-WEAK const PinMap PinMap_SPI_SCLK[] = {
- {PA_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PB_3, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PB_13, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_SPI_MODULE_ENABLED
-WEAK const PinMap PinMap_SPI_SSEL[] = {
- {PA_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PA_15, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PB_12, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
- {NC, NP, 0}
-};
-#endif
-
-//*** No CAN ***
-
-//*** No ETHERNET ***
-
-//*** No QUADSPI ***
-
-//*** No USB ***
diff --git a/variants/STM32F0xx/DISCO_F030R8/PinNamesVar.h b/variants/STM32F0xx/DISCO_F030R8/PinNamesVar.h
deleted file mode 100644
index 87d21ee39c..0000000000
--- a/variants/STM32F0xx/DISCO_F030R8/PinNamesVar.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/* SYS_WKUP */
-#ifdef PWR_WAKEUP_PIN1
- SYS_WKUP1 = PA_0,
-#endif
-#ifdef PWR_WAKEUP_PIN2
- SYS_WKUP2 = PC_13,
-#endif
-#ifdef PWR_WAKEUP_PIN3
- SYS_WKUP3 = NC,
-#endif
-#ifdef PWR_WAKEUP_PIN4
- SYS_WKUP4 = NC,
-#endif
-#ifdef PWR_WAKEUP_PIN5
- SYS_WKUP5 = NC,
-#endif
-#ifdef PWR_WAKEUP_PIN6
- SYS_WKUP6 = NC,
-#endif
-#ifdef PWR_WAKEUP_PIN7
- SYS_WKUP7 = NC,
-#endif
-#ifdef PWR_WAKEUP_PIN8
- SYS_WKUP8 = NC,
-#endif
diff --git a/variants/STM32F0xx/DISCO_F030R8/ldscript.ld b/variants/STM32F0xx/DISCO_F030R8/ldscript.ld
deleted file mode 100644
index 470632bb90..0000000000
--- a/variants/STM32F0xx/DISCO_F030R8/ldscript.ld
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
-*****************************************************************************
-**
-
-** File : LinkerScript.ld
-**
-** Abstract : Linker script for STM32F030R8Tx Device with
-** 64KByte FLASH, 8KByte RAM
-**
-** Set heap size, stack size and stack location according
-** to application requirements.
-**
-** Set memory bank area and size if external memory is used.
-**
-** Target : STMicroelectronics STM32
-**
-**
-** Distribution: The file is distributed as is, without any warranty
-** of any kind.
-**
-*****************************************************************************
-** @attention
-**
-** © COPYRIGHT(c) 2014 Ac6
-**
-** Redistribution and use in source and binary forms, with or without modification,
-** are permitted provided that the following conditions are met:
-** 1. Redistributions of source code must retain the above copyright notice,
-** this list of conditions and the following disclaimer.
-** 2. Redistributions in binary form must reproduce the above copyright notice,
-** this list of conditions and the following disclaimer in the documentation
-** and/or other materials provided with the distribution.
-** 3. Neither the name of Ac6 nor the names of its contributors
-** may be used to endorse or promote products derived from this software
-** without specific prior written permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-** SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-**
-*****************************************************************************
-*/
-
-/* Entry Point */
-ENTRY(Reset_Handler)
-
-/* Highest address of the user mode stack */
-_estack = 0x20002000; /* end of RAM */
-/* Generate a link error if heap and stack don't fit into RAM */
-_Min_Heap_Size = 0x200; /* required amount of heap */
-_Min_Stack_Size = 0x400; /* required amount of stack */
-
-/* Specify the memory areas */
-MEMORY
-{
-RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 8K
-FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 64K
-}
-
-/* Define output sections */
-SECTIONS
-{
- /* The startup code goes first into FLASH */
- .isr_vector :
- {
- . = ALIGN(4);
- KEEP(*(.isr_vector)) /* Startup code */
- . = ALIGN(4);
- } >FLASH
-
- /* The program code and other data goes into FLASH */
- .text ALIGN(4):
- {
- . = ALIGN(4);
- *(.text) /* .text sections (code) */
- *(.text*) /* .text* sections (code) */
- *(.glue_7) /* glue arm to thumb code */
- *(.glue_7t) /* glue thumb to arm code */
- *(.eh_frame)
-
- KEEP (*(.init))
- KEEP (*(.fini))
-
- . = ALIGN(4);
- _etext = .; /* define a global symbols at end of code */
- } >FLASH
-
- /* Constant data goes into FLASH */
- .rodata :
- {
- . = ALIGN(4);
- *(.rodata) /* .rodata sections (constants, strings, etc.) */
- *(.rodata*) /* .rodata* sections (constants, strings, etc.) */
- . = ALIGN(4);
- } >FLASH
-
- .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >FLASH
- .ARM : {
- __exidx_start = .;
- *(.ARM.exidx*)
- __exidx_end = .;
- } >FLASH
-
- .preinit_array :
- {
- PROVIDE_HIDDEN (__preinit_array_start = .);
- KEEP (*(.preinit_array*))
- PROVIDE_HIDDEN (__preinit_array_end = .);
- } >FLASH
- .init_array :
- {
- PROVIDE_HIDDEN (__init_array_start = .);
- KEEP (*(SORT(.init_array.*)))
- KEEP (*(.init_array*))
- PROVIDE_HIDDEN (__init_array_end = .);
- } >FLASH
- .fini_array :
- {
- PROVIDE_HIDDEN (__fini_array_start = .);
- KEEP (*(SORT(.fini_array.*)))
- KEEP (*(.fini_array*))
- PROVIDE_HIDDEN (__fini_array_end = .);
- } >FLASH
-
- /* used by the startup to initialize data */
- _sidata = LOADADDR(.data);
-
- /* Initialized data sections goes into RAM, load LMA copy after code */
- .data :
- {
- . = ALIGN(4);
- _sdata = .; /* create a global symbol at data start */
- *(.data) /* .data sections */
- *(.data*) /* .data* sections */
-
- . = ALIGN(4);
- _edata = .; /* define a global symbol at data end */
- } >RAM AT> FLASH
-
-
- /* Uninitialized data section */
- . = ALIGN(4);
- .bss :
- {
- /* This is used by the startup in order to initialize the .bss secion */
- _sbss = .; /* define a global symbol at bss start */
- __bss_start__ = _sbss;
- *(.bss)
- *(.bss*)
- *(COMMON)
-
- . = ALIGN(4);
- _ebss = .; /* define a global symbol at bss end */
- __bss_end__ = _ebss;
- } >RAM
-
- /* User_heap_stack section, used to check that there is enough RAM left */
- ._user_heap_stack :
- {
- . = ALIGN(8);
- PROVIDE ( end = . );
- PROVIDE ( _end = . );
- . = . + _Min_Heap_Size;
- . = . + _Min_Stack_Size;
- . = ALIGN(8);
- } >RAM
-
-
-
- /* Remove information from the standard libraries */
- /DISCARD/ :
- {
- libc.a ( * )
- libm.a ( * )
- libgcc.a ( * )
- }
-
- .ARM.attributes 0 : { *(.ARM.attributes) }
-}
diff --git a/variants/STM32F0xx/DISCO_F030R8/variant_DISCO_F030R8.cpp b/variants/STM32F0xx/DISCO_F030R8/variant_DISCO_F030R8.cpp
deleted file mode 100644
index 4a985bdc6a..0000000000
--- a/variants/STM32F0xx/DISCO_F030R8/variant_DISCO_F030R8.cpp
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
- *******************************************************************************
- * Copyright (c) 2018, STMicroelectronics
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * 3. Neither the name of STMicroelectronics nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *******************************************************************************
- */
-
-#include "pins_arduino.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-// Digital PinName array
-const PinName digitalPin[] = {
- //P1 connector Right side (bottom view)
- PC_13, //D0
- PC_14, //D1
- PC_15, //D2
- PF_0, //D3
- PF_1, //D4
- PC_0, //D5
- PC_1, //D6
- PC_2, //D7
- PC_3, //D8
- PA_0, //D9 - USER_BTN
- PA_1, //D10
- PA_2, //D11
- PA_3, //D12
- PF_4, //D13
- PF_5, //D14
- PA_4, //D15
- PA_5, //D16
- PA_6, //D17
- PA_7, //D18
- PC_4, //D19
- PC_5, //D20
- PB_0, //D21
- PB_1, //D22
- PB_2, //D23
- PB_10, //D24
- PB_11, //D25
- PB_12, //D26
- //P2 connector Left side (bottom view)
- PB_9, //D27
- PB_8, //D28
- PB_7, //D29
- PB_6, //D30
- PB_5, //D31
- PB_4, //D32
- PB_3, //D33
- PD_2, //D34
- PC_12, //D35
- PC_11, //D36
- PC_10, //D37
- PA_15, //D38
- PA_14, //D39
- PF_7, //D40
- PF_6, //D41
- PA_13, //D42
- PA_12, //D43
- PA_11, //D44
- PA_10, //D45
- PA_9, //D46
- PA_8, //D47
- PC_9, //D48 - LED_GREEN (LD3)
- PC_8, //D49 - LED_BLUE (LD4)
- PC_7, //D50
- PC_6, //D51
- PB_15, //D52
- PB_14, //D53
- PB_13 //D54
-};
-
-// Analog (Ax) pin number array
-const uint32_t analogInputPin[] = {
- 5, //A0 = D5
- 6, //A1 = D6
- 7, //A2 = D7
- 8, //A3 = D8
- 9, //A4 = D9
- 10, //A5 = D10
- 11, //A6 = D11
- 12, //A7 = D12
- 15, //A8 = D15
- 16, //A9 = D16
- 17, //A10 = D17
- 18, //A11 = D18
- 19, //A12 = D19
- 20, //A13 = D20
- 21, //A14 = D21
- 22 //A15 = D22
-};
-
-#ifdef __cplusplus
-}
-#endif
-
-// ----------------------------------------------------------------------------
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * @brief System Clock Configuration
- * The system Clock is configured as follow :
- * System Clock source = PLL (HSI/2)
- * SYSCLK(Hz) = 48000000
- * HCLK(Hz) = 48000000
- * AHB Prescaler = 1
- * APB1 Prescaler = 1
- * HSI Frequency(Hz) = 8000000
- * PREDIV = 1
- * PLLMUL = 12
- * Flash Latency(WS) = 1
- * @param None
- * @retval None
- */
-WEAK void SystemClock_Config(void)
-{
- RCC_OscInitTypeDef RCC_OscInitStruct;
- RCC_ClkInitTypeDef RCC_ClkInitStruct;
-
- /* Initializes the CPU, AHB and APB busses clocks */
- RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
- RCC_OscInitStruct.HSIState = RCC_HSI_ON;
- RCC_OscInitStruct.HSICalibrationValue = 16;
- RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
- RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
- RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL12;
- RCC_OscInitStruct.PLL.PREDIV = RCC_PREDIV_DIV1;
- if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) {
- Error_Handler();
- }
-
- /* Initializes the CPU, AHB and APB busses clocks */
- RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK
- | RCC_CLOCKTYPE_PCLK1;
- RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
- RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
- RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
-
- if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1) != HAL_OK) {
- Error_Handler();
- }
-}
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/variants/STM32F0xx/DISCO_F030R8/variant_DISCO_F030R8.h b/variants/STM32F0xx/DISCO_F030R8/variant_DISCO_F030R8.h
deleted file mode 100644
index bb023aa3d1..0000000000
--- a/variants/STM32F0xx/DISCO_F030R8/variant_DISCO_F030R8.h
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- *******************************************************************************
- * Copyright (c) 2018, STMicroelectronics
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * 3. Neither the name of STMicroelectronics nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *******************************************************************************
- */
-
-#ifndef _VARIANT_ARDUINO_STM32_
-#define _VARIANT_ARDUINO_STM32_
-
-#ifdef __cplusplus
-extern "C" {
-#endif // __cplusplus
-
-/*----------------------------------------------------------------------------
- * Pins
- *----------------------------------------------------------------------------*/
-
-// P1 connector Right side (bottom view)
-#define PC13 0
-#define PC14 1
-#define PC15 2
-#define PF0 3
-#define PF1 4
-#define PC0 A0
-#define PC1 A1
-#define PC2 A2
-#define PC3 A3
-#define PA0 A4 // USER_BTN
-#define PA1 A5
-#define PA2 A6
-#define PA3 A7
-#define PF4 13
-#define PF5 14
-#define PA4 A8
-#define PA5 A9
-#define PA6 A10
-#define PA7 A11
-#define PC4 A12
-#define PC5 A13
-#define PB0 A14
-#define PB1 A15
-#define PB2 23
-#define PB10 24
-#define PB11 25
-#define PB12 26
-// P2 connector Left side (bottom view)
-#define PB9 27
-#define PB8 28
-#define PB7 29
-#define PB6 30
-#define PB5 31
-#define PB4 32
-#define PB3 33
-#define PD2 34
-#define PC12 35
-#define PC11 36
-#define PC10 37
-#define PA15 38
-#define PA14 39
-#define PF7 40
-#define PF6 41
-#define PA13 42
-#define PA12 43
-#define PA11 44
-#define PA10 45
-#define PA9 46
-#define PA8 47
-#define PC9 48 // LED_GREEN (LD3)
-#define PC8 49 // LED_BLUE (LD4)
-#define PC7 50
-#define PC6 51
-#define PB15 52
-#define PB14 53
-#define PB13 54
-
-// This must be a literal
-#define NUM_DIGITAL_PINS 71
-// This must be a literal with a value less than or equal to to MAX_ANALOG_INPUTS
-#define NUM_ANALOG_INPUTS 16
-
-//On-board LED pin number
-#define LED_BUILTIN PC9 // LD3
-#define LED_GREEN LED_BUILTIN
-#define LED_BLUE PC8 // LD4
-
-//On-board user button
-#define USER_BTN PA0
-
-// SPI definitions
-// SPI1 is used
-#define PIN_SPI_SS PA4
-#define PIN_SPI_SS1 PC4
-#define PIN_SPI_SS2 PB12
-#define PIN_SPI_SS3 PC6
-#define PIN_SPI_MOSI PA7
-#define PIN_SPI_MISO PA6
-#define PIN_SPI_SCK PA5
-
-// I2C Definitions
-// I2C1 is used
-#define PIN_WIRE_SDA PB9
-#define PIN_WIRE_SCL PB8
-
-// Timer Definitions
-// Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin
-#define TIMER_TONE TIM6
-#define TIMER_SERVO TIM14
-
-// UART Definitions
-#define SERIAL_UART_INSTANCE 1 // USART 1
-
-// Mandatory for Firmata
-#define PIN_SERIAL_RX PA10
-#define PIN_SERIAL_TX PA9
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-/*----------------------------------------------------------------------------
- * Arduino objects - C++ only
- *----------------------------------------------------------------------------*/
-
-#ifdef __cplusplus
- // These serial port names are intended to allow libraries and architecture-neutral
- // sketches to automatically default to the correct port name for a particular type
- // of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
- // the first hardware serial port whose RX/TX pins are not dedicated to another use.
- //
- // SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
- //
- // SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
- //
- // SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
- //
- // SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
- //
- // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
- // pins are NOT connected to anything by default.
- #define SERIAL_PORT_MONITOR Serial
- #define SERIAL_PORT_HARDWARE Serial
-#endif
-
-#endif /* _VARIANT_ARDUINO_STM32_ */
diff --git a/variants/STM32F0xx/DISCO_F072RB/PeripheralPins.c b/variants/STM32F0xx/DISCO_F072RB/PeripheralPins.c
deleted file mode 100644
index 3ea01aa261..0000000000
--- a/variants/STM32F0xx/DISCO_F072RB/PeripheralPins.c
+++ /dev/null
@@ -1,312 +0,0 @@
-/*
- *******************************************************************************
- * Copyright (c) 2019, STMicroelectronics
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * 3. Neither the name of STMicroelectronics nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *******************************************************************************
- * Automatically generated from STM32F072R(8-B)Tx.xml
- */
-#include "Arduino.h"
-#include "PeripheralPins.h"
-
-/* =====
- * Note: Commented lines are alternative possibilities which are not used per default.
- * If you change them, you will have to know what you do
- * =====
- */
-
-//*** ADC ***
-
-#ifdef HAL_ADC_MODULE_ENABLED
-WEAK const PinMap PinMap_ADC[] = {
- {PA_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC_IN0
- {PA_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC_IN1
-#ifdef TSC_REMOVED
- {PA_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC_IN2
- {PA_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC_IN3
-#endif
- {PA_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC_IN4
- {PA_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC_IN5
-#ifdef TSC_REMOVED
- {PA_6, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC_IN6
- {PA_7, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC_IN7
- {PB_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC_IN8
- {PB_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC_IN9
-#endif
- {PC_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC_IN10
- {PC_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC_IN11
- {PC_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC_IN12
- {PC_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC_IN13
- {PC_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC_IN14
- {PC_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC_IN15
- {NC, NP, 0}
-};
-#endif
-
-//*** DAC ***
-
-#ifdef HAL_DAC_MODULE_ENABLED
-WEAK const PinMap PinMap_DAC[] = {
- {PA_4, DAC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // DAC_OUT1
- {PA_5, DAC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // DAC_OUT2
- {NC, NP, 0}
-};
-#endif
-
-//*** I2C ***
-
-#ifdef HAL_I2C_MODULE_ENABLED
-WEAK const PinMap PinMap_I2C_SDA[] = {
- {PB_7, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
- {PB_9, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
- {PB_11, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C2)},
- {PB_14, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF5_I2C2)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_I2C_MODULE_ENABLED
-WEAK const PinMap PinMap_I2C_SCL[] = {
- {PB_6, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
- {PB_8, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
- {PB_10, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C2)},
- {PB_13, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF5_I2C2)},
- {NC, NP, 0}
-};
-#endif
-
-//*** PWM ***
-
-#ifdef HAL_TIM_MODULE_ENABLED
-WEAK const PinMap PinMap_PWM[] = {
- {PA_0, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 1, 0)}, // TIM2_CH1
- {PA_1, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 2, 0)}, // TIM2_CH2
- // {PA_1, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM15, 1, 1)}, // TIM15_CH1N
-#ifdef TSC_REMOVED
- // {PA_2, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 3, 0)}, // TIM2_CH3
- {PA_2, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM15, 1, 0)}, // TIM15_CH1
- {PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 4, 0)}, // TIM2_CH4
- // {PA_3, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM15, 2, 0)}, // TIM15_CH2
-#endif
- {PA_4, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM14, 1, 0)}, // TIM14_CH1
- {PA_5, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 1, 0)}, // TIM2_CH1
-#ifdef TSC_REMOVED
- {PA_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 1, 0)}, // TIM3_CH1
- // {PA_6, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM16, 1, 0)}, // TIM16_CH1
- {PA_7, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 1, 1)}, // TIM1_CH1N
- // {PA_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 2, 0)}, // TIM3_CH2
- // {PA_7, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM14, 1, 0)}, // TIM14_CH1
- // {PA_7, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM17, 1, 0)}, // TIM17_CH1
-#endif
- {PA_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 1, 0)}, // TIM1_CH1
- {PA_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 2, 0)}, // TIM1_CH2
- {PA_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 3, 0)}, // TIM1_CH3
-#ifdef USB_REMOVED
- {PA_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 4, 0)}, // TIM1_CH4
-#endif
- {PA_15, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 1, 0)}, // TIM2_CH1
-#ifdef TSC_REMOVED
- {PB_0, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 2, 1)}, // TIM1_CH2N
- // {PB_0, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 3, 0)}, // TIM3_CH3
- // {PB_1, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 3, 1)}, // TIM1_CH3N
- // {PB_1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 4, 0)}, // TIM3_CH4
- {PB_1, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM14, 1, 0)}, // TIM14_CH1
-#endif
- {PB_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 2, 0)}, // TIM2_CH2
- {PB_4, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 1, 0)}, // TIM3_CH1
- {PB_5, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 2, 0)}, // TIM3_CH2
- {PB_6, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM16, 1, 1)}, // TIM16_CH1N
- {PB_7, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM17, 1, 1)}, // TIM17_CH1N
- {PB_8, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM16, 1, 0)}, // TIM16_CH1
- {PB_9, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM17, 1, 0)}, // TIM17_CH1
- {PB_10, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 3, 0)}, // TIM2_CH3
- {PB_11, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 4, 0)}, // TIM2_CH4
- {PB_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 1, 1)}, // TIM1_CH1N
- // {PB_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 2, 1)}, // TIM1_CH2N
- {PB_14, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM15, 1, 0)}, // TIM15_CH1
- // {PB_15, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 3, 1)}, // TIM1_CH3N
- {PB_15, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM15, 1, 1)}, // TIM15_CH1N
- // {PB_15, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM15, 2, 0)}, // TIM15_CH2
- {PC_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM3, 1, 0)}, // TIM3_CH1
- {PC_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM3, 2, 0)}, // TIM3_CH2
- {PC_8, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM3, 3, 0)}, // TIM3_CH3
- {PC_9, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM3, 4, 0)}, // TIM3_CH4
- {NC, NP, 0}
-};
-#endif
-
-//*** SERIAL ***
-
-#ifdef HAL_UART_MODULE_ENABLED
-WEAK const PinMap PinMap_UART_TX[] = {
- {PA_0, USART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART4)},
-#ifdef TSC_REMOVED
- {PA_2, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
-#endif
- {PA_9, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
- {PA_14, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
- {PB_6, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART1)},
- {PB_10, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
- {PC_4, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART3)},
- // {PC_10, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART3)},
- {PC_10, USART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART4)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_UART_MODULE_ENABLED
-WEAK const PinMap PinMap_UART_RX[] = {
- {PA_1, USART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART4)},
-#ifdef TSC_REMOVED
- {PA_3, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
-#endif
- {PA_10, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
- {PA_15, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
- {PB_7, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART1)},
- {PB_11, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
- {PC_5, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART3)},
- // {PC_11, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART3)},
- {PC_11, USART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART4)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_UART_MODULE_ENABLED
-WEAK const PinMap PinMap_UART_RTS[] = {
- {PA_1, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
-#ifdef USB_REMOVED
- {PA_12, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
-#endif
- {PA_15, USART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART4)},
-#ifdef TSC_REMOVED
- {PB_1, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
-#endif
- {PB_14, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
- {PD_2, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART3)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_UART_MODULE_ENABLED
-WEAK const PinMap PinMap_UART_CTS[] = {
- {PA_0, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
-#ifdef TSC_REMOVED
- {PA_6, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
-#endif
-#ifdef TSC_REMOVED
- {PA_11, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
-#endif
- {PB_7, USART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART4)},
- {PB_13, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
- {NC, NP, 0}
-};
-#endif
-
-//*** SPI ***
-
-#ifdef HAL_SPI_MODULE_ENABLED
-WEAK const PinMap PinMap_SPI_MOSI[] = {
-#ifdef TSC_REMOVED
- {PA_7, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
-#endif
- {PB_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PB_15, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
- {PC_3, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_SPI2)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_SPI_MODULE_ENABLED
-WEAK const PinMap PinMap_SPI_MISO[] = {
-#ifdef TSC_REMOVED
- {PA_6, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
-#endif
- {PB_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PB_14, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
- {PC_2, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_SPI2)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_SPI_MODULE_ENABLED
-WEAK const PinMap PinMap_SPI_SCLK[] = {
- {PA_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PB_3, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PB_10, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)},
- {PB_13, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_SPI_MODULE_ENABLED
-WEAK const PinMap PinMap_SPI_SSEL[] = {
- {PA_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PA_15, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PB_9, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)},
- {PB_12, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
- {NC, NP, 0}
-};
-#endif
-
-//*** CAN ***
-
-#ifdef HAL_CAN_MODULE_ENABLED
-WEAK const PinMap PinMap_CAN_RD[] = {
-#ifdef USB_REMOVED
- {PA_11, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF4_CAN)},
-#endif
- {PB_8, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF4_CAN)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_CAN_MODULE_ENABLED
-WEAK const PinMap PinMap_CAN_TD[] = {
-#ifdef USB_REMOVED
- {PA_12, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF4_CAN)},
-#endif
- {PB_9, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF4_CAN)},
- {NC, NP, 0}
-};
-#endif
-
-//*** No ETHERNET ***
-
-//*** No QUADSPI ***
-
-//*** USB ***
-
-#ifdef HAL_PCD_MODULE_ENABLED
-WEAK const PinMap PinMap_USB[] = {
- {PA_11, USB, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_DM
- {PA_12, USB, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_DP
- // {PA_13, USB, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_USB)}, // USB_NOE
- {NC, NP, 0}
-};
-#endif
-
-//*** No USB_OTG_FS ***
-
-//*** No USB_OTG_HS ***
diff --git a/variants/STM32F0xx/DISCO_F072RB/PinNamesVar.h b/variants/STM32F0xx/DISCO_F072RB/PinNamesVar.h
deleted file mode 100644
index 52526fe78b..0000000000
--- a/variants/STM32F0xx/DISCO_F072RB/PinNamesVar.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* SYS_WKUP */
-#ifdef PWR_WAKEUP_PIN1
- SYS_WKUP1 = PA_0,
-#endif
-#ifdef PWR_WAKEUP_PIN2
- SYS_WKUP2 = PC_13,
-#endif
-#ifdef PWR_WAKEUP_PIN3
- SYS_WKUP3 = PE_6, /* Manually updated */
-#endif
-#ifdef PWR_WAKEUP_PIN4
- SYS_WKUP4 = PA_2,
-#endif
-#ifdef PWR_WAKEUP_PIN5
- SYS_WKUP5 = PC_5,
-#endif
-#ifdef PWR_WAKEUP_PIN6
- SYS_WKUP6 = PB_5,
-#endif
-#ifdef PWR_WAKEUP_PIN7
- SYS_WKUP7 = PB_15,
-#endif
-#ifdef PWR_WAKEUP_PIN8
- SYS_WKUP8 = PF_2, /* Manually updated */
-#endif
-/* USB */
-#ifdef USBCON
- USB_DM = PA_11,
- USB_DP = PA_12,
- USB_NOE = PA_13,
-#endif
diff --git a/variants/STM32F0xx/DISCO_F072RB/ldscript.ld b/variants/STM32F0xx/DISCO_F072RB/ldscript.ld
deleted file mode 100644
index 44015746d5..0000000000
--- a/variants/STM32F0xx/DISCO_F072RB/ldscript.ld
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
-*****************************************************************************
-**
-
-** File : ldscript.ld
-**
-** Abstract : Linker script for STM32F072RB Device with
-** 128KByte FLASH, 16KByte RAM
-**
-** Set heap size, stack size and stack location according
-** to application requirements.
-**
-** Set memory bank area and size if external memory is used.
-**
-** Target : STMicroelectronics STM32
-**
-**
-** Distribution: The file is distributed as is, without any warranty
-** of any kind.
-**
-*****************************************************************************
-** @attention
-**
-** © COPYRIGHT(c) 2014 Ac6
-**
-** Redistribution and use in source and binary forms, with or without modification,
-** are permitted provided that the following conditions are met:
-** 1. Redistributions of source code must retain the above copyright notice,
-** this list of conditions and the following disclaimer.
-** 2. Redistributions in binary form must reproduce the above copyright notice,
-** this list of conditions and the following disclaimer in the documentation
-** and/or other materials provided with the distribution.
-** 3. Neither the name of Ac6 nor the names of its contributors
-** may be used to endorse or promote products derived from this software
-** without specific prior written permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-** SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-**
-*****************************************************************************
-*/
-
-/* Entry Point */
-ENTRY(Reset_Handler)
-
-/* Highest address of the user mode stack */
-_estack = 0x20004000; /* end of RAM */
-/* Generate a link error if heap and stack don't fit into RAM */
-_Min_Heap_Size = 0x200; /* required amount of heap */
-_Min_Stack_Size = 0x400; /* required amount of stack */
-
-/* Specify the memory areas */
-MEMORY
-{
-RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 16K
-FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 128K
-}
-
-/* Define output sections */
-SECTIONS
-{
- /* The startup code goes first into FLASH */
- .isr_vector :
- {
- . = ALIGN(4);
- KEEP(*(.isr_vector)) /* Startup code */
- . = ALIGN(4);
- } >FLASH
-
- /* The program code and other data goes into FLASH */
- .text :
- {
- . = ALIGN(4);
- *(.text) /* .text sections (code) */
- *(.text*) /* .text* sections (code) */
- *(.glue_7) /* glue arm to thumb code */
- *(.glue_7t) /* glue thumb to arm code */
- *(.eh_frame)
-
- KEEP (*(.init))
- KEEP (*(.fini))
-
- . = ALIGN(4);
- _etext = .; /* define a global symbols at end of code */
- } >FLASH
-
- /* Constant data goes into FLASH */
- .rodata :
- {
- . = ALIGN(4);
- *(.rodata) /* .rodata sections (constants, strings, etc.) */
- *(.rodata*) /* .rodata* sections (constants, strings, etc.) */
- . = ALIGN(4);
- } >FLASH
-
- .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >FLASH
- .ARM : {
- __exidx_start = .;
- *(.ARM.exidx*)
- __exidx_end = .;
- } >FLASH
-
- .preinit_array :
- {
- PROVIDE_HIDDEN (__preinit_array_start = .);
- KEEP (*(.preinit_array*))
- PROVIDE_HIDDEN (__preinit_array_end = .);
- } >FLASH
- .init_array :
- {
- PROVIDE_HIDDEN (__init_array_start = .);
- KEEP (*(SORT(.init_array.*)))
- KEEP (*(.init_array*))
- PROVIDE_HIDDEN (__init_array_end = .);
- } >FLASH
- .fini_array :
- {
- PROVIDE_HIDDEN (__fini_array_start = .);
- KEEP (*(SORT(.fini_array.*)))
- KEEP (*(.fini_array*))
- PROVIDE_HIDDEN (__fini_array_end = .);
- } >FLASH
-
- /* used by the startup to initialize data */
- _sidata = LOADADDR(.data);
-
- /* Initialized data sections goes into RAM, load LMA copy after code */
- .data :
- {
- . = ALIGN(4);
- _sdata = .; /* create a global symbol at data start */
- *(.data) /* .data sections */
- *(.data*) /* .data* sections */
-
- . = ALIGN(4);
- _edata = .; /* define a global symbol at data end */
- } >RAM AT> FLASH
-
-
- /* Uninitialized data section */
- . = ALIGN(4);
- .bss :
- {
- /* This is used by the startup in order to initialize the .bss secion */
- _sbss = .; /* define a global symbol at bss start */
- __bss_start__ = _sbss;
- *(.bss)
- *(.bss*)
- *(COMMON)
-
- . = ALIGN(4);
- _ebss = .; /* define a global symbol at bss end */
- __bss_end__ = _ebss;
- } >RAM
-
- /* User_heap_stack section, used to check that there is enough RAM left */
- ._user_heap_stack :
- {
- . = ALIGN(4);
- PROVIDE ( end = . );
- PROVIDE ( _end = . );
- . = . + _Min_Heap_Size;
- . = . + _Min_Stack_Size;
- . = ALIGN(4);
- } >RAM
-
-
-
- /* Remove information from the standard libraries */
- /DISCARD/ :
- {
- libc.a ( * )
- libm.a ( * )
- libgcc.a ( * )
- }
-
- .ARM.attributes 0 : { *(.ARM.attributes) }
-}
-
-
diff --git a/variants/STM32F0xx/DISCO_F072RB/variant_DISCO_F072RB.cpp b/variants/STM32F0xx/DISCO_F072RB/variant_DISCO_F072RB.cpp
deleted file mode 100644
index 08ae1b9621..0000000000
--- a/variants/STM32F0xx/DISCO_F072RB/variant_DISCO_F072RB.cpp
+++ /dev/null
@@ -1,187 +0,0 @@
-/*
- *******************************************************************************
- * Copyright (c) 2018, STMicroelectronics
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * 3. Neither the name of STMicroelectronics nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *******************************************************************************
- */
-
-#include "pins_arduino.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-// Pin number
-const PinName digitalPin[] = {
- //P2 connector Right side (top view)
- PB_9, //D0
- PB_8, //D1
- PB_7, //D2
- PB_6, //D3
- PB_5, //D4
- PB_4, //D5
- PB_3, //D6
- PD_2, //D7
- PC_12, //D8
- PC_11, //D9
- PC_10, //D10
- PA_15, //D11
- PA_14, //D12
- PA_13, //D13
-#ifdef USB_REMOVED
- PA_12, //D14
- PA_11, //D15
-#else
- NC,
- NC,
-#endif
- PA_10, //D16
- PA_9, //D17
- PA_8, //D18
- PC_9, //D19
- PC_8, //D20
- PC_7, //D21
- PC_6, //D22
- PB_15, //D23
- PB_14, //D24
- PB_13, //D25
- //P1 connector Left side (top view)
- PC_13, //D26
- PC_14, //D27
- PC_15, //D28
- PF_0, //D29
- PF_1, //D30
- PC_0, //D31
- PC_1, //D32
- PC_2, //D33
- PC_3, //D34
- PA_0, //D35
- PA_1, //D36
-#ifdef TSC_REMOVED
- PA_2, //D37
- PA_3, //D38
-#else
- NC,
- NC,
-#endif
- PA_4, //D39
- PA_5, //D40
-#ifdef TSC_REMOVED
- PA_6, //D41
- PA_7, //D42
-#else
- NC,
- NC,
-#endif
- PC_4, //D43
- PC_5, //D44
-#ifdef TSC_REMOVED
- PB_0, //D45
- PB_1, //D46
-#else
- NC,
- NC,
-#endif
- PB_2, //D47
- PB_10, //D48
- PB_11, //D49
- PB_12, //D50
-};
-
-// Analog (Ax) pin number array
-const uint32_t analogInputPin[] = {
- 31, // A0
- 32, // A1
- 33, // A2
- 34, // A3
- 35, // A4
- 36, // A5
- 37, // A6
- 38, // A7
- 39, // A8
- 40, // A9
- 41, // A10
- 42, // A11
- 43, // A12
- 44, // A13
- 45, // A14
- 46 // A15
-};
-
-#ifdef __cplusplus
-}
-#endif
-
-// ----------------------------------------------------------------------------
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * @brief System Clock Configuration
- * @param None
- * @retval None
- */
-WEAK void SystemClock_Config(void)
-{
- RCC_OscInitTypeDef RCC_OscInitStruct;
- RCC_ClkInitTypeDef RCC_ClkInitStruct;
- RCC_PeriphCLKInitTypeDef PeriphClkInit;
-
- /* Initializes the CPU, AHB and APB busses clocks */
- RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI | RCC_OSCILLATORTYPE_HSI48;
- RCC_OscInitStruct.HSIState = RCC_HSI_ON;
- RCC_OscInitStruct.HSI48State = RCC_HSI48_ON;
- RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
- RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
- RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
- RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL6;
- RCC_OscInitStruct.PLL.PREDIV = RCC_PREDIV_DIV1;
- if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) {
- Error_Handler();
- }
- /* Initializes the CPU, AHB and APB busses clocks */
- RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK
- | RCC_CLOCKTYPE_PCLK1;
- RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
- RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
- RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
-
- if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1) != HAL_OK) {
- Error_Handler();
- }
- PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_USB;
- PeriphClkInit.UsbClockSelection = RCC_USBCLKSOURCE_HSI48;
-
- if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) != HAL_OK) {
- Error_Handler();
- }
-}
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/variants/STM32F0xx/DISCO_F072RB/variant_DISCO_F072RB.h b/variants/STM32F0xx/DISCO_F072RB/variant_DISCO_F072RB.h
deleted file mode 100644
index 0af66f957b..0000000000
--- a/variants/STM32F0xx/DISCO_F072RB/variant_DISCO_F072RB.h
+++ /dev/null
@@ -1,179 +0,0 @@
-/*
- *******************************************************************************
- * Copyright (c) 2018, STMicroelectronics
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * 3. Neither the name of STMicroelectronics nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *******************************************************************************
- */
-
-#ifndef _VARIANT_ARDUINO_STM32_
-#define _VARIANT_ARDUINO_STM32_
-
-#ifdef __cplusplus
-extern "C" {
-#endif // __cplusplus
-
-/*----------------------------------------------------------------------------
- * Pins
- *----------------------------------------------------------------------------*/
-
-// USB USER CN2
-// By default, SB20,23 (USB-USER) are OFF.
-// So PA11,12 are not available.
-// If ON and R12,13 removed,
-// #define USB_REMOVED
-// to get PA11,12 available.
-
-// Linear touch sensor
-// By default, SB27,28,29,30,31,32 (touch sensor) are OFF.
-// So PA2,3,6,7 and PB0,1 are not available.
-// If ON and R38,39,40 and C26,27,28 are removed,
-// #define TSC_REMOVED
-// to get PA2,3,6,7 and PB0,1 available.
-
-// P2 connector Right side (top view)
-#define PB9 0
-#define PB8 1
-#define PB7 2
-#define PB6 3
-#define PB5 4
-#define PB4 5
-#define PB3 6
-#define PD2 7
-#define PC12 8
-#define PC11 9
-#define PC10 10
-#define PA15 11
-#define PA14 12
-#define PA13 13
-#define PA12 14 // SB20 (default OFF): USB_DP
-#define PA11 15 // SB23 (default OFF): USB_DM
-#define PA10 16
-#define PA9 17
-#define PA8 18
-#define PC9 19 // LED_GREEN (LD4)
-#define PC8 20 // LED_ORANGE (LD3)
-#define PC7 21 // LED_BLUE (LD6)
-#define PC6 22 // LED_RED (LD5)
-#define PB15 23 // SPI2_MOSI (L3GD20)
-#define PB14 24 // SPI2_MISO (L3GD20)
-#define PB13 25 // SPI2_SCK (L3GD20)
-// P1 connector Left side (top view)
-#define PC13 26
-#define PC14 27
-#define PC15 28
-#define PF0 29
-#define PF1 30
-#define PC0 A0 // NCS_MEMS_SPI (L3GD20)
-#define PC1 A1 // MEMS INT1 (L3GD20)
-#define PC2 A2 // MEMS INT2 (L3GD20)
-#define PC3 A3
-#define PA0 A4 // USER_BTN
-#define PA1 A5
-#define PA2 A6 // SB27 (default OFF): TS_G1_IO3
-#define PA3 A7 // SB28 (default OFF): TS_G1_IO4
-#define PA4 A8
-#define PA5 A9
-#define PA6 A10 // SB29 (default OFF): TS_G2_IO3
-#define PA7 A11 // SB30 (default OFF): TS_G2_IO4
-#define PC4 A12
-#define PC5 A13 // Ext Reset
-#define PB0 A14 // SB31 (default OFF): TS_G3_IO2
-#define PB1 A15 // SB32 (default OFF): TS_G3_IO3
-#define PB2 47
-#define PB10 48 // I2C2 SCL: Extension / RF EEprom Connector
-#define PB11 49 // I2C2 SDA: Extension / RF EEprom Connector
-#define PB12 50
-
-// This must be a literal
-#define NUM_DIGITAL_PINS 51
-// This must be a literal with a value less than or equal to to MAX_ANALOG_INPUTS
-#define NUM_ANALOG_INPUTS 16
-
-//On-board LED pin number
-#define LED_BUILTIN PC9
-#define LED_GREEN LED_BUILTIN
-#define LED_ORANGE PC8
-#define LED_BLUE PC7
-#define LED_RED PC6
-
-//On-board user button
-#define USER_BTN PA0
-
-// SPI definitions
-// SPI1 is used
-#define PIN_SPI_SS PA4
-#define PIN_SPI_SS1 PC4
-#define PIN_SPI_SS2 PB12
-#define PIN_SPI_SS3 PB6
-#define PIN_SPI_MOSI PB5
-#define PIN_SPI_MISO PB4
-#define PIN_SPI_SCK PB3
-
-// I2C Definitions
-// I2C1 is used
-#define PIN_WIRE_SDA PB9
-#define PIN_WIRE_SCL PB8
-
-// Timer Definitions
-// Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin
-#define TIMER_TONE TIM6
-#define TIMER_SERVO TIM7
-
-// UART Definitions
-#define SERIAL_UART_INSTANCE 1 // USART 1
-
-// Mandatory for Firmata
-#define PIN_SERIAL_RX PA10
-#define PIN_SERIAL_TX PA9
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-/*----------------------------------------------------------------------------
- * Arduino objects - C++ only
- *----------------------------------------------------------------------------*/
-
-#ifdef __cplusplus
- // These serial port names are intended to allow libraries and architecture-neutral
- // sketches to automatically default to the correct port name for a particular type
- // of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
- // the first hardware serial port whose RX/TX pins are not dedicated to another use.
- //
- // SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
- //
- // SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
- //
- // SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
- //
- // SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
- //
- // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
- // pins are NOT connected to anything by default.
- #define SERIAL_PORT_MONITOR Serial
- #define SERIAL_PORT_HARDWARE Serial
-#endif
-
-#endif /* _VARIANT_ARDUINO_STM32_ */
diff --git a/variants/STM32F0xx/EEXTR_F030_V1/PeripheralPins.c b/variants/STM32F0xx/EEXTR_F030_V1/PeripheralPins.c
deleted file mode 100644
index 4600812d13..0000000000
--- a/variants/STM32F0xx/EEXTR_F030_V1/PeripheralPins.c
+++ /dev/null
@@ -1,202 +0,0 @@
-/*
- *******************************************************************************
- * Copyright (c) 2018, STMicroelectronics
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * 3. Neither the name of STMicroelectronics nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *******************************************************************************
- * Automatically generated from STM32F030C8Tx.xml
- */
-#include "Arduino.h"
-#include "PeripheralPins.h"
-
-/* =====
- * Note: Commented lines are alternative possibilities which are not used per default.
- * If you change them, you will have to know what you do
- * =====
- */
-
-//*** ADC ***
-
-#ifdef HAL_ADC_MODULE_ENABLED
-WEAK const PinMap PinMap_ADC[] = {
- {PA_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC_IN0
- {PA_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC_IN1
- {PA_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC_IN2
- // {PA_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC_IN3 - TC1_CS
- // {PA_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC_IN4 - TC2_CS
- // {PA_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC_IN5 - SPI
- // {PA_6, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC_IN6 - SPI
- // {PA_7, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC_IN7 - SPI
- // {PB_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC_IN8 - PWM0
- // {PB_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC_IN9 - PWM0
- // {NC, NP, 0}
-};
-#endif
-
-//*** No DAC ***
-
-//*** I2C ***
-
-#ifdef HAL_I2C_MODULE_ENABLED
-WEAK const PinMap PinMap_I2C_SDA[] = {
- {PB_7, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
- {PB_9, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
- // {PB_11, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C2)}, // E0_CTL
- {PF_7, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C2)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_I2C_MODULE_ENABLED
-WEAK const PinMap PinMap_I2C_SCL[] = {
- {PB_6, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
- {PB_8, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
- // {PB_10, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C2)}, // E1_FAN
- {PF_6, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C2)},
- {NC, NP, 0}
-};
-#endif
-
-//*** PWM ***
-
-#ifdef HAL_TIM_MODULE_ENABLED
-WEAK const PinMap PinMap_PWM[] = {
- {PA_2, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM15, 1, 0)}, // TIM15_CH1
- // {PA_3, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM15, 2, 0)}, // TIM15_CH2 - TC1_CS
- // {PA_4, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM14, 1, 0)}, // TIM14_CH1 - TC2_CS
- // {PA_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 1, 0)}, // TIM3_CH1 - SPI
- // {PA_6, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM16, 1, 0)}, // TIM16_CH1 - SPI
- // {PA_7, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 1, 1)}, // TIM1_CH1N - SPI
- // {PA_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 2, 0)}, // TIM3_CH2 - SPI
- // {PA_7, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM14, 1, 0)}, // TIM14_CH1 - SPI
- // {PA_7, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM17, 1, 0)}, // TIM17_CH1 - SPI
- {PA_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 1, 0)}, // TIM1_CH1
- // {PA_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 2, 0)}, // TIM1_CH2 - UART1
- // {PA_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 3, 0)}, // TIM1_CH3 - UART1
- {PA_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 4, 0)}, // TIM1_CH4
- // {PB_0, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 2, 1)}, // TIM1_CH2N
- {PB_0, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 3, 0)}, // TIM3_CH3
- // {PB_1, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 3, 1)}, // TIM1_CH3N
- {PB_1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 4, 0)}, // TIM3_CH4
- // {PB_1, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM14, 1, 0)}, // TIM14_CH1
- {PB_4, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 1, 0)}, // TIM3_CH1
- {PB_5, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 2, 0)}, // TIM3_CH2
- // {PB_6, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM16, 1, 1)}, // TIM16_CH1N - I2C
- // {PB_7, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM17, 1, 1)}, // TIM17_CH1N - I2C
- {PB_8, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM16, 1, 0)}, // TIM16_CH1
- {PB_9, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM17, 1, 0)}, // TIM17_CH1
- {PB_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 1, 1)}, // TIM1_CH1N
- // {PB_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 2, 1)}, // TIM1_CH2N
- {PB_14, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM15, 1, 0)}, // TIM15_CH1
- // {PB_15, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 3, 1)}, // TIM1_CH3N
- // {PB_15, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM15, 1, 1)}, // TIM15_CH1N
- {PB_15, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM15, 2, 0)}, // TIM15_CH2
- {NC, NP, 0}
-};
-#endif
-
-//*** SERIAL ***
-
-#ifdef HAL_UART_MODULE_ENABLED
-WEAK const PinMap PinMap_UART_TX[] = {
- // {PA_2, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)}, // ADC
- {PA_9, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
- {PA_14, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
- // {PB_6, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART1)}, // I2C
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_UART_MODULE_ENABLED
-WEAK const PinMap PinMap_UART_RX[] = {
- // {PA_3, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)}, // TC2_CS
- {PA_10, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
- {PA_15, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
- // {PB_7, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART1)}, // I2C
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_UART_MODULE_ENABLED
-WEAK const PinMap PinMap_UART_RTS[] = {
- // {PA_1, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)}, // ADC
- {PA_12, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_UART_MODULE_ENABLED
-WEAK const PinMap PinMap_UART_CTS[] = {
- // {PA_0, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)}, // ADC
- {PA_11, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
- {NC, NP, 0}
-};
-#endif
-
-//*** SPI ***
-
-#ifdef HAL_SPI_MODULE_ENABLED
-WEAK const PinMap PinMap_SPI_MOSI[] = {
- {PA_7, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PB_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PB_15, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_SPI_MODULE_ENABLED
-WEAK const PinMap PinMap_SPI_MISO[] = {
- {PA_6, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PB_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PB_14, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_SPI_MODULE_ENABLED
-WEAK const PinMap PinMap_SPI_SCLK[] = {
- {PA_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PB_3, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PB_13, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_SPI_MODULE_ENABLED
-WEAK const PinMap PinMap_SPI_SSEL[] = {
- // {PA_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)}, // TC2_CS
- {PA_15, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- // {PB_12, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)}, // E1_CTL
- {NC, NP, 0}
-};
-#endif
-
-//*** No CAN ***
-
-//*** No ETHERNET ***
-
-//*** No QUADSPI ***
-
-//*** No USB ***
diff --git a/variants/STM32F0xx/EEXTR_F030_V1/PinNamesVar.h b/variants/STM32F0xx/EEXTR_F030_V1/PinNamesVar.h
deleted file mode 100644
index 9ef092a0e5..0000000000
--- a/variants/STM32F0xx/EEXTR_F030_V1/PinNamesVar.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/* SYS_WKUP */
-#ifdef PWR_WAKEUP_PIN1
- SYS_WKUP1 = NC,
-#endif
-#ifdef PWR_WAKEUP_PIN2
- SYS_WKUP2 = PC_13,
-#endif
-#ifdef PWR_WAKEUP_PIN3
- SYS_WKUP3 = NC,
-#endif
-#ifdef PWR_WAKEUP_PIN4
- SYS_WKUP4 = NC,
-#endif
-#ifdef PWR_WAKEUP_PIN5
- SYS_WKUP5 = NC,
-#endif
-#ifdef PWR_WAKEUP_PIN6
- SYS_WKUP6 = NC,
-#endif
-#ifdef PWR_WAKEUP_PIN7
- SYS_WKUP7 = NC,
-#endif
-#ifdef PWR_WAKEUP_PIN8
- SYS_WKUP8 = NC,
-#endif
diff --git a/variants/STM32F0xx/EEXTR_F030_V1/ldscript.ld b/variants/STM32F0xx/EEXTR_F030_V1/ldscript.ld
deleted file mode 100644
index 79fc5de456..0000000000
--- a/variants/STM32F0xx/EEXTR_F030_V1/ldscript.ld
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
-*****************************************************************************
-**
-
-** File : LinkerScript.ld
-**
-** Abstract : Linker script for STM32F030C8Tx Device with
-** 64KByte FLASH, 8KByte RAM
-**
-** Set heap size, stack size and stack location according
-** to application requirements.
-**
-** Set memory bank area and size if external memory is used.
-**
-** Target : STMicroelectronics STM32
-**
-**
-** Distribution: The file is distributed as is, without any warranty
-** of any kind.
-**
-*****************************************************************************
-** @attention
-**
-** © COPYRIGHT(c) 2014 Ac6
-**
-** Redistribution and use in source and binary forms, with or without modification,
-** are permitted provided that the following conditions are met:
-** 1. Redistributions of source code must retain the above copyright notice,
-** this list of conditions and the following disclaimer.
-** 2. Redistributions in binary form must reproduce the above copyright notice,
-** this list of conditions and the following disclaimer in the documentation
-** and/or other materials provided with the distribution.
-** 3. Neither the name of Ac6 nor the names of its contributors
-** may be used to endorse or promote products derived from this software
-** without specific prior written permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-** SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-**
-*****************************************************************************
-*/
-
-/* Entry Point */
-ENTRY(Reset_Handler)
-
-/* Highest address of the user mode stack */
-_estack = 0x20002000; /* end of RAM */
-/* Generate a link error if heap and stack don't fit into RAM */
-_Min_Heap_Size = 0x200; /* required amount of heap */
-_Min_Stack_Size = 0x400; /* required amount of stack */
-
-/* Specify the memory areas */
-MEMORY
-{
-RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 8K
-FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 64K
-}
-
-/* Define output sections */
-SECTIONS
-{
- /* The startup code goes first into FLASH */
- .isr_vector :
- {
- . = ALIGN(4);
- KEEP(*(.isr_vector)) /* Startup code */
- . = ALIGN(4);
- } >FLASH
-
- /* The program code and other data goes into FLASH */
- .text ALIGN(4):
- {
- . = ALIGN(4);
- *(.text) /* .text sections (code) */
- *(.text*) /* .text* sections (code) */
- *(.glue_7) /* glue arm to thumb code */
- *(.glue_7t) /* glue thumb to arm code */
- *(.eh_frame)
-
- KEEP (*(.init))
- KEEP (*(.fini))
-
- . = ALIGN(4);
- _etext = .; /* define a global symbols at end of code */
- } >FLASH
-
- /* Constant data goes into FLASH */
- .rodata :
- {
- . = ALIGN(4);
- *(.rodata) /* .rodata sections (constants, strings, etc.) */
- *(.rodata*) /* .rodata* sections (constants, strings, etc.) */
- . = ALIGN(4);
- } >FLASH
-
- .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >FLASH
- .ARM : {
- __exidx_start = .;
- *(.ARM.exidx*)
- __exidx_end = .;
- } >FLASH
-
- .preinit_array :
- {
- PROVIDE_HIDDEN (__preinit_array_start = .);
- KEEP (*(.preinit_array*))
- PROVIDE_HIDDEN (__preinit_array_end = .);
- } >FLASH
- .init_array :
- {
- PROVIDE_HIDDEN (__init_array_start = .);
- KEEP (*(SORT(.init_array.*)))
- KEEP (*(.init_array*))
- PROVIDE_HIDDEN (__init_array_end = .);
- } >FLASH
- .fini_array :
- {
- PROVIDE_HIDDEN (__fini_array_start = .);
- KEEP (*(SORT(.fini_array.*)))
- KEEP (*(.fini_array*))
- PROVIDE_HIDDEN (__fini_array_end = .);
- } >FLASH
-
- /* used by the startup to initialize data */
- _sidata = LOADADDR(.data);
-
- /* Initialized data sections goes into RAM, load LMA copy after code */
- .data :
- {
- . = ALIGN(4);
- _sdata = .; /* create a global symbol at data start */
- *(.data) /* .data sections */
- *(.data*) /* .data* sections */
-
- . = ALIGN(4);
- _edata = .; /* define a global symbol at data end */
- } >RAM AT> FLASH
-
-
- /* Uninitialized data section */
- . = ALIGN(4);
- .bss :
- {
- /* This is used by the startup in order to initialize the .bss secion */
- _sbss = .; /* define a global symbol at bss start */
- __bss_start__ = _sbss;
- *(.bss)
- *(.bss*)
- *(COMMON)
-
- . = ALIGN(4);
- _ebss = .; /* define a global symbol at bss end */
- __bss_end__ = _ebss;
- } >RAM
-
- /* User_heap_stack section, used to check that there is enough RAM left */
- ._user_heap_stack :
- {
- . = ALIGN(8);
- PROVIDE ( end = . );
- PROVIDE ( _end = . );
- . = . + _Min_Heap_Size;
- . = . + _Min_Stack_Size;
- . = ALIGN(8);
- } >RAM
-
-
-
- /* Remove information from the standard libraries */
- /DISCARD/ :
- {
- libc.a ( * )
- libm.a ( * )
- libgcc.a ( * )
- }
-
- .ARM.attributes 0 : { *(.ARM.attributes) }
-}
diff --git a/variants/STM32F0xx/EEXTR_F030_V1/variant_EEXTR_F030_V1.h b/variants/STM32F0xx/EEXTR_F030_V1/variant_EEXTR_F030_V1.h
deleted file mode 100644
index b89b55db9c..0000000000
--- a/variants/STM32F0xx/EEXTR_F030_V1/variant_EEXTR_F030_V1.h
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- *******************************************************************************
- * Copyright (c) 2018, STMicroelectronics
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * 3. Neither the name of STMicroelectronics nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *******************************************************************************
- */
-
-#ifndef _VARIANT_ARDUINO_STM32_
-#define _VARIANT_ARDUINO_STM32_
-
-#ifdef __cplusplus
-extern "C" {
-#endif // __cplusplus
-
-/*----------------------------------------------------------------------------
- * Pins
- *----------------------------------------------------------------------------*/
-
-// P1 connector Right side (bottom view)
-#define PC13 0
-#define PC14 1
-#define PC15 2
-#define PF0 3
-#define PF1 4
-#define PA0 A0
-#define PA1 A1
-#define PA2 A2
-#define PA3 8
-#define PA4 9
-#define PA5 10
-#define PA6 11
-#define PA7 12
-#define PB0 13
-#define PB1 14
-#define PB2 15
-#define PB10 16
-#define PB11 17
-#define PB12 18
-#define PB13 19
-#define PB14 20
-#define PB15 21
-#define PA8 22
-#define PA9 23
-#define PA10 24
-#define PA11 25
-#define PA12 26
-#define PA13 27
-#define PF6 28
-#define PF7 29
-#define PA14 30
-#define PA15 31
-#define PB3 32
-#define PB4 33
-#define PB5 34
-#define PB6 35
-#define PB7 36
-#define PB8 37
-#define PB9 38
-
-// This must be a literal
-#define NUM_DIGITAL_PINS 39
-// This must be a literal with a value less than or equal to to MAX_ANALOG_INPUTS
-#define NUM_ANALOG_INPUTS 3
-
-// SPI definitions
-// SPI1 is used
-#define PIN_SPI_SS NC
-#define PIN_SPI_MOSI PA7
-#define PIN_SPI_MISO PA6
-#define PIN_SPI_SCK PA5
-
-// I2C Definitions
-// I2C1 is used
-#define PIN_WIRE_SDA PB7
-#define PIN_WIRE_SCL PB6
-
-// Timer Definitions
-// Use TIM6 when possible as servo and tone don't need GPIO output pin
-#define TIMER_TONE TIM6
-#define TIMER_SERVO TIM14
-
-// UART Definitions
-#define SERIAL_UART_INSTANCE 1 // USART 1
-
-// Mandatory for Firmata
-#define PIN_SERIAL_RX PA10
-#define PIN_SERIAL_TX PA9
-
-#define HSE_VALUE 16000000U /*!< Value of the External oscillator in Hz */
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-/*----------------------------------------------------------------------------
- * Arduino objects - C++ only
- *----------------------------------------------------------------------------*/
-
-#ifdef __cplusplus
- // These serial port names are intended to allow libraries and architecture-neutral
- // sketches to automatically default to the correct port name for a particular type
- // of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
- // the first hardware serial port whose RX/TX pins are not dedicated to another use.
- //
- // SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
- //
- // SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
- //
- // SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
- //
- // SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
- //
- // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
- // pins are NOT connected to anything by default.
- #define SERIAL_PORT_MONITOR Serial
- #define SERIAL_PORT_HARDWARE Serial
-#endif
-
-#endif /* _VARIANT_ARDUINO_STM32_ */
diff --git a/variants/STM32F0xx/ELEKTOR_F072Cx/PeripheralPins.c b/variants/STM32F0xx/ELEKTOR_F072Cx/PeripheralPins.c
deleted file mode 100644
index 9cab18e164..0000000000
--- a/variants/STM32F0xx/ELEKTOR_F072Cx/PeripheralPins.c
+++ /dev/null
@@ -1,246 +0,0 @@
-/*
- *******************************************************************************
- * Copyright (c) 2019, STMicroelectronics
- * All rights reserved.
- *
- * This software component is licensed by ST under BSD 3-Clause license,
- * the "License"; You may not use this file except in compliance with the
- * License. You may obtain a copy of the License at:
- * opensource.org/licenses/BSD-3-Clause
- *
- *******************************************************************************
- * Automatically generated from STM32F072C(8-B)Tx.xml
- */
-#include "Arduino.h"
-#include "PeripheralPins.h"
-
-/* =====
- * Note: Commented lines are alternative possibilities which are not used per default.
- * If you change them, you will have to know what you do
- * =====
- */
-
-//*** ADC ***
-
-#ifdef HAL_ADC_MODULE_ENABLED
-WEAK const PinMap PinMap_ADC[] = {
- {PA_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC_IN0
- {PA_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC_IN1
- {PA_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC_IN2
- {PA_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC_IN3
- {PA_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC_IN4
- {PA_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC_IN5
- {PA_6, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC_IN6
- {PA_7, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC_IN7
- {PB_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC_IN8
- {PB_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC_IN9
- {NC, NP, 0}
-};
-#endif
-
-//*** DAC ***
-
-#ifdef HAL_DAC_MODULE_ENABLED
-WEAK const PinMap PinMap_DAC[] = {
- {PA_4, DAC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // DAC_OUT1
- {PA_5, DAC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // DAC_OUT2
- {NC, NP, 0}
-};
-#endif
-
-//*** I2C ***
-
-#ifdef HAL_I2C_MODULE_ENABLED
-WEAK const PinMap PinMap_I2C_SDA[] = {
- {PB_7, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
- {PB_9, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
- {PB_11, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C2)},
- {PB_14, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF5_I2C2)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_I2C_MODULE_ENABLED
-WEAK const PinMap PinMap_I2C_SCL[] = {
- {PB_6, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
- {PB_8, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
- {PB_10, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C2)},
- {PB_13, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF5_I2C2)},
- {NC, NP, 0}
-};
-#endif
-
-//*** PWM ***
-
-#ifdef HAL_TIM_MODULE_ENABLED
-WEAK const PinMap PinMap_PWM[] = {
- {PA_0, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 1, 0)}, // TIM2_CH1
- {PA_1, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 2, 0)}, // TIM2_CH2
- // {PA_1, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM15, 1, 1)}, // TIM15_CH1N
- {PA_2, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 3, 0)}, // TIM2_CH3
- // {PA_2, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM15, 1, 0)}, // TIM15_CH1
- {PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 4, 0)}, // TIM2_CH4
- // {PA_3, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM15, 2, 0)}, // TIM15_CH2
- {PA_4, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM14, 1, 0)}, // TIM14_CH1
- {PA_5, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 1, 0)}, // TIM2_CH1
- {PA_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 1, 0)}, // TIM3_CH1
- // {PA_6, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM16, 1, 0)}, // TIM16_CH1
- {PA_7, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 1, 1)}, // TIM1_CH1N
- // {PA_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 2, 0)}, // TIM3_CH2
- // {PA_7, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM14, 1, 0)}, // TIM14_CH1
- // {PA_7, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM17, 1, 0)}, // TIM17_CH1
- {PA_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 1, 0)}, // TIM1_CH1
- {PA_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 2, 0)}, // TIM1_CH2
- {PA_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 3, 0)}, // TIM1_CH3
- {PA_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 4, 0)}, // TIM1_CH4
- {PA_15, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 1, 0)}, // TIM2_CH1
- {PB_0, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 2, 1)}, // TIM1_CH2N
- // {PB_0, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 3, 0)}, // TIM3_CH3
- {PB_1, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 3, 1)}, // TIM1_CH3N
- // {PB_1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 4, 0)}, // TIM3_CH4
- // {PB_1, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM14, 1, 0)}, // TIM14_CH1
- {PB_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 2, 0)}, // TIM2_CH2
- {PB_4, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 1, 0)}, // TIM3_CH1
- {PB_5, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 2, 0)}, // TIM3_CH2
- {PB_6, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM16, 1, 1)}, // TIM16_CH1N
- {PB_7, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM17, 1, 1)}, // TIM17_CH1N
- {PB_8, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM16, 1, 0)}, // TIM16_CH1
- {PB_9, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM17, 1, 0)}, // TIM17_CH1
- {PB_10, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 3, 0)}, // TIM2_CH3
- {PB_11, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 4, 0)}, // TIM2_CH4
- {PB_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 1, 1)}, // TIM1_CH1N
- {PB_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 2, 1)}, // TIM1_CH2N
- // {PB_14, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM15, 1, 0)}, // TIM15_CH1
- {PB_15, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 3, 1)}, // TIM1_CH3N
- // {PB_15, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM15, 1, 1)}, // TIM15_CH1N
- // {PB_15, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM15, 2, 0)}, // TIM15_CH2
- {NC, NP, 0}
-};
-#endif
-
-//*** SERIAL ***
-
-#ifdef HAL_UART_MODULE_ENABLED
-WEAK const PinMap PinMap_UART_TX[] = {
- {PA_0, USART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART4)},
- {PA_2, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
- {PA_9, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
- {PA_14, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
- {PB_6, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART1)},
- {PB_10, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_UART_MODULE_ENABLED
-WEAK const PinMap PinMap_UART_RX[] = {
- {PA_1, USART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART4)},
- {PA_3, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
- {PA_10, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
- {PA_15, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
- {PB_7, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART1)},
- {PB_11, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_UART_MODULE_ENABLED
-WEAK const PinMap PinMap_UART_RTS[] = {
- {PA_1, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
- {PA_12, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
- {PA_15, USART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART4)},
- {PB_1, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
- {PB_14, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_UART_MODULE_ENABLED
-WEAK const PinMap PinMap_UART_CTS[] = {
- {PA_0, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
- {PA_6, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
- {PA_11, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
- {PB_7, USART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART4)},
- {PB_13, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
- {NC, NP, 0}
-};
-#endif
-
-//*** SPI ***
-
-#ifdef HAL_SPI_MODULE_ENABLED
-WEAK const PinMap PinMap_SPI_MOSI[] = {
- {PA_7, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PB_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PB_15, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_SPI_MODULE_ENABLED
-WEAK const PinMap PinMap_SPI_MISO[] = {
- {PA_6, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PB_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PB_14, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_SPI_MODULE_ENABLED
-WEAK const PinMap PinMap_SPI_SCLK[] = {
- {PA_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PB_3, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PB_10, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)},
- {PB_13, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_SPI_MODULE_ENABLED
-WEAK const PinMap PinMap_SPI_SSEL[] = {
- {PA_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PA_15, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PB_9, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)},
- {PB_12, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
- {NC, NP, 0}
-};
-#endif
-
-//*** CAN ***
-
-#ifdef HAL_CAN_MODULE_ENABLED
-WEAK const PinMap PinMap_CAN_RD[] = {
- {PA_11, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF4_CAN)},
- {PB_8, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF4_CAN)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_CAN_MODULE_ENABLED
-WEAK const PinMap PinMap_CAN_TD[] = {
- {PA_12, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF4_CAN)},
- {PB_9, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF4_CAN)},
- {NC, NP, 0}
-};
-#endif
-
-//*** No ETHERNET ***
-
-//*** No QUADSPI ***
-
-//*** USB ***
-
-#ifdef HAL_PCD_MODULE_ENABLED
-WEAK const PinMap PinMap_USB[] = {
- {PA_11, USB, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_DM
- {PA_12, USB, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_DP
- // {PA_13, USB, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_USB)}, // USB_NOE
- {NC, NP, 0}
-};
-#endif
-
-//*** No USB_OTG_FS ***
-
-//*** No USB_OTG_HS ***
-
-//*** No SD ***
diff --git a/variants/STM32F0xx/ELEKTOR_F072Cx/PinNamesVar.h b/variants/STM32F0xx/ELEKTOR_F072Cx/PinNamesVar.h
deleted file mode 100644
index 9906c8e95b..0000000000
--- a/variants/STM32F0xx/ELEKTOR_F072Cx/PinNamesVar.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* SYS_WKUP */
-#ifdef PWR_WAKEUP_PIN1
- SYS_WKUP1 = PA_0,
-#endif
-#ifdef PWR_WAKEUP_PIN2
- SYS_WKUP2 = PC_13,
-#endif
-#ifdef PWR_WAKEUP_PIN3
- SYS_WKUP3 = PE_6, /* Not available in LQFP48 */
-#endif
-#ifdef PWR_WAKEUP_PIN4
- SYS_WKUP4 = PA_2,
-#endif
-#ifdef PWR_WAKEUP_PIN5
- SYS_WKUP5 = PC_5, /* Not available in LQFP48 */
-#endif
-#ifdef PWR_WAKEUP_PIN6
- SYS_WKUP6 = PB_5,
-#endif
-#ifdef PWR_WAKEUP_PIN7
- SYS_WKUP7 = PB_15,
-#endif
-#ifdef PWR_WAKEUP_PIN8
- SYS_WKUP8 = PF_2, /* Not available in LQFP48 */
-#endif
-/* USB */
-#ifdef USBCON
- USB_DM = PA_11,
- USB_DP = PA_12,
- USB_NOE = PA_13,
-#endif
diff --git a/variants/STM32F0xx/ELEKTOR_F072Cx/variant_ELEKTOR_F072Cx.cpp b/variants/STM32F0xx/ELEKTOR_F072Cx/variant_ELEKTOR_F072Cx.cpp
deleted file mode 100644
index c31b61bf38..0000000000
--- a/variants/STM32F0xx/ELEKTOR_F072Cx/variant_ELEKTOR_F072Cx.cpp
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- *******************************************************************************
- * Copyright (c) 2017, STMicroelectronics
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * 3. Neither the name of STMicroelectronics nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *******************************************************************************
- */
-
-#include "pins_arduino.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-// Pin number
-// This array allows to wrap Arduino pin number(Dx or x)
-// to STM32 PinName (PX_n)
-const PinName digitalPin[] = {
- PA_8, //D0
- PA_9, //D1
- PA_10, //D2
- PA_11, //D3
- PA_12, //D4
- PA_13, //D5
- PA_14, //D6
- PA_15, //D7
- PB_2, //D8
- PB_3, //D9
- PB_4, //D10
- PB_5, //D11
- PB_6, //D12
- PB_7, //D13
- PB_8, //D14
- PB_9, //D15
- PB_10, //D16
- PB_11, //D17
- PB_12, //D18
- PB_13, //D19
- PB_14, //D20
- PB_15, //D21
- PC_13, //D24
- PC_14, //D25
- PC_15, //D26
- //Analog Pins
- PA_0, //D27, A0
- PA_1, //D28, A1
- PA_2, //D29, A2
- PA_3, //D30, A3
- PA_4, //D31, A4
- PA_5, //D32, A5
- PA_6, //D33, A6
- PA_7, //D34, A7
- PB_0, //D35, A8
- PB_1, //D36, A9
- PF_0, //D37
- PF_1 //D38
-};
-
-// Analog (Ax) pin number array
-const uint32_t analogInputPin[] = {
- 25, // A0
- 26, // A1
- 27, // A2
- 28, // A3
- 29, // A4
- 30, // A5
- 31, // A6
- 32, // A7
- 33, // A8
- 34 // A9
-};
-
-#ifdef __cplusplus
-}
-#endif
-
-// ----------------------------------------------------------------------------
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * @brief System Clock Configuration
- * @param None
- * @retval None
- */
-WEAK void SystemClock_Config(void)
-{
- RCC_OscInitTypeDef RCC_OscInitStruct = {};
- RCC_ClkInitTypeDef RCC_ClkInitStruct = {};
-
- /* Initializes the CPU, AHB and APB busses clocks */
- RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
- RCC_OscInitStruct.HSIState = RCC_HSI_ON;
- RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
- RCC_OscInitStruct.PLL.PLLState = RCC_PLL_NONE;
- if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) {
- Error_Handler();
- }
- /* Initializes the CPU, AHB and APB busses clocks */
- RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK
- | RCC_CLOCKTYPE_PCLK1;
- RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_HSI;
- RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
- RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
-
- if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_0) != HAL_OK) {
- Error_Handler();
- }
-}
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/variants/STM32F0xx/ELEKTOR_F072Cx/variant_ELEKTOR_F072Cx.h b/variants/STM32F0xx/ELEKTOR_F072Cx/variant_ELEKTOR_F072Cx.h
deleted file mode 100644
index cbc3c00b55..0000000000
--- a/variants/STM32F0xx/ELEKTOR_F072Cx/variant_ELEKTOR_F072Cx.h
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- *******************************************************************************
- * Copyright (c) 2017, STMicroelectronics
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * 3. Neither the name of STMicroelectronics nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *******************************************************************************
- */
-
-#ifndef _VARIANT_ARDUINO_STM32_
-#define _VARIANT_ARDUINO_STM32_
-
-#ifdef __cplusplus
-extern "C" {
-#endif // __cplusplus
-
-/*----------------------------------------------------------------------------
- * Pins
- *----------------------------------------------------------------------------*/
-
-#define PA8 0
-#define PA9 1
-#define PA10 2
-#define PA11 3
-#define PA12 4
-#define PA13 5
-#define PA14 6
-#define PA15 7
-#define PB2 8
-#define PB3 9
-#define PB4 10
-#define PB5 11
-#define PB6 12
-#define PB7 13
-#define PB8 14
-#define PB9 15
-#define PB10 16
-#define PB11 17
-#define PB12 18
-#define PB13 19
-#define PB14 20
-#define PB15 21
-#define PC13 22
-#define PC14 23
-#define PC15 24
-#define PA0 A0
-#define PA1 A1
-#define PA2 A2
-#define PA3 A3
-#define PA4 A4
-#define PA5 A5
-#define PA6 A6
-#define PA7 A7
-#define PB0 A8
-#define PB1 A9
-#define PF0 35
-#define PF1 36
-
-// This must be a literal
-#define NUM_DIGITAL_PINS 37
-#define NUM_ANALOG_INPUTS 10
-
-// On-board LED pin number
-#define LED_BUILTIN PA15
-#define LED_RED LED_BUILTIN
-#define LED_GREEN PB3
-
-// SPI Definitions
-#define PIN_SPI_SS PA4
-#define PIN_SPI_MOSI PA7
-#define PIN_SPI_MISO PA6
-#define PIN_SPI_SCK PA5
-
-// I2C Definitions
-#define PIN_WIRE_SDA PB7
-#define PIN_WIRE_SCL PB6
-
-// Timer Definitions
-#define TIMER_TONE TIM3
-#define TIMER_SERVO TIM2
-
-// UART Definitions
-// Define here Serial instance number to map on Serial generic name
-#define SERIAL_UART_INSTANCE 1
-
-// Default pin used for 'Serial' instance
-// Mandatory for Firmata
-#define PIN_SERIAL_RX PA10
-#define PIN_SERIAL_TX PA9
-
-//Used for the GPS Module
-#define PIN_SERIAL2_TX PA2
-#define PIN_SERIAL2_RX PA3
-
-// Extra HAL modules
-#define HAL_DAC_MODULE_ENABLED
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-/*----------------------------------------------------------------------------
- * Arduino objects - C++ only
- *----------------------------------------------------------------------------*/
-
-#ifdef __cplusplus
- // These serial port names are intended to allow libraries and architecture-neutral
- // sketches to automatically default to the correct port name for a particular type
- // of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
- // the first hardware serial port whose RX/TX pins are not dedicated to another use.
- //
- // SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
- //
- // SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
- //
- // SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
- //
- // SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
- //
- // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
- // pins are NOT connected to anything by default.
- #define SERIAL_PORT_MONITOR Serial
- #define SERIAL_PORT_HARDWARE Serial
-#endif
-
-#endif /* _VARIANT_ARDUINO_STM32_ */
diff --git a/variants/STM32F0xx/F030C8Tx/PeripheralPins_EEXTR_F030_V1.c b/variants/STM32F0xx/F030C8Tx/PeripheralPins_EEXTR_F030_V1.c
new file mode 100644
index 0000000000..70afeb0c53
--- /dev/null
+++ b/variants/STM32F0xx/F030C8Tx/PeripheralPins_EEXTR_F030_V1.c
@@ -0,0 +1,197 @@
+/*
+ *******************************************************************************
+ * Copyright (c) 2021, STMicroelectronics
+ * All rights reserved.
+ *
+ * This software component is licensed by ST under BSD 3-Clause license,
+ * the "License"; You may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at:
+ * opensource.org/licenses/BSD-3-Clause
+ *
+ *******************************************************************************
+ */
+/*
+ * Automatically generated from STM32F030C8Tx.xml
+ * CubeMX DB release 6.0.10
+ */
+#if defined(ARDUINO_EEXTR_F030_V1)
+#include "Arduino.h"
+#include "PeripheralPins.h"
+
+/* =====
+ * Notes:
+ * - The pins mentioned Px_y_ALTz are alternative possibilities which use other
+ * HW peripheral instances. You can use them the same way as any other "normal"
+ * pin (i.e. analogWrite(PA7_ALT1, 128);).
+ *
+ * - Commented lines are alternative possibilities which are not used per default.
+ * If you change them, you will have to know what you do
+ * =====
+ */
+
+//*** ADC ***
+
+#ifdef HAL_ADC_MODULE_ENABLED
+WEAK const PinMap PinMap_ADC[] = {
+ {PA_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC_IN0
+ {PA_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC_IN1
+ {PA_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC_IN2
+ // {PA_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC_IN3 - TC1_CS
+ // {PA_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC_IN4 - TC2_CS
+ // {PA_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC_IN5 - SPI
+ // {PA_6, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC_IN6 - SPI
+ // {PA_7, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC_IN7 - SPI
+ // {PB_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC_IN8 - PWM0
+ // {PB_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC_IN9 - PWM0
+ {NC, NP, 0}
+};
+#endif
+
+//*** No DAC ***
+
+//*** I2C ***
+
+#ifdef HAL_I2C_MODULE_ENABLED
+WEAK const PinMap PinMap_I2C_SDA[] = {
+ {PB_7, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
+ {PB_9, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
+ // {PB_11, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C2)}, // E0_CTL
+ {PF_7, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF_NONE)},
+ {NC, NP, 0}
+};
+#endif
+
+#ifdef HAL_I2C_MODULE_ENABLED
+WEAK const PinMap PinMap_I2C_SCL[] = {
+ {PB_6, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
+ {PB_8, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
+ // {PB_10, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C2)}, // E1_FAN
+ {PF_6, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF_NONE)},
+ {NC, NP, 0}
+};
+#endif
+
+//*** TIM ***
+
+#ifdef HAL_TIM_MODULE_ENABLED
+WEAK const PinMap PinMap_TIM[] = {
+ {PA_2, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM15, 1, 0)}, // TIM15_CH1
+ // {PA_3, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM15, 2, 0)}, // TIM15_CH2 - TC1_CS
+ // {PA_4, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM14, 1, 0)}, // TIM14_CH1 - TC2_CS
+ // {PA_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 1, 0)}, // TIM3_CH1 - SPI
+ // {PA_6_ALT1, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM16, 1, 0)}, // TIM16_CH1 - SPI
+ // {PA_7, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 1, 1)}, // TIM1_CH1N - SPI
+ // {PA_7_ALT1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 2, 0)}, // TIM3_CH2 - SPI
+ // {PA_7_ALT2, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM14, 1, 0)}, // TIM14_CH1 - SPI
+ // {PA_7_ALT3, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM17, 1, 0)}, // TIM17_CH1 - SPI
+ {PA_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 1, 0)}, // TIM1_CH1
+ // {PA_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 2, 0)}, // TIM1_CH2 - UART1
+ // {PA_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 3, 0)}, // TIM1_CH3 - UART1
+ {PA_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 4, 0)}, // TIM1_CH4
+ {PB_0, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 2, 1)}, // TIM1_CH2N
+ {PB_0_ALT1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 3, 0)}, // TIM3_CH3
+ {PB_1, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 3, 1)}, // TIM1_CH3N
+ {PB_1_ALT1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 4, 0)}, // TIM3_CH4
+ {PB_1_ALT2, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM14, 1, 0)}, // TIM14_CH1
+ {PB_4, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 1, 0)}, // TIM3_CH1
+ {PB_5, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 2, 0)}, // TIM3_CH2
+ // {PB_6, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM16, 1, 1)}, // TIM16_CH1N - I2C
+ // {PB_7, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM17, 1, 1)}, // TIM17_CH1N - I2C
+ {PB_8, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM16, 1, 0)}, // TIM16_CH1
+ {PB_9, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM17, 1, 0)}, // TIM17_CH1
+ {PB_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 1, 1)}, // TIM1_CH1N
+ {PB_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 2, 1)}, // TIM1_CH2N
+ {PB_14_ALT1, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM15, 1, 0)}, // TIM15_CH1
+ {PB_15, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 3, 1)}, // TIM1_CH3N
+ {PB_15_ALT1, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM15, 1, 1)}, // TIM15_CH1N
+ {PB_15_ALT2, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM15, 2, 0)}, // TIM15_CH2
+ {NC, NP, 0}
+};
+#endif
+
+//*** UART ***
+
+#ifdef HAL_UART_MODULE_ENABLED
+WEAK const PinMap PinMap_UART_TX[] = {
+ // {PA_2, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)}, // ADC
+ {PA_9, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
+ {PA_14, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
+ // {PB_6, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART1)}, // I2C
+ {NC, NP, 0}
+};
+#endif
+
+#ifdef HAL_UART_MODULE_ENABLED
+WEAK const PinMap PinMap_UART_RX[] = {
+ // {PA_3, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)}, // TC2_CS
+ {PA_10, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
+ {PA_15, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
+ // {PB_7, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART1)}, // I2C
+ {NC, NP, 0}
+};
+#endif
+
+#ifdef HAL_UART_MODULE_ENABLED
+WEAK const PinMap PinMap_UART_RTS[] = {
+ // {PA_1, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)}, // ADC
+ {PA_12, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
+ {NC, NP, 0}
+};
+#endif
+
+#ifdef HAL_UART_MODULE_ENABLED
+WEAK const PinMap PinMap_UART_CTS[] = {
+ // {PA_0, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)}, // ADC
+ {PA_11, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
+ {NC, NP, 0}
+};
+#endif
+
+//*** SPI ***
+
+#ifdef HAL_SPI_MODULE_ENABLED
+WEAK const PinMap PinMap_SPI_MOSI[] = {
+ {PA_7, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
+ {PB_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
+ {PB_15, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
+ {NC, NP, 0}
+};
+#endif
+
+#ifdef HAL_SPI_MODULE_ENABLED
+WEAK const PinMap PinMap_SPI_MISO[] = {
+ {PA_6, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
+ {PB_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
+ {PB_14, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
+ {NC, NP, 0}
+};
+#endif
+
+#ifdef HAL_SPI_MODULE_ENABLED
+WEAK const PinMap PinMap_SPI_SCLK[] = {
+ {PA_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
+ {PB_3, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
+ {PB_13, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
+ {NC, NP, 0}
+};
+#endif
+
+#ifdef HAL_SPI_MODULE_ENABLED
+WEAK const PinMap PinMap_SPI_SSEL[] = {
+ // {PA_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)}, // TC2_CS
+ {PA_15, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
+ // {PB_12, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)}, // E1_CTL
+ {NC, NP, 0}
+};
+#endif
+
+//*** No CAN ***
+
+//*** No ETHERNET ***
+
+//*** No QUADSPI ***
+
+//*** No USB ***
+
+//*** No SD ***
+#endif /* ARDUINO_EEXTR_F030_V1 */
diff --git a/variants/STM32F0xx/F030C8Tx/generic_clock.c b/variants/STM32F0xx/F030C8Tx/generic_clock.c
index 628318c8ed..cc592c8af2 100644
--- a/variants/STM32F0xx/F030C8Tx/generic_clock.c
+++ b/variants/STM32F0xx/F030C8Tx/generic_clock.c
@@ -20,8 +20,33 @@
*/
WEAK void SystemClock_Config(void)
{
- /* SystemClock_Config can be generated by STM32CubeMX */
-#warning "SystemClock_Config() is empty. Default clock at reset is used."
+ RCC_OscInitTypeDef RCC_OscInitStruct = {};
+ RCC_ClkInitTypeDef RCC_ClkInitStruct = {};
+
+ /** Initializes the RCC Oscillators according to the specified parameters
+ * in the RCC_OscInitTypeDef structure.
+ */
+ RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
+ RCC_OscInitStruct.HSIState = RCC_HSI_ON;
+ RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
+ RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
+ RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
+ RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL12;
+ RCC_OscInitStruct.PLL.PREDIV = RCC_PREDIV_DIV1;
+ if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) {
+ Error_Handler();
+ }
+ /** Initializes the CPU, AHB and APB buses clocks
+ */
+ RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK
+ | RCC_CLOCKTYPE_PCLK1;
+ RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
+ RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
+ RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
+
+ if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1) != HAL_OK) {
+ Error_Handler();
+ }
}
#endif /* ARDUINO_GENERIC_* */
diff --git a/variants/STM32F0xx/WRAITH32_F051K6/ldscript.ld b/variants/STM32F0xx/F030C8Tx/ldscript.ld
similarity index 52%
rename from variants/STM32F0xx/WRAITH32_F051K6/ldscript.ld
rename to variants/STM32F0xx/F030C8Tx/ldscript.ld
index 988751bc51..6aaa6d75c6 100644
--- a/variants/STM32F0xx/WRAITH32_F051K6/ldscript.ld
+++ b/variants/STM32F0xx/F030C8Tx/ldscript.ld
@@ -1,47 +1,49 @@
-/*
-******************************************************************************
-**
-** File : LinkerScript.ld
-**
-** Author : Auto-generated by STM32CubeMx, modified by G. Small
-**
-** Abstract : Linker script for STM32F051K6Tx series
-** 32Kbytes FLASH and 256 bytes SRAM, 7936 bytes RAM
-**
-** Set heap size, stack size and stack location according
-** to application requirements.
-**
-** Set memory bank area and size if external memory is used.
-**
-** Target : STMicroelectronics STM32
-**
-** Distribution: The file is distributed “as is,” without any warranty
-** of any kind.
-**
-*****************************************************************************
-*/
+/**
+ ******************************************************************************
+ * @file LinkerScript.ld
+ * @author Auto-generated by STM32CubeIDE
+ * @brief Linker script for STM32F030C8Tx Device from STM32F0 series
+ * 64Kbytes FLASH
+ * 8Kbytes RAM
+ *
+ * Set heap size, stack size and stack location according
+ * to application requirements.
+ *
+ * Set memory bank area and size if external memory is used
+ ******************************************************************************
+ * @attention
+ *
+ * © Copyright (c) 2020 STMicroelectronics.
+ * All rights reserved.
+ *
+ * This software component is licensed by ST under BSD 3-Clause license,
+ * the "License"; You may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at:
+ * opensource.org/licenses/BSD-3-Clause
+ *
+ ******************************************************************************
+ */
/* Entry Point */
ENTRY(Reset_Handler)
/* Highest address of the user mode stack */
-_estack = 0x20002000; /* end of RAM */
-/* Generate a link error if heap and stack don't fit into RAM */
-_Min_Heap_Size = 0x200; /* required amount of heap */
-_Min_Stack_Size = 0x400; /* required amount of stack */
+_estack = ORIGIN(RAM) + LENGTH(RAM); /* end of "RAM" Ram type memory */
-/* Specify the memory areas */
+_Min_Heap_Size = 0x200; /* required amount of heap */
+_Min_Stack_Size = 0x400; /* required amount of stack */
+
+/* Memories definition */
MEMORY
{
- SRAM (xrw) : ORIGIN = 0x20000000, LENGTH = 256
- RAM (xrw) : ORIGIN = 0x20000100, LENGTH = 7936
- FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 32K
+ RAM (xrw) : ORIGIN = 0x20000000, LENGTH = LD_MAX_DATA_SIZE
+ FLASH (rx) : ORIGIN = 0x8000000 + LD_FLASH_OFFSET, LENGTH = LD_MAX_SIZE - LD_FLASH_OFFSET
}
-/* Define output sections */
+/* Sections */
SECTIONS
{
- /* The startup code goes first into FLASH */
+ /* The startup code into "FLASH" Rom type memory */
.isr_vector :
{
. = ALIGN(4);
@@ -49,7 +51,7 @@ SECTIONS
. = ALIGN(4);
} >FLASH
- /* The program code and other data goes into FLASH */
+ /* The program code and other data into "FLASH" Rom type memory */
.text :
{
. = ALIGN(4);
@@ -66,7 +68,7 @@ SECTIONS
_etext = .; /* define a global symbols at end of code */
} >FLASH
- /* Constant data goes into FLASH */
+ /* Constant data into "FLASH" Rom type memory */
.rodata :
{
. = ALIGN(4);
@@ -75,55 +77,72 @@ SECTIONS
. = ALIGN(4);
} >FLASH
- .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >FLASH
+ .ARM.extab : {
+ . = ALIGN(4);
+ *(.ARM.extab* .gnu.linkonce.armextab.*)
+ . = ALIGN(4);
+ } >FLASH
+
.ARM : {
+ . = ALIGN(4);
__exidx_start = .;
*(.ARM.exidx*)
__exidx_end = .;
+ . = ALIGN(4);
} >FLASH
.preinit_array :
{
+ . = ALIGN(4);
PROVIDE_HIDDEN (__preinit_array_start = .);
KEEP (*(.preinit_array*))
PROVIDE_HIDDEN (__preinit_array_end = .);
+ . = ALIGN(4);
} >FLASH
+
.init_array :
{
+ . = ALIGN(4);
PROVIDE_HIDDEN (__init_array_start = .);
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array*))
PROVIDE_HIDDEN (__init_array_end = .);
+ . = ALIGN(4);
} >FLASH
+
.fini_array :
{
+ . = ALIGN(4);
PROVIDE_HIDDEN (__fini_array_start = .);
KEEP (*(SORT(.fini_array.*)))
KEEP (*(.fini_array*))
PROVIDE_HIDDEN (__fini_array_end = .);
+ . = ALIGN(4);
} >FLASH
- /* used by the startup to initialize data */
+ /* Used by the startup to initialize data */
_sidata = LOADADDR(.data);
- /* Initialized data sections goes into RAM, load LMA copy after code */
- .data :
+ /* Initialized data sections into "RAM" Ram type memory */
+ .data :
{
. = ALIGN(4);
_sdata = .; /* create a global symbol at data start */
*(.data) /* .data sections */
*(.data*) /* .data* sections */
+ *(.RamFunc) /* .RamFunc sections */
+ *(.RamFunc*) /* .RamFunc* sections */
. = ALIGN(4);
_edata = .; /* define a global symbol at data end */
+
} >RAM AT> FLASH
-
- /* Uninitialized data section */
+ /* Uninitialized data section into "RAM" Ram type memory */
. = ALIGN(4);
.bss :
{
- /* This is used by the startup in order to initialize the .bss secion */
+ /* This is used by the startup in order to initialize the .bss section */
_sbss = .; /* define a global symbol at bss start */
__bss_start__ = _sbss;
*(.bss)
@@ -135,7 +154,7 @@ SECTIONS
__bss_end__ = _ebss;
} >RAM
- /* User_heap_stack section, used to check that there is enough RAM left */
+ /* User_heap_stack section, used to check that there is enough "RAM" Ram type memory left */
._user_heap_stack :
{
. = ALIGN(8);
@@ -146,9 +165,7 @@ SECTIONS
. = ALIGN(8);
} >RAM
-
-
- /* Remove information from the standard libraries */
+ /* Remove information from the compiler libraries */
/DISCARD/ :
{
libc.a ( * )
@@ -157,8 +174,4 @@ SECTIONS
}
.ARM.attributes 0 : { *(.ARM.attributes) }
- .RAMVectorTable : { *(.RAMVectorTable) } >SRAM AT> FLASH
-
}
-
-
diff --git a/variants/STM32F0xx/EEXTR_F030_V1/variant_EEXTR_F030_V1.cpp b/variants/STM32F0xx/F030C8Tx/variant_EEXTR_F030_V1.cpp
similarity index 54%
rename from variants/STM32F0xx/EEXTR_F030_V1/variant_EEXTR_F030_V1.cpp
rename to variants/STM32F0xx/F030C8Tx/variant_EEXTR_F030_V1.cpp
index 8b64d416c1..c90ac59d92 100644
--- a/variants/STM32F0xx/EEXTR_F030_V1/variant_EEXTR_F030_V1.cpp
+++ b/variants/STM32F0xx/F030C8Tx/variant_EEXTR_F030_V1.cpp
@@ -1,80 +1,60 @@
/*
*******************************************************************************
- * Copyright (c) 2018, STMicroelectronics
+ * Copyright (c) 2021, STMicroelectronics
* All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
+ * This software component is licensed by ST under BSD 3-Clause license,
+ * the "License"; You may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at:
+ * opensource.org/licenses/BSD-3-Clause
*
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * 3. Neither the name of STMicroelectronics nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*******************************************************************************
*/
+#if defined(ARDUINO_EEXTR_F030_V1)
#include "pins_arduino.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
-
// Pin number
const PinName digitalPin[] = {
- PC_13, // D0
- PC_14, // D1
- PC_15, // D2
- PF_0, // D3
- PF_1, // D4
- PA_0, // D5
- PA_1, // D6
- PA_2, // D7
- PA_3, // D8
- PA_4, // D9
- PA_5, // D10
- PA_6, // D11
- PA_7, // D12
- PB_0, // D13
- PB_1, // D14
- PB_2, // D15
- PB_10, // D16
- PB_11, // D17
- PB_12, // D18
- PB_13, // D19
- PB_14, // D20
- PB_15, // D21
- PA_8, // D22
- PA_9, // D23
- PA_10, // D24
- PA_11, // D25
- PA_12, // D26
- PA_13, // D27
- PF_6, // D28
- PF_7, // D29
- PA_14, // D30
- PA_15, // D31
- PB_3, // D32
- PB_4, // D33
- PB_5, // D34
- PB_6, // D35
- PB_7, // D36
- PB_8, // D37
- PB_9, // D38
+ PC_13,
+ PC_14,
+ PC_15,
+ PF_0,
+ PF_1,
+ PA_0,
+ PA_1,
+ PA_2,
+ PA_3,
+ PA_4,
+ PA_5,
+ PA_6,
+ PA_7,
+ PB_0,
+ PB_1,
+ PB_2,
+ PB_10,
+ PB_11,
+ PB_12,
+ PB_13,
+ PB_14,
+ PB_15,
+ PA_8,
+ PA_9,
+ PA_10,
+ PA_11,
+ PA_12,
+ PA_13,
+ PF_6,
+ PF_7,
+ PA_14,
+ PA_15,
+ PB_3,
+ PB_4,
+ PB_5,
+ PB_6,
+ PB_7,
+ PB_8,
+ PB_9
};
// Analog (Ax) pin number array
@@ -84,10 +64,6 @@ const uint32_t analogInputPin[] = {
7 // A2
};
-#ifdef __cplusplus
-}
-#endif
-
// ----------------------------------------------------------------------------
#ifdef __cplusplus
@@ -148,3 +124,4 @@ WEAK void SystemClock_Config(void)
#ifdef __cplusplus
}
#endif
+#endif /* ARDUINO_EEXTR_F030_V1 */
diff --git a/variants/STM32F0xx/F030C8Tx/variant_EEXTR_F030_V1.h b/variants/STM32F0xx/F030C8Tx/variant_EEXTR_F030_V1.h
new file mode 100644
index 0000000000..dbb3b2162a
--- /dev/null
+++ b/variants/STM32F0xx/F030C8Tx/variant_EEXTR_F030_V1.h
@@ -0,0 +1,123 @@
+/*
+ *******************************************************************************
+ * Copyright (c) 2021, STMicroelectronics
+ * All rights reserved.
+ *
+ * This software component is licensed by ST under BSD 3-Clause license,
+ * the "License"; You may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at:
+ * opensource.org/licenses/BSD-3-Clause
+ *
+ *******************************************************************************
+ */
+#pragma once
+
+/*----------------------------------------------------------------------------
+ * STM32 pins number
+ *----------------------------------------------------------------------------*/
+
+// P1 connector Right side (bottom view)
+#define PC13 0
+#define PC14 1
+#define PC15 2
+#define PF0 3
+#define PF1 4
+#define PA0 A0
+#define PA1 A1
+#define PA2 A2
+#define PA3 8
+#define PA4 9
+#define PA5 10
+#define PA6 11
+#define PA7 12
+#define PB0 13
+#define PB1 14
+#define PB2 15
+#define PB10 16
+#define PB11 17
+#define PB12 18
+#define PB13 19
+#define PB14 20
+#define PB15 21
+#define PA8 22
+#define PA9 23
+#define PA10 24
+#define PA11 25
+#define PA12 26
+#define PA13 27
+#define PF6 28
+#define PF7 29
+#define PA14 30
+#define PA15 31
+#define PB3 32
+#define PB4 33
+#define PB5 34
+#define PB6 35
+#define PB7 36
+#define PB8 37
+#define PB9 38
+
+// Alternate pins number
+#define PA6_ALT1 (PA6 | ALT1)
+#define PA7_ALT1 (PA7 | ALT1)
+#define PA7_ALT2 (PA7 | ALT2)
+#define PA7_ALT3 (PA7 | ALT3)
+#define PB0_ALT1 (PB0 | ALT1)
+#define PB1_ALT1 (PB1 | ALT1)
+#define PB1_ALT2 (PB1 | ALT2)
+#define PB14_ALT1 (PB14 | ALT1)
+#define PB15_ALT1 (PB15 | ALT1)
+#define PB15_ALT2 (PB15 | ALT2)
+
+#define NUM_DIGITAL_PINS 39
+#define NUM_ANALOG_INPUTS 3
+
+// SPI definitions
+// SPI1 is used
+#define PIN_SPI_SS ND
+#define PIN_SPI_MOSI PA7
+#define PIN_SPI_MISO PA6
+#define PIN_SPI_SCK PA5
+
+// I2C Definitions
+// I2C1 is used
+#define PIN_WIRE_SDA PB7
+#define PIN_WIRE_SCL PB6
+
+// Timer Definitions
+// Use TIM6 when possible as servo and tone don't need GPIO output pin
+#define TIMER_TONE TIM6
+#define TIMER_SERVO TIM14
+
+// UART Definitions
+#define SERIAL_UART_INSTANCE 1 // USART 1
+
+// Mandatory for Firmata
+#define PIN_SERIAL_RX PA10
+#define PIN_SERIAL_TX PA9
+
+#define HSE_VALUE 16000000U /*!< Value of the External oscillator in Hz */
+
+/*----------------------------------------------------------------------------
+ * Arduino objects - C++ only
+ *----------------------------------------------------------------------------*/
+
+#ifdef __cplusplus
+ // These serial port names are intended to allow libraries and architecture-neutral
+ // sketches to automatically default to the correct port name for a particular type
+ // of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
+ // the first hardware serial port whose RX/TX pins are not dedicated to another use.
+ //
+ // SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
+ //
+ // SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
+ //
+ // SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
+ //
+ // SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
+ //
+ // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
+ // pins are NOT connected to anything by default.
+ #define SERIAL_PORT_MONITOR Serial
+ #define SERIAL_PORT_HARDWARE Serial
+#endif
diff --git a/variants/STM32F0xx/F030F4Px/generic_clock.c b/variants/STM32F0xx/F030F4Px/generic_clock.c
index 4b6b69392d..6f1bb69025 100644
--- a/variants/STM32F0xx/F030F4Px/generic_clock.c
+++ b/variants/STM32F0xx/F030F4Px/generic_clock.c
@@ -20,8 +20,33 @@
*/
WEAK void SystemClock_Config(void)
{
- /* SystemClock_Config can be generated by STM32CubeMX */
-#warning "SystemClock_Config() is empty. Default clock at reset is used."
+ RCC_OscInitTypeDef RCC_OscInitStruct = {};
+ RCC_ClkInitTypeDef RCC_ClkInitStruct = {};
+
+ /** Initializes the RCC Oscillators according to the specified parameters
+ * in the RCC_OscInitTypeDef structure.
+ */
+ RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
+ RCC_OscInitStruct.HSIState = RCC_HSI_ON;
+ RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
+ RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
+ RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
+ RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL12;
+ RCC_OscInitStruct.PLL.PREDIV = RCC_PREDIV_DIV1;
+ if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) {
+ Error_Handler();
+ }
+ /** Initializes the CPU, AHB and APB buses clocks
+ */
+ RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK
+ | RCC_CLOCKTYPE_PCLK1;
+ RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
+ RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
+ RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
+
+ if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1) != HAL_OK) {
+ Error_Handler();
+ }
}
#endif /* ARDUINO_GENERIC_* */
diff --git a/variants/STM32F0xx/ELEKTOR_F072Cx/ldscript.ld b/variants/STM32F0xx/F030F4Px/ldscript.ld
similarity index 51%
rename from variants/STM32F0xx/ELEKTOR_F072Cx/ldscript.ld
rename to variants/STM32F0xx/F030F4Px/ldscript.ld
index 0831439511..69446d7491 100644
--- a/variants/STM32F0xx/ELEKTOR_F072Cx/ldscript.ld
+++ b/variants/STM32F0xx/F030F4Px/ldscript.ld
@@ -1,68 +1,43 @@
-/*
-******************************************************************************
-**
-** File : LinkerScript.ld
-**
-** Author : Auto-generated by STM32CubeIDE
-**
-** Abstract : Linker script for STM32F072C8Tx Device from STM32F0 series
-** 64Kbytes FLASH
-** 16Kbytes RAM
-**
-** Set heap size, stack size and stack location according
-** to application requirements.
-**
-** Set memory bank area and size if external memory is used.
-**
-** Target : STMicroelectronics STM32
-**
-** Distribution: The file is distributed as is without any warranty
-** of any kind.
-**
-*****************************************************************************
-** @attention
-**
-** © COPYRIGHT(c) 2019 STMicroelectronics
-**
-** Redistribution and use in source and binary forms, with or without modification,
-** are permitted provided that the following conditions are met:
-** 1. Redistributions of source code must retain the above copyright notice,
-** this list of conditions and the following disclaimer.
-** 2. Redistributions in binary form must reproduce the above copyright notice,
-** this list of conditions and the following disclaimer in the documentation
-** and/or other materials provided with the distribution.
-** 3. Neither the name of STMicroelectronics nor the names of its contributors
-** may be used to endorse or promote products derived from this software
-** without specific prior written permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-** SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-**
-*****************************************************************************
-*/
+/**
+ ******************************************************************************
+ * @file LinkerScript.ld
+ * @author Auto-generated by STM32CubeIDE
+ * @brief Linker script for STM32F030F4Px Device from STM32F0 series
+ * 16Kbytes FLASH
+ * 4Kbytes RAM
+ *
+ * Set heap size, stack size and stack location according
+ * to application requirements.
+ *
+ * Set memory bank area and size if external memory is used
+ ******************************************************************************
+ * @attention
+ *
+ * © Copyright (c) 2020 STMicroelectronics.
+ * All rights reserved.
+ *
+ * This software component is licensed by ST under BSD 3-Clause license,
+ * the "License"; You may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at:
+ * opensource.org/licenses/BSD-3-Clause
+ *
+ ******************************************************************************
+ */
/* Entry Point */
ENTRY(Reset_Handler)
/* Highest address of the user mode stack */
-_estack = 0x20000000 + LD_MAX_DATA_SIZE; /* end of "RAM" Ram type memory */
+_estack = ORIGIN(RAM) + LENGTH(RAM); /* end of "RAM" Ram type memory */
-_Min_Heap_Size = 0x200 ; /* required amount of heap */
-_Min_Stack_Size = 0x400 ; /* required amount of stack */
+_Min_Heap_Size = 0x200; /* required amount of heap */
+_Min_Stack_Size = 0x400; /* required amount of stack */
/* Memories definition */
MEMORY
{
- RAM (xrw) : ORIGIN = 0x20000000, LENGTH = LD_MAX_DATA_SIZE
- FLASH (rx) : ORIGIN = 0x8000000 + LD_FLASH_OFFSET, LENGTH = LD_MAX_SIZE - LD_FLASH_OFFSET
+ RAM (xrw) : ORIGIN = 0x20000000, LENGTH = LD_MAX_DATA_SIZE
+ FLASH (rx) : ORIGIN = 0x8000000 + LD_FLASH_OFFSET, LENGTH = LD_MAX_SIZE - LD_FLASH_OFFSET
}
/* Sections */
@@ -102,12 +77,12 @@ SECTIONS
. = ALIGN(4);
} >FLASH
- .ARM.extab : {
- . = ALIGN(4);
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- . = ALIGN(4);
+ .ARM.extab : {
+ . = ALIGN(4);
+ *(.ARM.extab* .gnu.linkonce.armextab.*)
+ . = ALIGN(4);
} >FLASH
-
+
.ARM : {
. = ALIGN(4);
__exidx_start = .;
@@ -124,7 +99,7 @@ SECTIONS
PROVIDE_HIDDEN (__preinit_array_end = .);
. = ALIGN(4);
} >FLASH
-
+
.init_array :
{
. = ALIGN(4);
@@ -134,7 +109,7 @@ SECTIONS
PROVIDE_HIDDEN (__init_array_end = .);
. = ALIGN(4);
} >FLASH
-
+
.fini_array :
{
. = ALIGN(4);
@@ -149,23 +124,25 @@ SECTIONS
_sidata = LOADADDR(.data);
/* Initialized data sections into "RAM" Ram type memory */
- .data :
+ .data :
{
. = ALIGN(4);
_sdata = .; /* create a global symbol at data start */
*(.data) /* .data sections */
*(.data*) /* .data* sections */
+ *(.RamFunc) /* .RamFunc sections */
+ *(.RamFunc*) /* .RamFunc* sections */
. = ALIGN(4);
_edata = .; /* define a global symbol at data end */
-
+
} >RAM AT> FLASH
-
+
/* Uninitialized data section into "RAM" Ram type memory */
. = ALIGN(4);
.bss :
{
- /* This is used by the startup in order to initialize the .bss secion */
+ /* This is used by the startup in order to initialize the .bss section */
_sbss = .; /* define a global symbol at bss start */
__bss_start__ = _sbss;
*(.bss)
diff --git a/variants/STM32F0xx/DEMO_F030F4/variant_DEMO_F030F4.cpp b/variants/STM32F0xx/F030F4Px/variant_DEMO_F030F4.cpp
similarity index 56%
rename from variants/STM32F0xx/DEMO_F030F4/variant_DEMO_F030F4.cpp
rename to variants/STM32F0xx/F030F4Px/variant_DEMO_F030F4.cpp
index 211003e092..ce0ca63ef2 100644
--- a/variants/STM32F0xx/DEMO_F030F4/variant_DEMO_F030F4.cpp
+++ b/variants/STM32F0xx/F030F4Px/variant_DEMO_F030F4.cpp
@@ -1,33 +1,16 @@
/*
*******************************************************************************
- * Copyright (c) 2017, STMicroelectronics
+ * Copyright (c) 2021, STMicroelectronics
* All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
+ * This software component is licensed by ST under BSD 3-Clause license,
+ * the "License"; You may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at:
+ * opensource.org/licenses/BSD-3-Clause
*
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * 3. Neither the name of STMicroelectronics nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*******************************************************************************
*/
-
+#if defined(ARDUINO_DEMO_F030F4) || defined(ARDUINO_DEMO_F030F4_16M) || defined(ARDUINO_DEMO_F030F4_HSI)
#include "pins_arduino.h"
#ifdef __cplusplus
@@ -89,10 +72,13 @@ extern "C" {
*/
WEAK void SystemClock_Config(void)
{
- RCC_OscInitTypeDef RCC_OscInitStruct;
- RCC_ClkInitTypeDef RCC_ClkInitStruct;
+ RCC_OscInitTypeDef RCC_OscInitStruct = {};
+ RCC_ClkInitTypeDef RCC_ClkInitStruct = {};
- /* Initializes the CPU, AHB and APB busses clocks */
+ /*
+ * Initializes the RCC Oscillators according to the specified parameters
+ * in the RCC_OscInitTypeDef structure.
+ */
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
#ifdef ARDUINO_DEMO_F030F4_HSI
/* Internal HSI, 48MHz system clock */
@@ -103,10 +89,8 @@ WEAK void SystemClock_Config(void)
RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL12;
RCC_OscInitStruct.PLL.PREDIV = RCC_PREDIV_DIV1;
#else
- RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI14 | RCC_OSCILLATORTYPE_HSE;
+ RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
RCC_OscInitStruct.HSEState = RCC_HSE_ON;
- RCC_OscInitStruct.HSI14State = RCC_HSI14_ON;
- RCC_OscInitStruct.HSI14CalibrationValue = 16;
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL6;
#ifdef ARDUINO_DEMO_F030F4_16M
@@ -116,7 +100,7 @@ WEAK void SystemClock_Config(void)
#endif
#endif
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) {
- _Error_Handler(__FILE__, __LINE__);
+ Error_Handler();
}
/* Initializes the CPU, AHB and APB busses clocks */
@@ -127,10 +111,11 @@ WEAK void SystemClock_Config(void)
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1) != HAL_OK) {
- _Error_Handler(__FILE__, __LINE__);
+ Error_Handler();
}
}
#ifdef __cplusplus
}
#endif
+#endif /* ARDUINO_* */
diff --git a/variants/STM32F0xx/F030F4Px/variant_DEMO_F030F4.h b/variants/STM32F0xx/F030F4Px/variant_DEMO_F030F4.h
new file mode 100644
index 0000000000..e0149a03c9
--- /dev/null
+++ b/variants/STM32F0xx/F030F4Px/variant_DEMO_F030F4.h
@@ -0,0 +1,122 @@
+/*
+ *******************************************************************************
+ * Copyright (c) 2021, STMicroelectronics
+ * All rights reserved.
+ *
+ * This software component is licensed by ST under BSD 3-Clause license,
+ * the "License"; You may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at:
+ * opensource.org/licenses/BSD-3-Clause
+ *
+ *******************************************************************************
+ */
+#pragma once
+
+/*----------------------------------------------------------------------------
+ * STM32 pins number
+ *----------------------------------------------------------------------------*/
+// USB connector on the top, MCU side
+// Left Side
+#define PA0 A0 //D0/A0
+#define PA1 A1 //D1/A1
+#define PA2 A2 //D2/A2 - TX
+#define PA3 A3 //D3/A3 - RX
+#define PA4 A4 //D4/A4 - LED
+// Right side
+#define PA5 A5 //D5/A5 - SCK
+#define PA6 A6 //D6/A6 - MISO
+#define PA7 A7 //D7/A7 - MOSI
+#define PB1 A8 //D8/A8 - SS
+#define PA9 9 //D9 - SCL (TX UART header)
+#define PA10 10 //D10 - SDA (RX UART header)
+#define PA13 11 //D11 - SWDIO
+#define PA14 12 //D12 - SWCLK
+// Boards without a crystal can use these pins as well:
+#define PF0 13
+#define PF1 14
+
+// Alternate pins number
+#define PA6_ALT1 (PA6 | ALT1)
+#define PA7_ALT1 (PA7 | ALT1)
+#define PA7_ALT2 (PA7 | ALT2)
+#define PA7_ALT3 (PA7 | ALT3)
+#define PB1_ALT1 (PB1 | ALT1)
+#define PB1_ALT2 (PB1 | ALT2)
+
+#define NUM_DIGITAL_PINS 15
+#define NUM_ANALOG_INPUTS 9
+
+// On-board LED pin number
+#ifndef LED_BUILTIN
+ #define LED_BUILTIN PA4
+#endif
+#ifndef LED_GREEN
+ #define LED_GREEN LED_BUILTIN
+#endif
+
+// On-board user button
+#ifndef USER_BTN
+ #define USER_BTN ND
+#endif
+
+// SPI Definitions
+#ifndef PIN_SPI_SS
+ #define PIN_SPI_SS PB1
+#endif
+#define PIN_SPI_MOSI PA7
+#define PIN_SPI_MISO PA6
+#define PIN_SPI_SCK PA5
+
+// I2C Definitions
+#define PIN_WIRE_SDA PA10
+#define PIN_WIRE_SCL PA9
+
+// Timer Definitions
+#ifndef TIMER_TONE
+ #define TIMER_TONE TIM14
+#endif
+#ifndef TIMER_SERVO
+ #define TIMER_SERVO TIM16
+#endif
+
+// UART Definitions
+#ifndef SERIAL_UART_INSTANCE
+ #define SERIAL_UART_INSTANCE 1
+#endif
+
+// Default pin used for 'Serial' instance
+// Mandatory for Firmata
+#ifndef PIN_SERIAL_RX
+ #define PIN_SERIAL_RX PA3
+#endif
+#ifndef PIN_SERIAL_TX
+ #define PIN_SERIAL_TX PA2
+#endif
+
+#ifdef ARDUINO_DEMO_F030F4_16M
+ #define HSE_VALUE 16000000U /*!< Value of the External oscillator in Hz */
+#endif
+
+/*----------------------------------------------------------------------------
+ * Arduino objects - C++ only
+ *----------------------------------------------------------------------------*/
+
+#ifdef __cplusplus
+ // These serial port names are intended to allow libraries and architecture-neutral
+ // sketches to automatically default to the correct port name for a particular type
+ // of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
+ // the first hardware serial port whose RX/TX pins are not dedicated to another use.
+ //
+ // SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
+ //
+ // SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
+ //
+ // SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
+ //
+ // SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
+ //
+ // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
+ // pins are NOT connected to anything by default.
+ #define SERIAL_PORT_MONITOR Serial
+ #define SERIAL_PORT_HARDWARE Serial
+#endif
diff --git a/variants/STM32F0xx/F030R8Tx/generic_clock.c b/variants/STM32F0xx/F030R8Tx/generic_clock.c
index e08ab16253..ec0e63fdd0 100644
--- a/variants/STM32F0xx/F030R8Tx/generic_clock.c
+++ b/variants/STM32F0xx/F030R8Tx/generic_clock.c
@@ -20,8 +20,33 @@
*/
WEAK void SystemClock_Config(void)
{
- /* SystemClock_Config can be generated by STM32CubeMX */
-#warning "SystemClock_Config() is empty. Default clock at reset is used."
+ RCC_OscInitTypeDef RCC_OscInitStruct = {};
+ RCC_ClkInitTypeDef RCC_ClkInitStruct = {};
+
+ /** Initializes the RCC Oscillators according to the specified parameters
+ * in the RCC_OscInitTypeDef structure.
+ */
+ RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
+ RCC_OscInitStruct.HSIState = RCC_HSI_ON;
+ RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
+ RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
+ RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
+ RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL12;
+ RCC_OscInitStruct.PLL.PREDIV = RCC_PREDIV_DIV1;
+ if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) {
+ Error_Handler();
+ }
+ /** Initializes the CPU, AHB and APB buses clocks
+ */
+ RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK
+ | RCC_CLOCKTYPE_PCLK1;
+ RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
+ RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
+ RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
+
+ if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1) != HAL_OK) {
+ Error_Handler();
+ }
}
#endif /* ARDUINO_GENERIC_* */
diff --git a/variants/STM32F0xx/F030R8Tx/ldscript.ld b/variants/STM32F0xx/F030R8Tx/ldscript.ld
new file mode 100644
index 0000000000..573612043e
--- /dev/null
+++ b/variants/STM32F0xx/F030R8Tx/ldscript.ld
@@ -0,0 +1,177 @@
+/**
+ ******************************************************************************
+ * @file LinkerScript.ld
+ * @author Auto-generated by STM32CubeIDE
+ * @brief Linker script for STM32F030R8Tx Device from STM32F0 series
+ * 64Kbytes FLASH
+ * 8Kbytes RAM
+ *
+ * Set heap size, stack size and stack location according
+ * to application requirements.
+ *
+ * Set memory bank area and size if external memory is used
+ ******************************************************************************
+ * @attention
+ *
+ * © Copyright (c) 2020 STMicroelectronics.
+ * All rights reserved.
+ *
+ * This software component is licensed by ST under BSD 3-Clause license,
+ * the "License"; You may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at:
+ * opensource.org/licenses/BSD-3-Clause
+ *
+ ******************************************************************************
+ */
+
+/* Entry Point */
+ENTRY(Reset_Handler)
+
+/* Highest address of the user mode stack */
+_estack = ORIGIN(RAM) + LENGTH(RAM); /* end of "RAM" Ram type memory */
+
+_Min_Heap_Size = 0x200; /* required amount of heap */
+_Min_Stack_Size = 0x400; /* required amount of stack */
+
+/* Memories definition */
+MEMORY
+{
+ RAM (xrw) : ORIGIN = 0x20000000, LENGTH = LD_MAX_DATA_SIZE
+ FLASH (rx) : ORIGIN = 0x8000000 + LD_FLASH_OFFSET, LENGTH = LD_MAX_SIZE - LD_FLASH_OFFSET
+}
+
+/* Sections */
+SECTIONS
+{
+ /* The startup code into "FLASH" Rom type memory */
+ .isr_vector :
+ {
+ . = ALIGN(4);
+ KEEP(*(.isr_vector)) /* Startup code */
+ . = ALIGN(4);
+ } >FLASH
+
+ /* The program code and other data into "FLASH" Rom type memory */
+ .text :
+ {
+ . = ALIGN(4);
+ *(.text) /* .text sections (code) */
+ *(.text*) /* .text* sections (code) */
+ *(.glue_7) /* glue arm to thumb code */
+ *(.glue_7t) /* glue thumb to arm code */
+ *(.eh_frame)
+
+ KEEP (*(.init))
+ KEEP (*(.fini))
+
+ . = ALIGN(4);
+ _etext = .; /* define a global symbols at end of code */
+ } >FLASH
+
+ /* Constant data into "FLASH" Rom type memory */
+ .rodata :
+ {
+ . = ALIGN(4);
+ *(.rodata) /* .rodata sections (constants, strings, etc.) */
+ *(.rodata*) /* .rodata* sections (constants, strings, etc.) */
+ . = ALIGN(4);
+ } >FLASH
+
+ .ARM.extab : {
+ . = ALIGN(4);
+ *(.ARM.extab* .gnu.linkonce.armextab.*)
+ . = ALIGN(4);
+ } >FLASH
+
+ .ARM : {
+ . = ALIGN(4);
+ __exidx_start = .;
+ *(.ARM.exidx*)
+ __exidx_end = .;
+ . = ALIGN(4);
+ } >FLASH
+
+ .preinit_array :
+ {
+ . = ALIGN(4);
+ PROVIDE_HIDDEN (__preinit_array_start = .);
+ KEEP (*(.preinit_array*))
+ PROVIDE_HIDDEN (__preinit_array_end = .);
+ . = ALIGN(4);
+ } >FLASH
+
+ .init_array :
+ {
+ . = ALIGN(4);
+ PROVIDE_HIDDEN (__init_array_start = .);
+ KEEP (*(SORT(.init_array.*)))
+ KEEP (*(.init_array*))
+ PROVIDE_HIDDEN (__init_array_end = .);
+ . = ALIGN(4);
+ } >FLASH
+
+ .fini_array :
+ {
+ . = ALIGN(4);
+ PROVIDE_HIDDEN (__fini_array_start = .);
+ KEEP (*(SORT(.fini_array.*)))
+ KEEP (*(.fini_array*))
+ PROVIDE_HIDDEN (__fini_array_end = .);
+ . = ALIGN(4);
+ } >FLASH
+
+ /* Used by the startup to initialize data */
+ _sidata = LOADADDR(.data);
+
+ /* Initialized data sections into "RAM" Ram type memory */
+ .data :
+ {
+ . = ALIGN(4);
+ _sdata = .; /* create a global symbol at data start */
+ *(.data) /* .data sections */
+ *(.data*) /* .data* sections */
+ *(.RamFunc) /* .RamFunc sections */
+ *(.RamFunc*) /* .RamFunc* sections */
+
+ . = ALIGN(4);
+ _edata = .; /* define a global symbol at data end */
+
+ } >RAM AT> FLASH
+
+ /* Uninitialized data section into "RAM" Ram type memory */
+ . = ALIGN(4);
+ .bss :
+ {
+ /* This is used by the startup in order to initialize the .bss section */
+ _sbss = .; /* define a global symbol at bss start */
+ __bss_start__ = _sbss;
+ *(.bss)
+ *(.bss*)
+ *(COMMON)
+
+ . = ALIGN(4);
+ _ebss = .; /* define a global symbol at bss end */
+ __bss_end__ = _ebss;
+ } >RAM
+
+ /* User_heap_stack section, used to check that there is enough "RAM" Ram type memory left */
+ ._user_heap_stack :
+ {
+ . = ALIGN(8);
+ PROVIDE ( end = . );
+ PROVIDE ( _end = . );
+ . = . + _Min_Heap_Size;
+ . = . + _Min_Stack_Size;
+ . = ALIGN(8);
+ } >RAM
+
+ /* Remove information from the compiler libraries */
+ /DISCARD/ :
+ {
+ libc.a ( * )
+ libm.a ( * )
+ libgcc.a ( * )
+ }
+
+ .ARM.attributes 0 : { *(.ARM.attributes) }
+}
diff --git a/variants/STM32F0xx/F030R8Tx/variant_DISCO_F030R8.cpp b/variants/STM32F0xx/F030R8Tx/variant_DISCO_F030R8.cpp
new file mode 100644
index 0000000000..de3176759f
--- /dev/null
+++ b/variants/STM32F0xx/F030R8Tx/variant_DISCO_F030R8.cpp
@@ -0,0 +1,142 @@
+/*
+ *******************************************************************************
+ * Copyright (c) 2021, STMicroelectronics
+ * All rights reserved.
+ *
+ * This software component is licensed by ST under BSD 3-Clause license,
+ * the "License"; You may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at:
+ * opensource.org/licenses/BSD-3-Clause
+ *
+ *******************************************************************************
+ */
+#if defined(ARDUINO_DISCO_F030R8)
+
+#include "pins_arduino.h"
+
+// Digital PinName array
+const PinName digitalPin[] = {
+ //P1 connector Right side (bottom view)
+ PC_13,
+ PC_14,
+ PC_15,
+ PF_0,
+ PF_1,
+ PC_0,
+ PC_1,
+ PC_2,
+ PC_3,
+ PA_0,
+ PA_1,
+ PA_2,
+ PA_3,
+ PF_4,
+ PF_5,
+ PA_4,
+ PA_5,
+ PA_6,
+ PA_7,
+ PC_4,
+ PC_5,
+ PB_0,
+ PB_1,
+ PB_2,
+ PB_10,
+ PB_11,
+ PB_12,
+ //P2 connector Left side (bottom view)
+ PB_9,
+ PB_8,
+ PB_7,
+ PB_6,
+ PB_5,
+ PB_4,
+ PB_3,
+ PD_2,
+ PC_12,
+ PC_11,
+ PC_10,
+ PA_15,
+ PA_14,
+ PF_7,
+ PF_6,
+ PA_13,
+ PA_12,
+ PA_11,
+ PA_10,
+ PA_9,
+ PA_8,
+ PC_9,
+ PC_8,
+ PC_7,
+ PC_6,
+ PB_15,
+ PB_14,
+ PB_13
+};
+
+// Analog (Ax) pin number array
+const uint32_t analogInputPin[] = {
+ 5, //A0 = D5
+ 6, //A1 = D6
+ 7, //A2 = D7
+ 8, //A3 = D8
+ 9, //A4 = D9
+ 10, //A5 = D10
+ 11, //A6 = D11
+ 12, //A7 = D12
+ 15, //A8 = D15
+ 16, //A9 = D16
+ 17, //A10 = D17
+ 18, //A11 = D18
+ 19, //A12 = D19
+ 20, //A13 = D20
+ 21, //A14 = D21
+ 22 //A15 = D22
+};
+
+// ----------------------------------------------------------------------------
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @brief System Clock Configuration
+ * @param None
+ * @retval None
+ */
+WEAK void SystemClock_Config(void)
+{
+ RCC_OscInitTypeDef RCC_OscInitStruct = {};
+ RCC_ClkInitTypeDef RCC_ClkInitStruct = {};
+ /*
+ * Initializes the RCC Oscillators according to the specified parameters
+ * in the RCC_OscInitTypeDef structure.
+ */
+ RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
+ RCC_OscInitStruct.HSIState = RCC_HSI_ON;
+ RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
+ RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
+ RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
+ RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL12;
+ RCC_OscInitStruct.PLL.PREDIV = RCC_PREDIV_DIV1;
+ if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) {
+ Error_Handler();
+ }
+ /* Initializes the CPU, AHB and APB buses clocks */
+ RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK
+ | RCC_CLOCKTYPE_PCLK1;
+ RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
+ RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
+ RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
+
+ if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1) != HAL_OK) {
+ Error_Handler();
+ }
+}
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* ARDUINO_DISCO_F030R8 */
diff --git a/variants/STM32F0xx/F030R8Tx/variant_DISCO_F030R8.h b/variants/STM32F0xx/F030R8Tx/variant_DISCO_F030R8.h
new file mode 100644
index 0000000000..19a007b6e0
--- /dev/null
+++ b/variants/STM32F0xx/F030R8Tx/variant_DISCO_F030R8.h
@@ -0,0 +1,181 @@
+/*
+ *******************************************************************************
+ * Copyright (c) 2021, STMicroelectronics
+ * All rights reserved.
+ *
+ * This software component is licensed by ST under BSD 3-Clause license,
+ * the "License"; You may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at:
+ * opensource.org/licenses/BSD-3-Clause
+ *
+ *******************************************************************************
+ */
+#pragma once
+
+/*----------------------------------------------------------------------------
+ * STM32 pins number
+ *----------------------------------------------------------------------------*/
+
+// P1 connector Right side (bottom view)
+#define PC13 0
+#define PC14 1
+#define PC15 2
+#define PF0 3
+#define PF1 4
+#define PC0 A0
+#define PC1 A1
+#define PC2 A2
+#define PC3 A3
+#define PA0 A4 // USER_BTN
+#define PA1 A5
+#define PA2 A6
+#define PA3 A7
+#define PF4 13
+#define PF5 14
+#define PA4 A8
+#define PA5 A9
+#define PA6 A10
+#define PA7 A11
+#define PC4 A12
+#define PC5 A13
+#define PB0 A14
+#define PB1 A15
+#define PB2 23
+#define PB10 24
+#define PB11 25
+#define PB12 26
+// P2 connector Left side (bottom view)
+#define PB9 27
+#define PB8 28
+#define PB7 29
+#define PB6 30
+#define PB5 31
+#define PB4 32
+#define PB3 33
+#define PD2 34
+#define PC12 35
+#define PC11 36
+#define PC10 37
+#define PA15 38
+#define PA14 39
+#define PF7 40
+#define PF6 41
+#define PA13 42
+#define PA12 43
+#define PA11 44
+#define PA10 45
+#define PA9 46
+#define PA8 47
+#define PC9 48 // LED_GREEN (LD3)
+#define PC8 49 // LED_BLUE (LD4)
+#define PC7 50
+#define PC6 51
+#define PB15 52
+#define PB14 53
+#define PB13 54
+
+// Alternate pins number
+#define PA6_ALT1 (PA6 | ALT1)
+#define PA7_ALT1 (PA7 | ALT1)
+#define PA7_ALT2 (PA7 | ALT2)
+#define PA7_ALT3 (PA7 | ALT3)
+#define PB0_ALT1 (PB0 | ALT1)
+#define PB1_ALT1 (PB1 | ALT1)
+#define PB1_ALT2 (PB1 | ALT2)
+#define PB14_ALT1 (PB14 | ALT1)
+#define PB15_ALT1 (PB15 | ALT1)
+#define PB15_ALT2 (PB15 | ALT2)
+
+#define NUM_DIGITAL_PINS 55
+#define NUM_ANALOG_INPUTS 16
+
+// On-board LED pin number
+#ifndef LED_BUILTIN
+ #define LED_BUILTIN PC9 // LD3
+#endif
+#define LED_GREEN LED_BUILTIN
+#define LED_BLUE PC8 // LD4
+
+// On-board user button
+#ifndef USER_BTN
+ #define USER_BTN PA0
+#endif
+
+// SPI definitions
+// SPI1 is used
+#ifndef PIN_SPI_SS
+ #define PIN_SPI_SS PA4
+#endif
+#ifndef PIN_SPI_SS1
+ #define PIN_SPI_SS1 PC4
+#endif
+#ifndef PIN_SPI_SS2
+ #define PIN_SPI_SS2 PB12
+#endif
+#ifndef PIN_SPI_SS3
+ #define PIN_SPI_SS3 PC6
+#endif
+#ifndef PIN_SPI_MOSI
+ #define PIN_SPI_MOSI PA7
+#endif
+#ifndef PIN_SPI_MISO
+ #define PIN_SPI_MISO PA6
+#endif
+#ifndef PIN_SPI_SCK
+ #define PIN_SPI_SCK PA5
+#endif
+
+// I2C definitions
+// I2C1 is used
+#ifndef PIN_WIRE_SDA
+ #define PIN_WIRE_SDA PB9
+#endif
+#ifndef PIN_WIRE_SCL
+ #define PIN_WIRE_SCL PB8
+#endif
+
+// Timer Definitions
+// Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin
+#ifndef TIMER_TONE
+ #define TIMER_TONE TIM6
+#endif
+#ifndef TIMER_SERVO
+ #define TIMER_SERVO TIM14
+#endif
+
+// UART Definitions
+#ifndef SERIAL_UART_INSTANCE
+ #define SERIAL_UART_INSTANCE 1
+#endif
+
+// Mandatory for Firmata
+#ifndef PIN_SERIAL_RX
+ #define PIN_SERIAL_RX PA10
+#endif
+#ifndef PIN_SERIAL_TX
+ #define PIN_SERIAL_TX PA9
+#endif
+
+/*----------------------------------------------------------------------------
+ * Arduino objects - C++ only
+ *----------------------------------------------------------------------------*/
+
+#ifdef __cplusplus
+ // These serial port names are intended to allow libraries and architecture-neutral
+ // sketches to automatically default to the correct port name for a particular type
+ // of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
+ // the first hardware serial port whose RX/TX pins are not dedicated to another use.
+ //
+ // SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
+ //
+ // SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
+ //
+ // SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
+ //
+ // SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
+ //
+ // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
+ // pins are NOT connected to anything by default.
+ #define SERIAL_PORT_MONITOR Serial
+ #define SERIAL_PORT_HARDWARE Serial
+#endif
diff --git a/variants/STM32F0xx/F030R8Tx/variant_NUCLEO_F030R8.cpp b/variants/STM32F0xx/F030R8Tx/variant_NUCLEO_F030R8.cpp
new file mode 100644
index 0000000000..0ffe7697b1
--- /dev/null
+++ b/variants/STM32F0xx/F030R8Tx/variant_NUCLEO_F030R8.cpp
@@ -0,0 +1,144 @@
+/*
+ *******************************************************************************
+ * Copyright (c) 2021, STMicroelectronics
+ * All rights reserved.
+ *
+ * This software component is licensed by ST under BSD 3-Clause license,
+ * the "License"; You may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at:
+ * opensource.org/licenses/BSD-3-Clause
+ *
+ *******************************************************************************
+ */
+#if defined(ARDUINO_NUCLEO_F030R8)
+
+#include "pins_arduino.h"
+
+// Pin number
+const PinName digitalPin[] = {
+ PA_3,
+ PA_2,
+ PA_10,
+ PB_3,
+ PB_5,
+ PB_4,
+ PB_10,
+ PA_8,
+ PA_9,
+ PC_7,
+ PB_6,
+ PA_7,
+ PA_6,
+ PA_5,
+ PB_9,
+ PB_8,
+ // ST Morpho
+ // CN7 Left Side
+ PC_10,
+ PC_12,
+ PF_6,
+ PF_7,
+ PA_13,
+ PA_14,
+ PA_15,
+ PB_7,
+ PC_13,
+ PC_14,
+ PC_15,
+ PF_0,
+ PF_1,
+ PC_2,
+ PC_3,
+ // CN7 Right Side
+ PC_11,
+ PD_2,
+ // CN10 Left Side
+ PC_9,
+ // CN10 Right side
+ PC_8,
+ PC_6,
+ PC_5,
+ PA_12,
+ PA_11,
+ PB_12,
+ PB_11,
+ PB_2,
+ PB_1,
+ PB_15,
+ PB_14,
+ PB_13,
+ PC_4,
+ PF_5,
+ PF_4,
+ PA_0,
+ PA_1,
+ PA_4,
+ PB_0,
+ PC_1,
+ PC_0
+};
+
+// Analog (Ax) pin number array
+const uint32_t analogInputPin[] = {
+ 49, //A0
+ 50, //A1
+ 51, //A2
+ 52, //A3
+ 53, //A4
+ 54, //A5
+ 11, //A6
+ 12, //A7
+ 29, //A8
+ 30, //A9
+ 36, //A10
+ 46, //A11
+ 42, //A12
+ 13, //A13
+ 1, //A14
+ 0 //A15
+};
+
+// ----------------------------------------------------------------------------
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @brief System Clock Configuration
+ * @param None
+ * @retval None
+ */
+WEAK void SystemClock_Config(void)
+{
+ RCC_OscInitTypeDef RCC_OscInitStruct = {};
+ RCC_ClkInitTypeDef RCC_ClkInitStruct = {};
+ /*
+ * Initializes the RCC Oscillators according to the specified parameters
+ * in the RCC_OscInitTypeDef structure.
+ */
+ RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
+ RCC_OscInitStruct.HSEState = RCC_HSE_BYPASS;
+ RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
+ RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
+ RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL6;
+ RCC_OscInitStruct.PLL.PREDIV = RCC_PREDIV_DIV1;
+ if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) {
+ Error_Handler();
+ }
+ /* Initializes the CPU, AHB and APB buses clocks */
+ RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK
+ | RCC_CLOCKTYPE_PCLK1;
+ RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
+ RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
+ RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
+
+ if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1) != HAL_OK) {
+ Error_Handler();
+ }
+}
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* ARDUINO_NUCLEO_F030R8 */
diff --git a/variants/STM32F0xx/F030R8Tx/variant_NUCLEO_F030R8.h b/variants/STM32F0xx/F030R8Tx/variant_NUCLEO_F030R8.h
new file mode 100644
index 0000000000..ad8fcba385
--- /dev/null
+++ b/variants/STM32F0xx/F030R8Tx/variant_NUCLEO_F030R8.h
@@ -0,0 +1,151 @@
+/*
+ *******************************************************************************
+ * Copyright (c) 2021, STMicroelectronics
+ * All rights reserved.
+ *
+ * This software component is licensed by ST under BSD 3-Clause license,
+ * the "License"; You may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at:
+ * opensource.org/licenses/BSD-3-Clause
+ *
+ *******************************************************************************
+ */
+#pragma once
+
+/*----------------------------------------------------------------------------
+ * STM32 pins number
+ *----------------------------------------------------------------------------*/
+
+#define PA3 A15
+#define PA2 A14
+#define PA10 2
+#define PB3 3 // no PWM
+#define PB5 4
+#define PB4 5
+#define PB10 6 // no PWM
+#define PA8 7
+#define PA9 8
+#define PC7 9
+#define PB6 10
+#define PA7 A6
+#define PA6 A7
+#define PA5 A13
+#define PB9 14
+#define PB8 15
+// ST Morpho
+// CN7 Left Side
+#define PC10 16
+#define PC12 17
+#define PF6 18
+#define PF7 19
+#define PA13 20 // SWD
+#define PA14 21 // SWD
+#define PA15 22
+#define PB7 23
+#define PC13 24
+#define PC14 25
+#define PC15 26
+#define PF0 27
+#define PF1 28
+#define PC2 A8
+#define PC3 A9
+// CN7 Right Side
+#define PC11 31
+#define PD2 32
+// CN10 Left Side
+#define PC9 33
+// CN10 Right side
+#define PC8 34
+#define PC6 35
+#define PC5 A10
+#define PA12 37
+#define PA11 38
+#define PB12 39
+#define PB11 40
+#define PB2 41
+#define PB1 A12
+#define PB15 43
+#define PB14 44
+#define PB13 45
+#define PC4 A11
+#define PF5 47
+#define PF4 48
+#define PA0 A0
+#define PA1 A1
+#define PA4 A2
+#define PB0 A3
+#define PC1 A4
+#define PC0 A5
+
+// Alternate pins number
+#define PA6_ALT1 (PA6 | ALT1)
+#define PA7_ALT1 (PA7 | ALT1)
+#define PA7_ALT2 (PA7 | ALT2)
+#define PA7_ALT3 (PA7 | ALT3)
+#define PB0_ALT1 (PB0 | ALT1)
+#define PB1_ALT1 (PB1 | ALT1)
+#define PB1_ALT2 (PB1 | ALT2)
+#define PB14_ALT1 (PB14 | ALT1)
+#define PB15_ALT1 (PB15 | ALT1)
+#define PB15_ALT2 (PB15 | ALT2)
+
+#define NUM_DIGITAL_PINS 55
+#define NUM_ANALOG_INPUTS 16
+
+// On-board LED pin number
+#ifndef LED_BUILTIN
+ #define LED_BUILTIN PA5
+#endif
+#define LED_GREEN LED_BUILTIN
+
+// On-board user button
+#ifndef USER_BTN
+ #define USER_BTN PC13
+#endif
+
+// Timer Definitions
+// Use TIM6 when possible as servo and tone don't need GPIO output pin
+#ifndef TIMER_TONE
+ #define TIMER_TONE TIM6
+#endif
+#ifndef TIMER_SERVO
+ #define TIMER_SERVO TIM14
+#endif
+
+// UART Definitions
+#ifndef SERIAL_UART_INSTANCE
+ #define SERIAL_UART_INSTANCE 2 //Connected to ST-Link
+#endif
+
+// Default pin used for 'Serial' instance (ex: ST-Link)
+// Mandatory for Firmata
+#ifndef PIN_SERIAL_RX
+ #define PIN_SERIAL_RX PA3
+#endif
+#ifndef PIN_SERIAL_TX
+ #define PIN_SERIAL_TX PA2
+#endif
+
+/*----------------------------------------------------------------------------
+ * Arduino objects - C++ only
+ *----------------------------------------------------------------------------*/
+
+#ifdef __cplusplus
+ // These serial port names are intended to allow libraries and architecture-neutral
+ // sketches to automatically default to the correct port name for a particular type
+ // of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
+ // the first hardware serial port whose RX/TX pins are not dedicated to another use.
+ //
+ // SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
+ //
+ // SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
+ //
+ // SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
+ //
+ // SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
+ //
+ // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
+ // pins are NOT connected to anything by default.
+ #define SERIAL_PORT_MONITOR Serial
+ #define SERIAL_PORT_HARDWARE Serial
+#endif
diff --git a/variants/STM32F0xx/F031K6Tx/generic_clock.c b/variants/STM32F0xx/F031K6Tx/generic_clock.c
index 1e1a0783e3..26af09763e 100644
--- a/variants/STM32F0xx/F031K6Tx/generic_clock.c
+++ b/variants/STM32F0xx/F031K6Tx/generic_clock.c
@@ -20,8 +20,30 @@
*/
WEAK void SystemClock_Config(void)
{
- /* SystemClock_Config can be generated by STM32CubeMX */
-#warning "SystemClock_Config() is empty. Default clock at reset is used."
+ RCC_OscInitTypeDef RCC_OscInitStruct = {};
+ RCC_ClkInitTypeDef RCC_ClkInitStruct = {};
+
+ /** Initializes the RCC Oscillators according to the specified parameters
+ * in the RCC_OscInitTypeDef structure.
+ */
+ RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
+ RCC_OscInitStruct.HSIState = RCC_HSI_ON;
+ RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
+ RCC_OscInitStruct.PLL.PLLState = RCC_PLL_NONE;
+ if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) {
+ Error_Handler();
+ }
+ /** Initializes the CPU, AHB and APB buses clocks
+ */
+ RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK
+ | RCC_CLOCKTYPE_PCLK1;
+ RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_HSI;
+ RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
+ RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
+
+ if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_0) != HAL_OK) {
+ Error_Handler();
+ }
}
#endif /* ARDUINO_GENERIC_* */
diff --git a/variants/STM32F0xx/NUCLEO_F031K6/ldscript.ld b/variants/STM32F0xx/F031K6Tx/ldscript.ld
similarity index 89%
rename from variants/STM32F0xx/NUCLEO_F031K6/ldscript.ld
rename to variants/STM32F0xx/F031K6Tx/ldscript.ld
index 4e18fdd09d..ee4d20076b 100644
--- a/variants/STM32F0xx/NUCLEO_F031K6/ldscript.ld
+++ b/variants/STM32F0xx/F031K6Tx/ldscript.ld
@@ -2,7 +2,7 @@
******************************************************************************
* @file LinkerScript.ld
* @author Auto-generated by STM32CubeIDE
- * Abstract : Linker script for NUCLEO-F031K6 Board embedding STM32F031K6Tx Device from stm32f0 series
+ * @brief Linker script for STM32F031K6Tx Device from STM32F0 series
* 32Kbytes FLASH
* 4Kbytes RAM
*
@@ -30,14 +30,14 @@ ENTRY(Reset_Handler)
/* Highest address of the user mode stack */
_estack = ORIGIN(RAM) + LENGTH(RAM); /* end of "RAM" Ram type memory */
-_Min_Heap_Size = 0x200 ; /* required amount of heap */
-_Min_Stack_Size = 0x400 ; /* required amount of stack */
+_Min_Heap_Size = 0x200; /* required amount of heap */
+_Min_Stack_Size = 0x400; /* required amount of stack */
/* Memories definition */
MEMORY
{
- RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 4K
- FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 32K
+ RAM (xrw) : ORIGIN = 0x20000000, LENGTH = LD_MAX_DATA_SIZE
+ FLASH (rx) : ORIGIN = 0x8000000+ LD_FLASH_OFFSET, LENGTH = LD_MAX_SIZE - LD_FLASH_OFFSET
}
/* Sections */
@@ -77,12 +77,12 @@ SECTIONS
. = ALIGN(4);
} >FLASH
- .ARM.extab : {
+ .ARM.extab : {
. = ALIGN(4);
*(.ARM.extab* .gnu.linkonce.armextab.*)
. = ALIGN(4);
} >FLASH
-
+
.ARM : {
. = ALIGN(4);
__exidx_start = .;
@@ -99,7 +99,7 @@ SECTIONS
PROVIDE_HIDDEN (__preinit_array_end = .);
. = ALIGN(4);
} >FLASH
-
+
.init_array :
{
. = ALIGN(4);
@@ -109,7 +109,7 @@ SECTIONS
PROVIDE_HIDDEN (__init_array_end = .);
. = ALIGN(4);
} >FLASH
-
+
.fini_array :
{
. = ALIGN(4);
@@ -124,16 +124,18 @@ SECTIONS
_sidata = LOADADDR(.data);
/* Initialized data sections into "RAM" Ram type memory */
- .data :
+ .data :
{
. = ALIGN(4);
_sdata = .; /* create a global symbol at data start */
*(.data) /* .data sections */
*(.data*) /* .data* sections */
+ *(.RamFunc) /* .RamFunc sections */
+ *(.RamFunc*) /* .RamFunc* sections */
. = ALIGN(4);
_edata = .; /* define a global symbol at data end */
-
+
} >RAM AT> FLASH
/* Uninitialized data section into "RAM" Ram type memory */
diff --git a/variants/STM32F0xx/F031K6Tx/variant_NUCLEO_F031K6.cpp b/variants/STM32F0xx/F031K6Tx/variant_NUCLEO_F031K6.cpp
new file mode 100644
index 0000000000..7d6b8ddd1a
--- /dev/null
+++ b/variants/STM32F0xx/F031K6Tx/variant_NUCLEO_F031K6.cpp
@@ -0,0 +1,101 @@
+/*
+ *******************************************************************************
+ * Copyright (c) 2021, STMicroelectronics
+ * All rights reserved.
+ *
+ * This software component is licensed by ST under BSD 3-Clause license,
+ * the "License"; You may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at:
+ * opensource.org/licenses/BSD-3-Clause
+ *
+ *******************************************************************************
+ */
+#if defined(ARDUINO_NUCLEO_F031K6)
+#include "pins_arduino.h"
+
+// Pin number
+const PinName digitalPin[] = {
+ PA_10,
+ PA_9,
+ PA_12,
+ PB_0,
+ PB_7,
+ PB_6,
+ PB_1,
+ PF_0,
+ PF_1,
+ PA_8,
+ PA_11,
+ PB_5,
+ PB_4,
+ PB_3,
+ PA_0,
+ PA_1,
+ PA_3,
+ PA_4,
+ PA_5,
+ PA_6,
+ PA_7,
+ PA_2,
+ PA_15
+};
+
+// Analog (Ax) pin number array
+const uint32_t analogInputPin[] = {
+ 14, // A0
+ 15, // A1
+ 16, // A2
+ 17, // A3
+ 18, // A4
+ 19, // A5
+ 20, // A6
+ 21, // A7
+ 3, // A8
+ 6 // A9
+};
+
+// ----------------------------------------------------------------------------
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @brief System Clock Configuration
+ * @param None
+ * @retval None
+ */
+WEAK void SystemClock_Config(void)
+{
+ RCC_OscInitTypeDef RCC_OscInitStruct = {};
+ RCC_ClkInitTypeDef RCC_ClkInitStruct = {};
+
+ /*
+ * Initializes the RCC Oscillators according to the specified parameters
+ * in the RCC_OscInitTypeDef structure.
+ */
+ RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
+ RCC_OscInitStruct.HSEState = RCC_HSE_BYPASS;
+ RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
+ RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
+ RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL6;
+ RCC_OscInitStruct.PLL.PREDIV = RCC_PREDIV_DIV1;
+ if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) {
+ Error_Handler();
+ }
+ /* Initializes the CPU, AHB and APB buses clocks */
+ RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK
+ | RCC_CLOCKTYPE_PCLK1;
+ RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
+ RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
+ RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
+
+ if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1) != HAL_OK) {
+ Error_Handler();
+ }
+}
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* ARDUINO_NUCLEO_F031K6 */
diff --git a/variants/STM32F0xx/F031K6Tx/variant_NUCLEO_F031K6.h b/variants/STM32F0xx/F031K6Tx/variant_NUCLEO_F031K6.h
new file mode 100644
index 0000000000..26e4122e56
--- /dev/null
+++ b/variants/STM32F0xx/F031K6Tx/variant_NUCLEO_F031K6.h
@@ -0,0 +1,121 @@
+/*
+ *******************************************************************************
+ * Copyright (c) 2021, STMicroelectronics
+ * All rights reserved.
+ *
+ * This software component is licensed by ST under BSD 3-Clause license,
+ * the "License"; You may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at:
+ * opensource.org/licenses/BSD-3-Clause
+ *
+ *******************************************************************************
+ */
+#pragma once
+
+/*----------------------------------------------------------------------------
+ * STM32 pins number
+ *----------------------------------------------------------------------------*/
+#define PA10 0
+#define PA9 1
+#define PA12 2 // no PWM
+#define PB0 A8
+#define PB7 4
+#define PB6 5
+#define PB1 A9
+#define PF0 7 // no PWM
+#define PF1 8 // no PWM
+#define PA8 9
+#define PA11 10
+#define PB5 11
+#define PB4 12
+#define PB3 13 // LED
+#define PA0 A0
+#define PA1 A1
+#define PA3 A2
+#define PA4 A3
+#define PA5 A4
+#define PA6 A5
+#define PA7 A6
+#define PA2 A7 // SB2 ON STLink Tx
+#define PA15 22 // STLink Rx
+// #define PA13 23 // SWDIO
+// #define PA14 24 // SWCLK
+
+// Alternate pins number
+#define PA6_ALT1 (PA6 | ALT1)
+#define PA7_ALT1 (PA7 | ALT1)
+#define PA7_ALT2 (PA7 | ALT2)
+#define PA7_ALT3 (PA7 | ALT3)
+#define PB0_ALT1 (PB0 | ALT1)
+#define PB1_ALT1 (PB1 | ALT1)
+#define PB1_ALT2 (PB1 | ALT2)
+
+#define NUM_DIGITAL_PINS 23
+#define NUM_ANALOG_INPUTS 10
+
+// On-board LED pin number
+#ifndef LED_BUILTIN
+ #define LED_BUILTIN PB3
+#endif
+#ifndef LED_GREEN
+ #define LED_GREEN LED_BUILTIN
+#endif
+
+// On-board user button
+#ifndef USER_BTN
+ #define USER_BTN PB0
+#endif
+
+// I2C Definitions
+#ifndef PIN_WIRE_SDA
+ #define PIN_WIRE_SDA PB7
+#endif
+#ifndef PIN_WIRE_SCL
+ #define PIN_WIRE_SCL PB6
+#endif
+
+// Timer Definitions
+#ifndef TIMER_TONE
+ #define TIMER_TONE TIM14
+#endif
+#ifndef TIMER_SERVO
+ #define TIMER_SERVO TIM16
+#endif
+
+// UART Definitions
+#ifndef SERIAL_UART_INSTANCE
+ #define SERIAL_UART_INSTANCE 1 //Connected to ST-Link
+#endif
+
+// Default pin used for 'Serial' instance (ex: ST-Link)
+// Mandatory for Firmata
+#ifndef PIN_SERIAL_RX
+ #define PIN_SERIAL_RX PA15
+#endif
+#ifndef PIN_SERIAL_TX
+ #define PIN_SERIAL_TX PA2
+#endif
+
+/*----------------------------------------------------------------------------
+ * Arduino objects - C++ only
+ *----------------------------------------------------------------------------*/
+
+#ifdef __cplusplus
+ // These serial port names are intended to allow libraries and architecture-neutral
+ // sketches to automatically default to the correct port name for a particular type
+ // of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
+ // the first hardware serial port whose RX/TX pins are not dedicated to another use.
+ //
+ // SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
+ //
+ // SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
+ //
+ // SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
+ //
+ // SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
+ //
+ // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
+ // pins are NOT connected to anything by default.
+ #define SERIAL_PORT_MONITOR Serial
+ #define SERIAL_PORT_HARDWARE Serial
+#endif
diff --git a/variants/STM32F0xx/F051K6Ux_F051K8Ux/PeripheralPins_WRAITH32_V1.c b/variants/STM32F0xx/F051K6Ux_F051K8Ux/PeripheralPins_WRAITH32_V1.c
new file mode 100644
index 0000000000..950e69397d
--- /dev/null
+++ b/variants/STM32F0xx/F051K6Ux_F051K8Ux/PeripheralPins_WRAITH32_V1.c
@@ -0,0 +1,193 @@
+/*
+ *******************************************************************************
+ * Copyright (c) 2021, STMicroelectronics
+ * All rights reserved.
+ *
+ * This software component is licensed by ST under BSD 3-Clause license,
+ * the "License"; You may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at:
+ * opensource.org/licenses/BSD-3-Clause
+ *
+ *******************************************************************************
+ * Automatically generated from STM32F051K6Ux.xml
+ */
+#if defined(ARDUINO_WRAITH32_V1)
+#include "Arduino.h"
+#include "PeripheralPins.h"
+
+/* =====
+ * Notes:
+ * - The pins mentioned Px_y_ALTz are alternative possibilities which use other
+ * HW peripheral instances. You can use them the same way as any other "normal"
+ * pin (i.e. analogWrite(PA7_ALT1, 128);).
+ *
+ * - Commented lines are alternative possibilities which are not used per default.
+ * If you change them, you will have to know what you do
+ * =====
+ */
+
+//*** ADC ***
+
+#ifdef HAL_ADC_MODULE_ENABLED
+WEAK const PinMap PinMap_ADC[] = {
+ {PA_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC_IN0
+ {PA_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC_IN1
+ // {PA_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC_IN2 - RC Input
+ {PA_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC_IN3
+ {PA_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC_IN4
+ {PA_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC_IN5
+ {PA_6, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC_IN6
+ {PA_7, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC_IN7
+ // {PB_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC_IN8
+ // {PB_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC_IN9
+ {NC, NP, 0}
+};
+#endif
+
+//*** DAC ***
+
+#ifdef HAL_DAC_MODULE_ENABLED
+WEAK const PinMap PinMap_DAC[] = {
+ {PA_4, DAC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // DAC1_OUT1
+ {NC, NP, 0}
+};
+#endif
+
+//*** I2C ***
+
+#ifdef HAL_I2C_MODULE_ENABLED
+WEAK const PinMap PinMap_I2C_SDA[] = {
+ {PB_7, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
+ {NC, NP, 0}
+};
+#endif
+
+#ifdef HAL_I2C_MODULE_ENABLED
+WEAK const PinMap PinMap_I2C_SCL[] = {
+ {PB_6, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
+ {PB_8, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
+ {NC, NP, 0}
+};
+#endif
+
+//*** TIM ***
+
+#ifdef HAL_TIM_MODULE_ENABLED
+WEAK const PinMap PinMap_TIM[] = {
+ {PA_0, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 1, 0)}, // TIM2_CH1
+ {PA_1, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 2, 0)}, // TIM2_CH2
+ // {PA_2, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 3, 0)}, // TIM2_CH3
+ // PA_2_ALT1, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM15, 1, 0)}, // TIM15_CH1
+ {PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 4, 0)}, // TIM2_CH4
+ {PA_3_ALT1, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM15, 2, 0)}, // TIM15_CH2
+ {PA_4, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM14, 1, 0)}, // TIM14_CH1
+ {PA_5, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 1, 0)}, // TIM2_CH1
+ {PA_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 1, 0)}, // TIM3_CH1
+ {PA_6_ALT1, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM16, 1, 0)}, // TIM16_CH1
+ // {PA_7, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 1, 1)}, // TIM1_CH1N - C_FET_LO
+ // {PA_7_ALT1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 2, 0)}, // TIM3_CH2 - C_FET_LO
+ // {PA_7_ALT2, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM14, 1, 0)}, // TIM14_CH1 - C_FET_LO
+ // {PA_7_ALT3, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM17, 1, 0)}, // TIM17_CH1 - C_FET_LO
+ // {PA_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 1, 0)}, // TIM1_CH1 - B_FET_HI
+ // {PA_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 2, 0)}, // TIM1_CH2 - A_FET_LO
+ // {PA_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 3, 0)}, // TIM1_CH3 - A_FET_HI
+ {PA_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 4, 0)}, // TIM1_CH4
+ // {PA_15, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 1, 0)}, // TIM2_CH1 - LED_RED
+ // {PB_0, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 2, 1)}, // TIM1_CH2N - C_FET_HI
+ // {PB_0_ALT1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 3, 0)}, // TIM3_CH3 - C_FET_HI
+ // {PB_1, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 3, 1)}, // TIM1_CH3N - B_FET_LO
+ // {PB_1_ALT1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 4, 0)}, // TIM3_CH4 - B_FET_LO
+ // {PB_1_ALT2, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM14, 1, 0)}, // TIM14_CH1 - B_FET_LO
+ // {PB_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 2, 0)}, // TIM2_CH2 - LED_GREEN
+ // {PB_4, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 1, 0)}, // TIM3_CH1 - LED_BLUE
+ {PB_5, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 2, 0)}, // TIM3_CH2
+ {PB_6, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM16, 1, 1)}, // TIM16_CH1N
+ {PB_7, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM17, 1, 1)}, // TIM17_CH1N
+ {PB_8, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM16, 1, 0)}, // TIM16_CH1
+ {NC, NP, 0}
+};
+#endif
+
+//*** UART ***
+
+#ifdef HAL_UART_MODULE_ENABLED
+WEAK const PinMap PinMap_UART_TX[] = {
+ // {PA_2, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
+ // {PA_9, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
+ // {PA_14, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
+ {PB_6, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART1)},
+ {NC, NP, 0}
+};
+#endif
+
+#ifdef HAL_UART_MODULE_ENABLED
+WEAK const PinMap PinMap_UART_RX[] = {
+ // {PA_3, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
+ // {PA_10, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
+ {PA_15, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
+ {PB_7, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART1)},
+ {NC, NP, 0}
+};
+#endif
+
+#ifdef HAL_UART_MODULE_ENABLED
+WEAK const PinMap PinMap_UART_RTS[] = {
+ {PA_1, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
+ {PA_12, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
+ {NC, NP, 0}
+};
+#endif
+
+#ifdef HAL_UART_MODULE_ENABLED
+WEAK const PinMap PinMap_UART_CTS[] = {
+ {PA_0, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
+ {PA_11, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
+ {NC, NP, 0}
+};
+#endif
+
+//*** SPI ***
+
+#ifdef HAL_SPI_MODULE_ENABLED
+WEAK const PinMap PinMap_SPI_MOSI[] = {
+ {PA_7, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
+ {PB_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
+ {NC, NP, 0}
+};
+#endif
+
+#ifdef HAL_SPI_MODULE_ENABLED
+WEAK const PinMap PinMap_SPI_MISO[] = {
+ {PA_6, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
+ {PB_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
+ {NC, NP, 0}
+};
+#endif
+
+#ifdef HAL_SPI_MODULE_ENABLED
+WEAK const PinMap PinMap_SPI_SCLK[] = {
+ {PA_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
+ {PB_3, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
+ {NC, NP, 0}
+};
+#endif
+
+#ifdef HAL_SPI_MODULE_ENABLED
+WEAK const PinMap PinMap_SPI_SSEL[] = {
+ {PA_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
+ {PA_15, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
+ {NC, NP, 0}
+};
+#endif
+
+//*** No CAN ***
+
+//*** No ETHERNET ***
+
+//*** No QUADSPI ***
+
+//*** No USB ***
+
+//*** No SD ***
+
+#endif /* ARDUINO_WRAITH32_V1 */
diff --git a/variants/STM32F0xx/F051K6Ux_F051K8Ux/generic_clock.c b/variants/STM32F0xx/F051K6Ux_F051K8Ux/generic_clock.c
index eda34bfcec..98eac189fa 100644
--- a/variants/STM32F0xx/F051K6Ux_F051K8Ux/generic_clock.c
+++ b/variants/STM32F0xx/F051K6Ux_F051K8Ux/generic_clock.c
@@ -20,8 +20,33 @@
*/
WEAK void SystemClock_Config(void)
{
- /* SystemClock_Config can be generated by STM32CubeMX */
-#warning "SystemClock_Config() is empty. Default clock at reset is used."
+ RCC_OscInitTypeDef RCC_OscInitStruct = {};
+ RCC_ClkInitTypeDef RCC_ClkInitStruct = {};
+
+ /** Initializes the RCC Oscillators according to the specified parameters
+ * in the RCC_OscInitTypeDef structure.
+ */
+ RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
+ RCC_OscInitStruct.HSIState = RCC_HSI_ON;
+ RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
+ RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
+ RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
+ RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL12;
+ RCC_OscInitStruct.PLL.PREDIV = RCC_PREDIV_DIV1;
+ if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) {
+ Error_Handler();
+ }
+ /** Initializes the CPU, AHB and APB buses clocks
+ */
+ RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK
+ | RCC_CLOCKTYPE_PCLK1;
+ RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
+ RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
+ RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
+
+ if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1) != HAL_OK) {
+ Error_Handler();
+ }
}
#endif /* ARDUINO_GENERIC_* */
diff --git a/variants/STM32F0xx/F051K6Ux_F051K8Ux/ldscript.ld b/variants/STM32F0xx/F051K6Ux_F051K8Ux/ldscript.ld
new file mode 100644
index 0000000000..17fb2c953d
--- /dev/null
+++ b/variants/STM32F0xx/F051K6Ux_F051K8Ux/ldscript.ld
@@ -0,0 +1,177 @@
+/**
+ ******************************************************************************
+ * @file LinkerScript.ld
+ * @author Auto-generated by STM32CubeIDE
+ * @brief Linker script for STM32F051K6Ux Device from STM32F0 series
+ * 32Kbytes FLASH
+ * 8Kbytes RAM
+ *
+ * Set heap size, stack size and stack location according
+ * to application requirements.
+ *
+ * Set memory bank area and size if external memory is used
+ ******************************************************************************
+ * @attention
+ *
+ * © Copyright (c) 2020 STMicroelectronics.
+ * All rights reserved.
+ *
+ * This software component is licensed by ST under BSD 3-Clause license,
+ * the "License"; You may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at:
+ * opensource.org/licenses/BSD-3-Clause
+ *
+ ******************************************************************************
+ */
+
+/* Entry Point */
+ENTRY(Reset_Handler)
+
+/* Highest address of the user mode stack */
+_estack = ORIGIN(RAM) + LENGTH(RAM); /* end of "RAM" Ram type memory */
+
+_Min_Heap_Size = 0x200; /* required amount of heap */
+_Min_Stack_Size = 0x400; /* required amount of stack */
+
+/* Memories definition */
+MEMORY
+{
+ RAM (xrw) : ORIGIN = 0x20000000, LENGTH = LD_MAX_DATA_SIZE
+ FLASH (rx) : ORIGIN = 0x8000000 + LD_FLASH_OFFSET, LENGTH = LD_MAX_SIZE - LD_FLASH_OFFSET
+}
+
+/* Sections */
+SECTIONS
+{
+ /* The startup code into "FLASH" Rom type memory */
+ .isr_vector :
+ {
+ . = ALIGN(4);
+ KEEP(*(.isr_vector)) /* Startup code */
+ . = ALIGN(4);
+ } >FLASH
+
+ /* The program code and other data into "FLASH" Rom type memory */
+ .text :
+ {
+ . = ALIGN(4);
+ *(.text) /* .text sections (code) */
+ *(.text*) /* .text* sections (code) */
+ *(.glue_7) /* glue arm to thumb code */
+ *(.glue_7t) /* glue thumb to arm code */
+ *(.eh_frame)
+
+ KEEP (*(.init))
+ KEEP (*(.fini))
+
+ . = ALIGN(4);
+ _etext = .; /* define a global symbols at end of code */
+ } >FLASH
+
+ /* Constant data into "FLASH" Rom type memory */
+ .rodata :
+ {
+ . = ALIGN(4);
+ *(.rodata) /* .rodata sections (constants, strings, etc.) */
+ *(.rodata*) /* .rodata* sections (constants, strings, etc.) */
+ . = ALIGN(4);
+ } >FLASH
+
+ .ARM.extab : {
+ . = ALIGN(4);
+ *(.ARM.extab* .gnu.linkonce.armextab.*)
+ . = ALIGN(4);
+ } >FLASH
+
+ .ARM : {
+ . = ALIGN(4);
+ __exidx_start = .;
+ *(.ARM.exidx*)
+ __exidx_end = .;
+ . = ALIGN(4);
+ } >FLASH
+
+ .preinit_array :
+ {
+ . = ALIGN(4);
+ PROVIDE_HIDDEN (__preinit_array_start = .);
+ KEEP (*(.preinit_array*))
+ PROVIDE_HIDDEN (__preinit_array_end = .);
+ . = ALIGN(4);
+ } >FLASH
+
+ .init_array :
+ {
+ . = ALIGN(4);
+ PROVIDE_HIDDEN (__init_array_start = .);
+ KEEP (*(SORT(.init_array.*)))
+ KEEP (*(.init_array*))
+ PROVIDE_HIDDEN (__init_array_end = .);
+ . = ALIGN(4);
+ } >FLASH
+
+ .fini_array :
+ {
+ . = ALIGN(4);
+ PROVIDE_HIDDEN (__fini_array_start = .);
+ KEEP (*(SORT(.fini_array.*)))
+ KEEP (*(.fini_array*))
+ PROVIDE_HIDDEN (__fini_array_end = .);
+ . = ALIGN(4);
+ } >FLASH
+
+ /* Used by the startup to initialize data */
+ _sidata = LOADADDR(.data);
+
+ /* Initialized data sections into "RAM" Ram type memory */
+ .data :
+ {
+ . = ALIGN(4);
+ _sdata = .; /* create a global symbol at data start */
+ *(.data) /* .data sections */
+ *(.data*) /* .data* sections */
+ *(.RamFunc) /* .RamFunc sections */
+ *(.RamFunc*) /* .RamFunc* sections */
+
+ . = ALIGN(4);
+ _edata = .; /* define a global symbol at data end */
+
+ } >RAM AT> FLASH
+
+ /* Uninitialized data section into "RAM" Ram type memory */
+ . = ALIGN(4);
+ .bss :
+ {
+ /* This is used by the startup in order to initialize the .bss section */
+ _sbss = .; /* define a global symbol at bss start */
+ __bss_start__ = _sbss;
+ *(.bss)
+ *(.bss*)
+ *(COMMON)
+
+ . = ALIGN(4);
+ _ebss = .; /* define a global symbol at bss end */
+ __bss_end__ = _ebss;
+ } >RAM
+
+ /* User_heap_stack section, used to check that there is enough "RAM" Ram type memory left */
+ ._user_heap_stack :
+ {
+ . = ALIGN(8);
+ PROVIDE ( end = . );
+ PROVIDE ( _end = . );
+ . = . + _Min_Heap_Size;
+ . = . + _Min_Stack_Size;
+ . = ALIGN(8);
+ } >RAM
+
+ /* Remove information from the compiler libraries */
+ /DISCARD/ :
+ {
+ libc.a ( * )
+ libm.a ( * )
+ libgcc.a ( * )
+ }
+
+ .ARM.attributes 0 : { *(.ARM.attributes) }
+}
diff --git a/variants/STM32F0xx/WRAITH32_F051K6/readme.txt b/variants/STM32F0xx/F051K6Ux_F051K8Ux/readme_WRAITH32_V1.txt
similarity index 100%
rename from variants/STM32F0xx/WRAITH32_F051K6/readme.txt
rename to variants/STM32F0xx/F051K6Ux_F051K8Ux/readme_WRAITH32_V1.txt
diff --git a/variants/STM32F0xx/F051K6Ux_F051K8Ux/variant_WRAITH32_V1.cpp b/variants/STM32F0xx/F051K6Ux_F051K8Ux/variant_WRAITH32_V1.cpp
new file mode 100644
index 0000000000..4c3569e759
--- /dev/null
+++ b/variants/STM32F0xx/F051K6Ux_F051K8Ux/variant_WRAITH32_V1.cpp
@@ -0,0 +1,110 @@
+/*
+ *******************************************************************************
+ * Copyright (c) 2021, STMicroelectronics
+ * All rights reserved.
+ *
+ * This software component is licensed by ST under BSD 3-Clause license,
+ * the "License"; You may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at:
+ * opensource.org/licenses/BSD-3-Clause
+ *
+ *******************************************************************************
+ */
+#if defined(ARDUINO_WRAITH32_V1)
+#include "pins_arduino.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// Pin number
+const PinName digitalPin[] = {
+ PA_10,
+ PA_9,
+ PA_12,
+ PB_0,
+ PB_7,
+ PB_6,
+ PB_1,
+ PF_0,
+ PF_1,
+ PA_8,
+ PA_11,
+ PB_5,
+ PB_4,
+ PB_3,
+ PA_0,
+ PA_1,
+ PA_3,
+ PA_4,
+ PA_5,
+ PA_6,
+ PA_7,
+ PA_2,
+ PA_15
+};
+
+// Analog (Ax) pin number array
+const uint32_t analogInputPin[] = {
+ 14, // A0
+ 15, // A1
+ 16, // A2
+ 17, // A3
+ 18, // A4
+ 19, // A5
+ 20 // A6
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+// ----------------------------------------------------------------------------
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @brief System Clock Configuration
+ * @param None
+ * @retval None
+ */
+WEAK void SystemClock_Config(void)
+{
+ RCC_OscInitTypeDef RCC_OscInitStruct = {};
+ RCC_ClkInitTypeDef RCC_ClkInitStruct = {};
+
+ /*
+ * Initializes the RCC Oscillators according to the specified parameters
+ * in the RCC_OscInitTypeDef structure.
+ */
+ RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI | RCC_OSCILLATORTYPE_HSI14
+ | RCC_OSCILLATORTYPE_LSI;
+ RCC_OscInitStruct.HSIState = RCC_HSI_ON;
+ RCC_OscInitStruct.HSI14State = RCC_HSI14_ON;
+ RCC_OscInitStruct.HSICalibrationValue = 16;
+ RCC_OscInitStruct.HSI14CalibrationValue = 16;
+ RCC_OscInitStruct.LSIState = RCC_LSI_ON;
+ RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
+ RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
+ RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL12;
+ RCC_OscInitStruct.PLL.PREDIV = RCC_PREDIV_DIV1;
+ while (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) {
+ Error_Handler();
+ }
+ /* Initializes the CPU, AHB and APB buses clocks */
+ RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK
+ | RCC_CLOCKTYPE_PCLK1;
+ RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
+ RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
+ RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
+ while (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1) != HAL_OK) {
+ Error_Handler();
+ }
+}
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* ARDUINO_WRAITH32_V1 */
diff --git a/variants/STM32F0xx/F051K6Ux_F051K8Ux/variant_WRAITH32_V1.h b/variants/STM32F0xx/F051K6Ux_F051K8Ux/variant_WRAITH32_V1.h
new file mode 100644
index 0000000000..6aa2eb0a81
--- /dev/null
+++ b/variants/STM32F0xx/F051K6Ux_F051K8Ux/variant_WRAITH32_V1.h
@@ -0,0 +1,125 @@
+/*
+ *******************************************************************************
+ * Copyright (c) 2021, STMicroelectronics
+ * All rights reserved.
+ *
+ * This software component is licensed by ST under BSD 3-Clause license,
+ * the "License"; You may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at:
+ * opensource.org/licenses/BSD-3-Clause
+ *
+ *******************************************************************************
+ */
+#pragma once
+
+/*----------------------------------------------------------------------------
+ * Pins
+ *----------------------------------------------------------------------------*/
+
+#define PA10 0
+#define PA9 1
+#define PA12 2
+#define PB0 3
+#define PB7 4 // RX, SDA
+#define PB6 5 // TX, SCL
+#define PB1 6
+#define PF0 7
+#define PF1 8
+#define PA8 9
+#define PA11 10
+#define PB5 11
+#define PB4 12 // LED_BLUE
+#define PB3 13 // LED_GREEN
+#define PA0 A0
+#define PA1 A1
+#define PA3 A2
+#define PA4 A3
+#define PA5 A4
+#define PA6 A5
+#define PA7 A6
+#define PA2 21 // RC Input
+#define PA15 22 // LED_RED
+// Pins not defined
+// PA13, PA14, PB2, PB8
+
+// Alternate pins number
+#define PA2_ALT1 (PA2 | ALT1)
+#define PA3_ALT1 (PA3 | ALT1)
+#define PA6_ALT1 (PA6 | ALT1)
+#define PA7_ALT1 (PA7 | ALT1)
+#define PA7_ALT2 (PA7 | ALT2)
+#define PA7_ALT3 (PA7 | ALT3)
+#define PB0_ALT1 (PB0 | ALT1)
+#define PB1_ALT1 (PB1 | ALT1)
+#define PB1_ALT2 (PB1 | ALT2)
+
+#define NUM_DIGITAL_PINS 23
+#define NUM_ANALOG_INPUTS 7
+
+// On-board LED pin number
+#ifndef LED_BUILTIN
+ #define LED_BUILTIN PB3
+#endif
+#define LED_GREEN LED_BUILTIN
+#define LED_BLUE PB4
+#define LED_RED PA15
+
+// On-board user button
+#ifndef USER_BTN
+ #define USER_BTN ND
+#endif
+
+// I2C Definitions
+#ifndef PIN_WIRE_SDA
+ #define PIN_WIRE_SDA PB7
+#endif
+#ifndef PIN_WIRE_SCL
+ #define PIN_WIRE_SCL PB6
+#endif
+
+// Timer Definitions
+#ifndef TIMER_SERVO
+ #define TIMER_SERVO TIM6
+#endif
+
+// UART Definitions
+#ifndef SERIAL_UART_INSTANCE
+ #define SERIAL_UART_INSTANCE 2
+#endif
+
+// Serial Pin Firmata
+#ifndef PIN_SERIAL_RX
+ #define PIN_SERIAL_RX PB7
+#endif
+#ifndef PIN_SERIAL_TX
+ #define PIN_SERIAL_TX PB6
+#endif
+
+/* Extra HAL modules */
+#if !defined(HAL_DAC_MODULE_DISABLED)
+ #define HAL_DAC_MODULE_ENABLED
+#endif
+
+/*----------------------------------------------------------------------------
+ * Arduino objects - C++ only
+ *----------------------------------------------------------------------------*/
+
+#ifdef __cplusplus
+ // These serial port names are intended to allow libraries and architecture-neutral
+ // sketches to automatically default to the correct port name for a particular type
+ // of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
+ // the first hardware serial port whose RX/TX pins are not dedicated to another use.
+ //
+ // SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
+ //
+ // SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
+ //
+ // SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
+ //
+ // SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
+ //
+ // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
+ // pins are NOT connected to anything by default.
+ #define SERIAL_PORT_MONITOR Serial
+ #define SERIAL_PORT_HARDWARE Serial
+#endif
diff --git a/variants/STM32F0xx/MALYANMx00_F070CB/ldscript.ld b/variants/STM32F0xx/F070CBTx/MALYANMx00_F070CB.ld
similarity index 97%
rename from variants/STM32F0xx/MALYANMx00_F070CB/ldscript.ld
rename to variants/STM32F0xx/F070CBTx/MALYANMx00_F070CB.ld
index 30b43db4c6..30c10e9b03 100644
--- a/variants/STM32F0xx/MALYANMx00_F070CB/ldscript.ld
+++ b/variants/STM32F0xx/F070CBTx/MALYANMx00_F070CB.ld
@@ -10,7 +10,7 @@ _Min_Stack_Size = 0x400;; /* required amount of stack */
/* Specify the memory areas */
MEMORY
{
-FLASH (rx) : ORIGIN = 0x08002000, LENGTH = 120K
+FLASH (rx) : ORIGIN = 0x08000000 + LD_FLASH_OFFSET, LENGTH = LD_MAX_SIZE - LD_FLASH_OFFSET
VTRAM (xrw) : ORIGIN = 0x20000000, LENGTH = 0xC0
RAM (xrw) : ORIGIN = 0x200000C0, LENGTH = 15K - 0xC0
}
diff --git a/variants/STM32F0xx/F070CBTx/generic_clock.c b/variants/STM32F0xx/F070CBTx/generic_clock.c
index 3b37c2d657..d066642e0a 100644
--- a/variants/STM32F0xx/F070CBTx/generic_clock.c
+++ b/variants/STM32F0xx/F070CBTx/generic_clock.c
@@ -20,8 +20,40 @@
*/
WEAK void SystemClock_Config(void)
{
- /* SystemClock_Config can be generated by STM32CubeMX */
-#warning "SystemClock_Config() is empty. Default clock at reset is used."
+ RCC_OscInitTypeDef RCC_OscInitStruct = {};
+ RCC_ClkInitTypeDef RCC_ClkInitStruct = {};
+ RCC_PeriphCLKInitTypeDef PeriphClkInit = {};
+
+ /** Initializes the RCC Oscillators according to the specified parameters
+ * in the RCC_OscInitTypeDef structure.
+ */
+ RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
+ RCC_OscInitStruct.HSIState = RCC_HSI_ON;
+ RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
+ RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
+ RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
+ RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL6;
+ RCC_OscInitStruct.PLL.PREDIV = RCC_PREDIV_DIV1;
+ if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) {
+ Error_Handler();
+ }
+ /** Initializes the CPU, AHB and APB buses clocks
+ */
+ RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK
+ | RCC_CLOCKTYPE_PCLK1;
+ RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
+ RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
+ RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
+
+ if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1) != HAL_OK) {
+ Error_Handler();
+ }
+ PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_USB;
+ PeriphClkInit.UsbClockSelection = RCC_USBCLKSOURCE_PLL;
+
+ if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) != HAL_OK) {
+ Error_Handler();
+ }
}
#endif /* ARDUINO_GENERIC_* */
diff --git a/variants/STM32F0xx/PYBSTICK26_DUINO/ldscript.ld b/variants/STM32F0xx/F070CBTx/ldscript.ld
similarity index 96%
rename from variants/STM32F0xx/PYBSTICK26_DUINO/ldscript.ld
rename to variants/STM32F0xx/F070CBTx/ldscript.ld
index afab235ad9..d35e001a34 100644
--- a/variants/STM32F0xx/PYBSTICK26_DUINO/ldscript.ld
+++ b/variants/STM32F0xx/F070CBTx/ldscript.ld
@@ -2,7 +2,7 @@
******************************************************************************
* @file LinkerScript.ld
* @author Auto-generated by STM32CubeIDE
- * @brief Linker script for STM32F072RBHx Device from STM32F0 series
+ * @brief Linker script for STM32F070CBTx Device from STM32F0 series
* 128Kbytes FLASH
* 16Kbytes RAM
*
@@ -130,6 +130,8 @@ SECTIONS
_sdata = .; /* create a global symbol at data start */
*(.data) /* .data sections */
*(.data*) /* .data* sections */
+ *(.RamFunc) /* .RamFunc sections */
+ *(.RamFunc*) /* .RamFunc* sections */
. = ALIGN(4);
_edata = .; /* define a global symbol at data end */
diff --git a/variants/STM32F0xx/MALYANMx00_F070CB/startup_Mx00_f070xb.S b/variants/STM32F0xx/F070CBTx/startup_Mx00_f070xb.S
similarity index 100%
rename from variants/STM32F0xx/MALYANMx00_F070CB/startup_Mx00_f070xb.S
rename to variants/STM32F0xx/F070CBTx/startup_Mx00_f070xb.S
diff --git a/variants/STM32F0xx/MALYANMx00_F070CB/variant_MALYANMx00_F070CB.cpp b/variants/STM32F0xx/F070CBTx/variant_MALYANMx00_F070CB.cpp
similarity index 63%
rename from variants/STM32F0xx/MALYANMx00_F070CB/variant_MALYANMx00_F070CB.cpp
rename to variants/STM32F0xx/F070CBTx/variant_MALYANMx00_F070CB.cpp
index c4da778ae4..99f3b47a04 100644
--- a/variants/STM32F0xx/MALYANMx00_F070CB/variant_MALYANMx00_F070CB.cpp
+++ b/variants/STM32F0xx/F070CBTx/variant_MALYANMx00_F070CB.cpp
@@ -1,39 +1,20 @@
/*
*******************************************************************************
- * Copyright (c) 2018, STMicroelectronics
+ * Copyright (c) 2021, STMicroelectronics
* All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
+ * This software component is licensed by ST under BSD 3-Clause license,
+ * the "License"; You may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at:
+ * opensource.org/licenses/BSD-3-Clause
*
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * 3. Neither the name of STMicroelectronics nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*******************************************************************************
*/
+#if defined(ARDUINO_MALYANM200_F070CB) || defined(ARDUINO_MALYANM300_F070CB)
+
#include "pins_arduino.h"
#include
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/**Firmware starts at address different than 0*/
/* figure out how to derive this from the LD script */
#define FW_START_ADDR 0x08002000
@@ -45,42 +26,44 @@ volatile uint32_t ram_vector_table[48] __attribute__((section(".RAMVectorTable")
const PinName digitalPin[] = {
/* USB connector on the top, MCU side */
/* Left Side */
- PB_9, //D0
- PB_8, //D1
- PB_7, //D2
- PB_6, //D3
- PB_5, //D4
- PB_4, //D5
- PB_3, //D6
- PA_15, //D7
- PA_12, //D8 - USB DP
- PA_11, //D9 - USB DM
- PA_10, //D10
- PA_9, //D11
- PA_8, //D12
- PB_15, //D13
- PB_14, //D14
- PB_13, //D15
- PB_12, //D16
+ PB_9,
+ PB_8,
+ PB_7,
+ PB_6,
+ PB_5,
+ PB_4,
+ PB_3,
+ PA_15,
+ PA_12,
+ PA_11,
+ PA_10,
+ PA_9,
+ PA_8,
+ PB_15,
+ PB_14,
+ PB_13,
+ PB_12,
/* Right side */
- PC_13, //D17 - LED
- PC_14, //D18
- PC_15, //D19
- PA_0, //D20/A0
- PA_1, //D21/A1
- PA_2, //D22/A2
- PA_3, //D23/A3
- PA_4, //D24/A4
- PA_5, //D25/A5
- PA_6, //D26/A6
- PA_7, //D27/A7
- PB_0, //D28/A8
- PB_1, //D29/A9
- PB_10, //D30
- PB_11, //D31
- PB_2, //D32 - BOOT1
- PA_13, //D33 - SWDI0
- PA_14, //D34 - SWCLK
+ PC_13,
+ PC_14,
+ PC_15,
+ PA_0,
+ PA_1,
+ PA_2,
+ PA_3,
+ PA_4,
+ PA_5,
+ PA_6,
+ PA_7,
+ PB_0,
+ PB_1,
+ PB_10,
+ PB_11,
+ PB_2,
+ PA_13,
+ PA_14,
+ PF_0,
+ PF_1
};
// Analog (Ax) pin number array
@@ -97,10 +80,6 @@ const uint32_t analogInputPin[] = {
29 // A9
};
-#ifdef __cplusplus
-}
-#endif
-
// ----------------------------------------------------------------------------
#ifdef __cplusplus
@@ -184,3 +163,4 @@ WEAK void SystemClock_Config(void)
#ifdef __cplusplus
}
#endif
+#endif /* ARDUINO_MALYANMx00_F070CB */
diff --git a/variants/STM32F0xx/MALYANMx00_F070CB/variant_MALYANMx00_F070CB.h b/variants/STM32F0xx/F070CBTx/variant_MALYANMx00_F070CB.h
similarity index 52%
rename from variants/STM32F0xx/MALYANMx00_F070CB/variant_MALYANMx00_F070CB.h
rename to variants/STM32F0xx/F070CBTx/variant_MALYANMx00_F070CB.h
index 311a406a8c..0d0d8ebe1a 100644
--- a/variants/STM32F0xx/MALYANMx00_F070CB/variant_MALYANMx00_F070CB.h
+++ b/variants/STM32F0xx/F070CBTx/variant_MALYANMx00_F070CB.h
@@ -1,38 +1,16 @@
/*
*******************************************************************************
- * Copyright (c) 2018, STMicroelectronics
+ * Copyright (c) 2021, STMicroelectronics
* All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
+ * This software component is licensed by ST under BSD 3-Clause license,
+ * the "License"; You may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at:
+ * opensource.org/licenses/BSD-3-Clause
*
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * 3. Neither the name of STMicroelectronics nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*******************************************************************************
*/
-#ifndef _VARIANT_ARDUINO_STM32_
-#define _VARIANT_ARDUINO_STM32_
-
-#ifdef __cplusplus
-extern "C" {
-#endif // __cplusplus
+#pragma once
/*----------------------------------------------------------------------------
* Pin M200 M300
@@ -65,70 +43,82 @@ extern "C" {
// USB connector on the top, MCU side
// Left Side
-#define PB9 0
-#define PB8 1
-#define PB7 2
-#define PB6 3
-#define PB5 4
-#define PB4 5
-#define PB3 6
-#define PA15 7
-#define PA12 8 // USB DP
-#define PA11 9 // USB DM
-#define PA10 10
-#define PA9 11
-#define PA8 12
-#define PB15 13
-#define PB14 14
-#define PB13 15
-#define PB12 16
+#define PB9 0
+#define PB8 1
+#define PB7 2
+#define PB6 3
+#define PB5 4
+#define PB4 5
+#define PB3 6
+#define PA15 7
+#define PA12 8 // USB DP
+#define PA11 9 // USB DM
+#define PA10 10
+#define PA9 11
+#define PA8 12
+#define PB15 13
+#define PB14 14
+#define PB13 15
+#define PB12 16
// Right side
-#define PC13 17
-#define PC14 18
-#define PC15 19
-#define PA0 A0
-#define PA1 A1
-#define PA2 A2
-#define PA3 A3
-#define PA4 A4
-#define PA5 A5
-#define PA6 A6
-#define PA7 A7
-#define PB0 A8
-#define PB1 A9
-#define PB10 30
-#define PB11 31
+#define PC13 17
+#define PC14 18
+#define PC15 19
+#define PA0 A0
+#define PA1 A1
+#define PA2 A2
+#define PA3 A3
+#define PA4 A4
+#define PA5 A5
+#define PA6 A6
+#define PA7 A7
+#define PB0 A8
+#define PB1 A9
+#define PB10 30
+#define PB11 31
// Other
-#define PB2 32 // BOOT1
-#define PA13 33 // SWDI0
-#define PA14 34 // SWCLK
+#define PB2 32 // BOOT1
+#define PA13 33 // SWDI0
+#define PA14 34 // SWCLK
+#define PF0 35
+#define PF1 36
+
+// Alternate pins number
+#define PA6_ALT1 (PA6 | ALT1)
+#define PA7_ALT1 (PA7 | ALT1)
+#define PA7_ALT2 (PA7 | ALT2)
+#define PA7_ALT3 (PA7 | ALT3)
+#define PB0_ALT1 (PB0 | ALT1)
+#define PB1_ALT1 (PB1 | ALT1)
+#define PB1_ALT2 (PB1 | ALT2)
+#define PB14_ALT1 (PB14 | ALT1)
+#define PB15_ALT1 (PB15 | ALT1)
+#define PB15_ALT2 (PB15 | ALT2)
-// This must be a literal
-#define NUM_DIGITAL_PINS 35
-// This must be a literal with a value less than or equal to to MAX_ANALOG_INPUTS
+#define NUM_DIGITAL_PINS 37
#define NUM_ANALOG_INPUTS 10
// On-board LED pin number
#ifdef ARDUINO_MALYANM200_F070CB
-#define LED_GREEN PC13
+ #define LED_GREEN PC13
#else // MALYANM300_F070CB
-#define LED_RED PB15
-#define LED_GREEN PB8
-#define LED_BLUE PB9
+ #define LED_RED PB15
+ #define LED_GREEN PB8
+ #define LED_BLUE PB9
#endif
#define LED_BUILTIN LED_GREEN
// SPI Definitions
#ifdef ARDUINO_MALYANM200_F070CB
-#define PIN_SPI_SS PA4
-#define PIN_SPI_MOSI PA7
-#define PIN_SPI_MISO PA6
-#define PIN_SPI_SCK PA5
+ #define PIN_SPI_SS PA4
+ #define PIN_SPI_MOSI PA7
+ #define PIN_SPI_MISO PA6
+ #define PIN_SPI_SCK PA5
#else // MALYANM300_F070CB
-#define PIN_SPI_SS PB6
-#define PIN_SPI_MOSI PB5
-#define PIN_SPI_MISO PB4
-#define PIN_SPI_SCK PB3
+ #define PIN_SPI_SS PB6
+ #define PIN_SPI_MOSI PB5
+ #define PIN_SPI_MISO PB4
+ #define PIN_SPI_SCK PB3
#endif
// I2C Definitions
@@ -147,9 +137,6 @@ extern "C" {
#define PIN_SERIAL_RX PA10
#define PIN_SERIAL_TX PA9
-#ifdef __cplusplus
-} // extern "C"
-#endif
/*----------------------------------------------------------------------------
* Arduino objects - C++ only
*----------------------------------------------------------------------------*/
@@ -173,5 +160,3 @@ extern "C" {
#define SERIAL_PORT_MONITOR Serial
#define SERIAL_PORT_HARDWARE Serial1
#endif
-
-#endif /* _VARIANT_ARDUINO_STM32_ */
diff --git a/variants/STM32F0xx/F072C(8-B)_F072CBYx/PeripheralPins_ELEKTOR_F072Cx.c b/variants/STM32F0xx/F072C(8-B)_F072CBYx/PeripheralPins_ELEKTOR_F072Cx.c
new file mode 100644
index 0000000000..dc58b129aa
--- /dev/null
+++ b/variants/STM32F0xx/F072C(8-B)_F072CBYx/PeripheralPins_ELEKTOR_F072Cx.c
@@ -0,0 +1,252 @@
+/*
+ *******************************************************************************
+ * Copyright (c) 2021, STMicroelectronics
+ * All rights reserved.
+ *
+ * This software component is licensed by ST under BSD 3-Clause license,
+ * the "License"; You may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at:
+ * opensource.org/licenses/BSD-3-Clause
+ *
+ *******************************************************************************
+ */
+/*
+ * Automatically generated from STM32F072C(8-B)Ux.xml
+ * CubeMX DB release 6.0.10
+ */
+#if defined(ARDUINO_ELEKTOR_F072C8) || defined(ARDUINO_ELEKTOR_F072CB)
+#include "Arduino.h"
+#include "PeripheralPins.h"
+
+/* =====
+ * Notes:
+ * - The pins mentioned Px_y_ALTz are alternative possibilities which use other
+ * HW peripheral instances. You can use them the same way as any other "normal"
+ * pin (i.e. analogWrite(PA7_ALT1, 128);).
+ *
+ * - Commented lines are alternative possibilities which are not used per default.
+ * If you change them, you will have to know what you do
+ * =====
+ */
+
+//*** ADC ***
+
+#ifdef HAL_ADC_MODULE_ENABLED
+WEAK const PinMap PinMap_ADC[] = {
+ {PA_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC_IN0
+ {PA_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC_IN1
+ {PA_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC_IN2
+ {PA_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC_IN3
+ {PA_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC_IN4
+ {PA_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC_IN5
+ {PA_6, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC_IN6
+ {PA_7, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC_IN7
+ {PB_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC_IN8
+ {PB_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC_IN9
+ {NC, NP, 0}
+};
+#endif
+
+//*** DAC ***
+
+#ifdef HAL_DAC_MODULE_ENABLED
+WEAK const PinMap PinMap_DAC[] = {
+ {PA_4, DAC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // DAC_OUT1
+ {PA_5, DAC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // DAC_OUT2
+ {NC, NP, 0}
+};
+#endif
+
+//*** I2C ***
+
+#ifdef HAL_I2C_MODULE_ENABLED
+WEAK const PinMap PinMap_I2C_SDA[] = {
+ {PB_7, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
+ {PB_9, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
+ {PB_11, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C2)},
+ {PB_14, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF5_I2C2)},
+ {NC, NP, 0}
+};
+#endif
+
+#ifdef HAL_I2C_MODULE_ENABLED
+WEAK const PinMap PinMap_I2C_SCL[] = {
+ {PB_6, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
+ {PB_8, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
+ {PB_10, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C2)},
+ {PB_13, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF5_I2C2)},
+ {NC, NP, 0}
+};
+#endif
+
+//*** TIM ***
+
+#ifdef HAL_TIM_MODULE_ENABLED
+WEAK const PinMap PinMap_TIM[] = {
+ {PA_0, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 1, 0)}, // TIM2_CH1
+ {PA_1, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 2, 0)}, // TIM2_CH2
+ {PA_1_ALT1, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM15, 1, 1)}, // TIM15_CH1N
+ {PA_2, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 3, 0)}, // TIM2_CH3
+ {PA_2_ALT1, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM15, 1, 0)}, // TIM15_CH1
+ {PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 4, 0)}, // TIM2_CH4
+ {PA_3_ALT1, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM15, 2, 0)}, // TIM15_CH2
+ {PA_4, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM14, 1, 0)}, // TIM14_CH1
+ {PA_5, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 1, 0)}, // TIM2_CH1
+ {PA_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 1, 0)}, // TIM3_CH1
+ {PA_6_ALT1, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM16, 1, 0)}, // TIM16_CH1
+ {PA_7, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 1, 1)}, // TIM1_CH1N
+ {PA_7_ALT1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 2, 0)}, // TIM3_CH2
+ {PA_7_ALT2, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM14, 1, 0)}, // TIM14_CH1
+ {PA_7_ALT3, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM17, 1, 0)}, // TIM17_CH1
+ {PA_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 1, 0)}, // TIM1_CH1
+ {PA_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 2, 0)}, // TIM1_CH2
+ {PA_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 3, 0)}, // TIM1_CH3
+ {PA_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 4, 0)}, // TIM1_CH4
+ {PA_15, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 1, 0)}, // TIM2_CH1
+ {PB_0, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 2, 1)}, // TIM1_CH2N
+ {PB_0_ALT1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 3, 0)}, // TIM3_CH3
+ {PB_1, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 3, 1)}, // TIM1_CH3N
+ {PB_1_ALT1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 4, 0)}, // TIM3_CH4
+ {PB_1_ALT2, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM14, 1, 0)}, // TIM14_CH1
+ {PB_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 2, 0)}, // TIM2_CH2
+ {PB_4, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 1, 0)}, // TIM3_CH1
+ {PB_5, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 2, 0)}, // TIM3_CH2
+ {PB_6, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM16, 1, 1)}, // TIM16_CH1N
+ {PB_7, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM17, 1, 1)}, // TIM17_CH1N
+ {PB_8, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM16, 1, 0)}, // TIM16_CH1
+ {PB_9, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM17, 1, 0)}, // TIM17_CH1
+ {PB_10, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 3, 0)}, // TIM2_CH3
+ {PB_11, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 4, 0)}, // TIM2_CH4
+ {PB_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 1, 1)}, // TIM1_CH1N
+ {PB_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 2, 1)}, // TIM1_CH2N
+ {PB_14_ALT1, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM15, 1, 0)}, // TIM15_CH1
+ {PB_15, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 3, 1)}, // TIM1_CH3N
+ {PB_15_ALT1, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM15, 1, 1)}, // TIM15_CH1N
+ {PB_15_ALT2, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM15, 2, 0)}, // TIM15_CH2
+ {NC, NP, 0}
+};
+#endif
+
+//*** UART ***
+
+#ifdef HAL_UART_MODULE_ENABLED
+WEAK const PinMap PinMap_UART_TX[] = {
+ {PA_0, USART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART4)},
+ {PA_2, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
+ {PA_9, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
+ {PA_14, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
+ {PB_6, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART1)},
+ {PB_10, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
+ {NC, NP, 0}
+};
+#endif
+
+#ifdef HAL_UART_MODULE_ENABLED
+WEAK const PinMap PinMap_UART_RX[] = {
+ {PA_1, USART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART4)},
+ {PA_3, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
+ {PA_10, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
+ {PA_15, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
+ {PB_7, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART1)},
+ {PB_11, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
+ {NC, NP, 0}
+};
+#endif
+
+#ifdef HAL_UART_MODULE_ENABLED
+WEAK const PinMap PinMap_UART_RTS[] = {
+ {PA_1, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
+ {PA_12, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
+ {PA_15, USART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART4)},
+ {PB_1, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
+ {PB_14, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
+ {NC, NP, 0}
+};
+#endif
+
+#ifdef HAL_UART_MODULE_ENABLED
+WEAK const PinMap PinMap_UART_CTS[] = {
+ {PA_0, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
+ {PA_6, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
+ {PA_11, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
+ {PB_7, USART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART4)},
+ {PB_13, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
+ {NC, NP, 0}
+};
+#endif
+
+//*** SPI ***
+
+#ifdef HAL_SPI_MODULE_ENABLED
+WEAK const PinMap PinMap_SPI_MOSI[] = {
+ {PA_7, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
+ {PB_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
+ {PB_15, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
+ {NC, NP, 0}
+};
+#endif
+
+#ifdef HAL_SPI_MODULE_ENABLED
+WEAK const PinMap PinMap_SPI_MISO[] = {
+ {PA_6, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
+ {PB_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
+ {PB_14, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
+ {NC, NP, 0}
+};
+#endif
+
+#ifdef HAL_SPI_MODULE_ENABLED
+WEAK const PinMap PinMap_SPI_SCLK[] = {
+ {PA_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
+ {PB_3, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
+ {PB_10, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)},
+ {PB_13, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
+ {NC, NP, 0}
+};
+#endif
+
+#ifdef HAL_SPI_MODULE_ENABLED
+WEAK const PinMap PinMap_SPI_SSEL[] = {
+ {PA_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
+ {PA_15, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
+ {PB_9, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)},
+ {PB_12, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
+ {NC, NP, 0}
+};
+#endif
+
+//*** CAN ***
+
+#ifdef HAL_CAN_MODULE_ENABLED
+WEAK const PinMap PinMap_CAN_RD[] = {
+ {PA_11, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF4_CAN)},
+ {PB_8, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF4_CAN)},
+ {NC, NP, 0}
+};
+#endif
+
+#ifdef HAL_CAN_MODULE_ENABLED
+WEAK const PinMap PinMap_CAN_TD[] = {
+ {PA_12, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF4_CAN)},
+ {PB_9, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF4_CAN)},
+ {NC, NP, 0}
+};
+#endif
+
+//*** No ETHERNET ***
+
+//*** No QUADSPI ***
+
+//*** USB ***
+
+#if defined(HAL_PCD_MODULE_ENABLED) || defined(HAL_HCD_MODULE_ENABLED)
+WEAK const PinMap PinMap_USB[] = {
+ {PA_11, USB, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_DM
+ {PA_12, USB, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_DP
+ // {PA_13, USB, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_USB)}, // USB_NOE
+ {NC, NP, 0}
+};
+#endif
+
+//*** No SD ***
+#endif /* ARDUINO_ELEKTOR_F072x */
diff --git a/variants/STM32F0xx/F072C(8-B)_F072CBYx/generic_clock.c b/variants/STM32F0xx/F072C(8-B)_F072CBYx/generic_clock.c
index 8624f96c16..c02e82a26b 100644
--- a/variants/STM32F0xx/F072C(8-B)_F072CBYx/generic_clock.c
+++ b/variants/STM32F0xx/F072C(8-B)_F072CBYx/generic_clock.c
@@ -22,8 +22,36 @@
*/
WEAK void SystemClock_Config(void)
{
- /* SystemClock_Config can be generated by STM32CubeMX */
-#warning "SystemClock_Config() is empty. Default clock at reset is used."
+ RCC_OscInitTypeDef RCC_OscInitStruct = {};
+ RCC_ClkInitTypeDef RCC_ClkInitStruct = {};
+ RCC_PeriphCLKInitTypeDef PeriphClkInit = {};
+
+ /** Initializes the RCC Oscillators according to the specified parameters
+ * in the RCC_OscInitTypeDef structure.
+ */
+ RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI48;
+ RCC_OscInitStruct.HSI48State = RCC_HSI48_ON;
+ RCC_OscInitStruct.PLL.PLLState = RCC_PLL_NONE;
+ if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) {
+ Error_Handler();
+ }
+ /** Initializes the CPU, AHB and APB buses clocks
+ */
+ RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK
+ | RCC_CLOCKTYPE_PCLK1;
+ RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_HSI48;
+ RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
+ RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
+
+ if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1) != HAL_OK) {
+ Error_Handler();
+ }
+ PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_USB;
+ PeriphClkInit.UsbClockSelection = RCC_USBCLKSOURCE_HSI48;
+
+ if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) != HAL_OK) {
+ Error_Handler();
+ }
}
#endif /* ARDUINO_GENERIC_* */
diff --git a/variants/STM32F0xx/F072C(8-B)_F072CBYx/ldscript.ld b/variants/STM32F0xx/F072C(8-B)_F072CBYx/ldscript.ld
new file mode 100644
index 0000000000..cc61e5dc24
--- /dev/null
+++ b/variants/STM32F0xx/F072C(8-B)_F072CBYx/ldscript.ld
@@ -0,0 +1,177 @@
+/**
+ ******************************************************************************
+ * @file LinkerScript.ld
+ * @author Auto-generated by STM32CubeIDE
+ * @brief Linker script for STM32F072CBTx Device from STM32F0 series
+ * 128Kbytes FLASH
+ * 16Kbytes RAM
+ *
+ * Set heap size, stack size and stack location according
+ * to application requirements.
+ *
+ * Set memory bank area and size if external memory is used
+ ******************************************************************************
+ * @attention
+ *
+ * © Copyright (c) 2020 STMicroelectronics.
+ * All rights reserved.
+ *
+ * This software component is licensed by ST under BSD 3-Clause license,
+ * the "License"; You may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at:
+ * opensource.org/licenses/BSD-3-Clause
+ *
+ ******************************************************************************
+ */
+
+/* Entry Point */
+ENTRY(Reset_Handler)
+
+/* Highest address of the user mode stack */
+_estack = ORIGIN(RAM) + LENGTH(RAM); /* end of "RAM" Ram type memory */
+
+_Min_Heap_Size = 0x200; /* required amount of heap */
+_Min_Stack_Size = 0x400; /* required amount of stack */
+
+/* Memories definition */
+MEMORY
+{
+ RAM (xrw) : ORIGIN = 0x20000000, LENGTH = LD_MAX_DATA_SIZE
+ FLASH (rx) : ORIGIN = 0x8000000 + LD_FLASH_OFFSET, LENGTH = LD_MAX_SIZE - LD_FLASH_OFFSET
+}
+
+/* Sections */
+SECTIONS
+{
+ /* The startup code into "FLASH" Rom type memory */
+ .isr_vector :
+ {
+ . = ALIGN(4);
+ KEEP(*(.isr_vector)) /* Startup code */
+ . = ALIGN(4);
+ } >FLASH
+
+ /* The program code and other data into "FLASH" Rom type memory */
+ .text :
+ {
+ . = ALIGN(4);
+ *(.text) /* .text sections (code) */
+ *(.text*) /* .text* sections (code) */
+ *(.glue_7) /* glue arm to thumb code */
+ *(.glue_7t) /* glue thumb to arm code */
+ *(.eh_frame)
+
+ KEEP (*(.init))
+ KEEP (*(.fini))
+
+ . = ALIGN(4);
+ _etext = .; /* define a global symbols at end of code */
+ } >FLASH
+
+ /* Constant data into "FLASH" Rom type memory */
+ .rodata :
+ {
+ . = ALIGN(4);
+ *(.rodata) /* .rodata sections (constants, strings, etc.) */
+ *(.rodata*) /* .rodata* sections (constants, strings, etc.) */
+ . = ALIGN(4);
+ } >FLASH
+
+ .ARM.extab : {
+ . = ALIGN(4);
+ *(.ARM.extab* .gnu.linkonce.armextab.*)
+ . = ALIGN(4);
+ } >FLASH
+
+ .ARM : {
+ . = ALIGN(4);
+ __exidx_start = .;
+ *(.ARM.exidx*)
+ __exidx_end = .;
+ . = ALIGN(4);
+ } >FLASH
+
+ .preinit_array :
+ {
+ . = ALIGN(4);
+ PROVIDE_HIDDEN (__preinit_array_start = .);
+ KEEP (*(.preinit_array*))
+ PROVIDE_HIDDEN (__preinit_array_end = .);
+ . = ALIGN(4);
+ } >FLASH
+
+ .init_array :
+ {
+ . = ALIGN(4);
+ PROVIDE_HIDDEN (__init_array_start = .);
+ KEEP (*(SORT(.init_array.*)))
+ KEEP (*(.init_array*))
+ PROVIDE_HIDDEN (__init_array_end = .);
+ . = ALIGN(4);
+ } >FLASH
+
+ .fini_array :
+ {
+ . = ALIGN(4);
+ PROVIDE_HIDDEN (__fini_array_start = .);
+ KEEP (*(SORT(.fini_array.*)))
+ KEEP (*(.fini_array*))
+ PROVIDE_HIDDEN (__fini_array_end = .);
+ . = ALIGN(4);
+ } >FLASH
+
+ /* Used by the startup to initialize data */
+ _sidata = LOADADDR(.data);
+
+ /* Initialized data sections into "RAM" Ram type memory */
+ .data :
+ {
+ . = ALIGN(4);
+ _sdata = .; /* create a global symbol at data start */
+ *(.data) /* .data sections */
+ *(.data*) /* .data* sections */
+ *(.RamFunc) /* .RamFunc sections */
+ *(.RamFunc*) /* .RamFunc* sections */
+
+ . = ALIGN(4);
+ _edata = .; /* define a global symbol at data end */
+
+ } >RAM AT> FLASH
+
+ /* Uninitialized data section into "RAM" Ram type memory */
+ . = ALIGN(4);
+ .bss :
+ {
+ /* This is used by the startup in order to initialize the .bss section */
+ _sbss = .; /* define a global symbol at bss start */
+ __bss_start__ = _sbss;
+ *(.bss)
+ *(.bss*)
+ *(COMMON)
+
+ . = ALIGN(4);
+ _ebss = .; /* define a global symbol at bss end */
+ __bss_end__ = _ebss;
+ } >RAM
+
+ /* User_heap_stack section, used to check that there is enough "RAM" Ram type memory left */
+ ._user_heap_stack :
+ {
+ . = ALIGN(8);
+ PROVIDE ( end = . );
+ PROVIDE ( _end = . );
+ . = . + _Min_Heap_Size;
+ . = . + _Min_Stack_Size;
+ . = ALIGN(8);
+ } >RAM
+
+ /* Remove information from the compiler libraries */
+ /DISCARD/ :
+ {
+ libc.a ( * )
+ libm.a ( * )
+ libgcc.a ( * )
+ }
+
+ .ARM.attributes 0 : { *(.ARM.attributes) }
+}
diff --git a/variants/STM32F0xx/F072C(8-B)_F072CBYx/variant_ELEKTOR_F072Cx.cpp b/variants/STM32F0xx/F072C(8-B)_F072CBYx/variant_ELEKTOR_F072Cx.cpp
new file mode 100644
index 0000000000..d59ae6edf3
--- /dev/null
+++ b/variants/STM32F0xx/F072C(8-B)_F072CBYx/variant_ELEKTOR_F072Cx.cpp
@@ -0,0 +1,99 @@
+#if defined(ARDUINO_ELEKTOR_F072C8) || defined(ARDUINO_ELEKTOR_F072CB)
+
+#include "pins_arduino.h"
+
+// Pin name
+const PinName digitalPin[] = {
+ PA_8,
+ PA_9,
+ PA_10,
+ PA_11,
+ PA_12,
+ PA_13,
+ PA_14,
+ PA_15,
+ PB_2,
+ PB_3,
+ PB_4,
+ PB_5,
+ PB_6,
+ PB_7,
+ PB_8,
+ PB_9,
+ PB_10,
+ PB_11,
+ PB_12,
+ PB_13,
+ PB_14,
+ PB_15,
+ PC_13,
+ PC_14,
+ PC_15,
+ PA_0,
+ PA_1,
+ PA_2,
+ PA_3,
+ PA_4,
+ PA_5,
+ PA_6,
+ PA_7,
+ PB_0,
+ PB_1,
+ PF_0,
+ PF_1
+};
+
+// Analog (Ax) pin number array
+const uint32_t analogInputPin[] = {
+ 25, // A0
+ 26, // A1
+ 27, // A2
+ 28, // A3
+ 29, // A4
+ 30, // A5
+ 31, // A6
+ 32, // A7
+ 33, // A8
+ 34 // A9
+};
+
+// ----------------------------------------------------------------------------
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @brief System Clock Configuration
+ * @param None
+ * @retval None
+ */
+WEAK void SystemClock_Config(void)
+{
+ RCC_OscInitTypeDef RCC_OscInitStruct = {};
+ RCC_ClkInitTypeDef RCC_ClkInitStruct = {};
+
+ /* Initializes the CPU, AHB and APB busses clocks */
+ RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
+ RCC_OscInitStruct.HSIState = RCC_HSI_ON;
+ RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
+ RCC_OscInitStruct.PLL.PLLState = RCC_PLL_NONE;
+ if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) {
+ Error_Handler();
+ }
+ /* Initializes the CPU, AHB and APB busses clocks */
+ RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK
+ | RCC_CLOCKTYPE_PCLK1;
+ RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_HSI;
+ RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
+ RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
+
+ if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_0) != HAL_OK) {
+ Error_Handler();
+ }
+}
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* ARDUINO_ELEKTOR_F072x */
diff --git a/variants/STM32F0xx/F072C(8-B)_F072CBYx/variant_ELEKTOR_F072Cx.h b/variants/STM32F0xx/F072C(8-B)_F072CBYx/variant_ELEKTOR_F072Cx.h
new file mode 100644
index 0000000000..7b9b95afe6
--- /dev/null
+++ b/variants/STM32F0xx/F072C(8-B)_F072CBYx/variant_ELEKTOR_F072Cx.h
@@ -0,0 +1,134 @@
+/*
+ *******************************************************************************
+ * Copyright (c) 2021, STMicroelectronics
+ * All rights reserved.
+ *
+ * This software component is licensed by ST under BSD 3-Clause license,
+ * the "License"; You may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at:
+ * opensource.org/licenses/BSD-3-Clause
+ *
+ *******************************************************************************
+ */
+#pragma once
+
+/*----------------------------------------------------------------------------
+ * STM32 pins number
+ *----------------------------------------------------------------------------*/
+
+#define PA8 0
+#define PA9 1
+#define PA10 2
+#define PA11 3
+#define PA12 4
+#define PA13 5
+#define PA14 6
+#define PA15 7
+#define PB2 8
+#define PB3 9
+#define PB4 10
+#define PB5 11
+#define PB6 12
+#define PB7 13
+#define PB8 14
+#define PB9 15
+#define PB10 16
+#define PB11 17
+#define PB12 18
+#define PB13 19
+#define PB14 20
+#define PB15 21
+#define PC13 22
+#define PC14 23
+#define PC15 24
+#define PA0 A0
+#define PA1 A1
+#define PA2 A2
+#define PA3 A3
+#define PA4 A4
+#define PA5 A5
+#define PA6 A6
+#define PA7 A7
+#define PB0 A8
+#define PB1 A9
+#define PF0 35
+#define PF1 36
+
+// Alternate pins number
+#define PA1_ALT1 (PA1 | ALT1)
+#define PA2_ALT1 (PA2 | ALT1)
+#define PA3_ALT1 (PA3 | ALT1)
+#define PA6_ALT1 (PA6 | ALT1)
+#define PA7_ALT1 (PA7 | ALT1)
+#define PA7_ALT2 (PA7 | ALT2)
+#define PA7_ALT3 (PA7 | ALT3)
+#define PB0_ALT1 (PB0 | ALT1)
+#define PB1_ALT1 (PB1 | ALT1)
+#define PB1_ALT2 (PB1 | ALT2)
+#define PB14_ALT1 (PB14 | ALT1)
+#define PB15_ALT1 (PB15 | ALT1)
+#define PB15_ALT2 (PB15 | ALT2)
+
+#define NUM_DIGITAL_PINS 37
+#define NUM_ANALOG_INPUTS 10
+
+// On-board LED pin number
+#define LED_BUILTIN PA15
+#define LED_RED LED_BUILTIN
+#define LED_GREEN PB3
+
+// SPI Definitions
+#define PIN_SPI_SS PA4
+#define PIN_SPI_MOSI PA7
+#define PIN_SPI_MISO PA6
+#define PIN_SPI_SCK PA5
+
+// I2C Definitions
+#define PIN_WIRE_SDA PB7
+#define PIN_WIRE_SCL PB6
+
+// Timer Definitions
+#define TIMER_TONE TIM3
+#define TIMER_SERVO TIM2
+
+// UART Definitions
+// Define here Serial instance number to map on Serial generic name
+#define SERIAL_UART_INSTANCE 1
+
+// Default pin used for 'Serial' instance
+// Mandatory for Firmata
+#define PIN_SERIAL_RX PA10
+#define PIN_SERIAL_TX PA9
+
+//Used for the GPS Module
+#define PIN_SERIAL2_TX PA2
+#define PIN_SERIAL2_RX PA3
+
+// Extra HAL modules
+#if !defined(HAL_DAC_MODULE_DISABLED)
+ #define HAL_DAC_MODULE_ENABLED
+#endif
+
+/*----------------------------------------------------------------------------
+ * Arduino objects - C++ only
+ *----------------------------------------------------------------------------*/
+
+#ifdef __cplusplus
+ // These serial port names are intended to allow libraries and architecture-neutral
+ // sketches to automatically default to the correct port name for a particular type
+ // of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
+ // the first hardware serial port whose RX/TX pins are not dedicated to another use.
+ //
+ // SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
+ //
+ // SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
+ //
+ // SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
+ //
+ // SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
+ //
+ // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
+ // pins are NOT connected to anything by default.
+ #define SERIAL_PORT_MONITOR Serial
+ #define SERIAL_PORT_HARDWARE Serial
+#endif
diff --git a/variants/STM32F0xx/F072R(8-B)Tx_F072RB/PeripheralPins_PYBSTICK26_DUINO.c b/variants/STM32F0xx/F072R(8-B)Tx_F072RB/PeripheralPins_PYBSTICK26_DUINO.c
new file mode 100644
index 0000000000..c4414eebf2
--- /dev/null
+++ b/variants/STM32F0xx/F072R(8-B)Tx_F072RB/PeripheralPins_PYBSTICK26_DUINO.c
@@ -0,0 +1,271 @@
+/*
+ *******************************************************************************
+ * Copyright (c) 2021, STMicroelectronics
+ * All rights reserved.
+ *
+ * This software component is licensed by ST under BSD 3-Clause license,
+ * the "License"; You may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at:
+ * opensource.org/licenses/BSD-3-Clause
+ *
+ *******************************************************************************
+ */
+/*
+ * Automatically generated from STM32F072R(8-B)Tx.xml
+ * CubeMX DB release 6.0.10
+ */
+#if defined(ARDUINO_PYBSTICK26_DUINO)
+#include "Arduino.h"
+#include "PeripheralPins.h"
+
+/* =====
+ * Notes:
+ * - The pins mentioned Px_y_ALTz are alternative possibilities which use other
+ * HW peripheral instances. You can use them the same way as any other "normal"
+ * pin (i.e. analogWrite(PA7_ALT1, 128);).
+ *
+ * - Commented lines are alternative possibilities which are not used per default.
+ * If you change them, you will have to know what you do
+ * =====
+ */
+
+//*** ADC ***
+
+#ifdef HAL_ADC_MODULE_ENABLED
+WEAK const PinMap PinMap_ADC[] = {
+ {PA_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC_IN0
+ // {PA_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC_IN1
+ {PA_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC_IN2
+ {PA_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC_IN3
+ {PA_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC_IN4
+ {PA_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC_IN5
+ // {PA_6, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC_IN6
+ {PA_7, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC_IN7
+ // {PB_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC_IN8
+ // {PB_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC_IN9
+ // {PC_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC_IN10
+ // {PC_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC_IN11
+ // {PC_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC_IN12
+ {PC_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC_IN13
+ // {PC_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC_IN14
+ {PC_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC_IN15
+ {NC, NP, 0}
+};
+#endif
+
+//*** DAC ***
+
+#ifdef HAL_DAC_MODULE_ENABLED
+WEAK const PinMap PinMap_DAC[] = {
+ {PA_4, DAC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // DAC_OUT1
+ {PA_5, DAC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // DAC_OUT2
+ {NC, NP, 0}
+};
+#endif
+
+//*** I2C ***
+
+#ifdef HAL_I2C_MODULE_ENABLED
+WEAK const PinMap PinMap_I2C_SDA[] = {
+ // {PB_7, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
+ {PB_9, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
+ // {PB_11, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C2)},
+ {PB_14, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF5_I2C2)},
+ {NC, NP, 0}
+};
+#endif
+
+#ifdef HAL_I2C_MODULE_ENABLED
+WEAK const PinMap PinMap_I2C_SCL[] = {
+ {PB_6, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
+ {PB_8, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
+ {PB_10, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C2)},
+ {PB_13, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF5_I2C2)},
+ {NC, NP, 0}
+};
+#endif
+
+//*** TIM ***
+
+#ifdef HAL_TIM_MODULE_ENABLED
+WEAK const PinMap PinMap_TIM[] = {
+ {PA_0, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 1, 0)}, // TIM2_CH1
+ // {PA_1, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 2, 0)}, // TIM2_CH2
+ // {PA_1_ALT1, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM15, 1, 1)}, // TIM15_CH1N
+ {PA_2, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 3, 0)}, // TIM2_CH3
+ {PA_2_ALT1, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM15, 1, 0)}, // TIM15_CH1
+ {PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 4, 0)}, // TIM2_CH4
+ {PA_3_ALT1, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM15, 2, 0)}, // TIM15_CH2
+ {PA_4, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM14, 1, 0)}, // TIM14_CH1
+ {PA_5, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 1, 0)}, // TIM2_CH1
+ // {PA_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 1, 0)}, // TIM3_CH1
+ // {PA_6_ALT1, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM16, 1, 0)}, // TIM16_CH1
+ {PA_7, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 1, 1)}, // TIM1_CH1N
+ {PA_7_ALT1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 2, 0)}, // TIM3_CH2
+ {PA_7_ALT2, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM14, 1, 0)}, // TIM14_CH1
+ {PA_7_ALT3, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM17, 1, 0)}, // TIM17_CH1
+ // {PA_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 1, 0)}, // TIM1_CH1
+ // {PA_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 2, 0)}, // TIM1_CH2
+ {PA_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 3, 0)}, // TIM1_CH3
+ // {PA_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 4, 0)}, // TIM1_CH4
+ {PA_15, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 1, 0)}, // TIM2_CH1
+ {PB_0, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 2, 1)}, // TIM1_CH2N
+ {PB_0_ALT1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 3, 0)}, // TIM3_CH3
+ {PB_1, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 3, 1)}, // TIM1_CH3N
+ {PB_1_ALT1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 4, 0)}, // TIM3_CH4
+ {PB_1_ALT2, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM14, 1, 0)}, // TIM14_CH1
+ {PB_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 2, 0)}, // TIM2_CH2
+ {PB_4, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 1, 0)}, // TIM3_CH1
+ // {PB_5, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 2, 0)}, // TIM3_CH2
+ {PB_6, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM16, 1, 1)}, // TIM16_CH1N
+ // {PB_7, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM17, 1, 1)}, // TIM17_CH1N
+ {PB_8, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM16, 1, 0)}, // TIM16_CH1
+ {PB_9, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM17, 1, 0)}, // TIM17_CH1
+ {PB_10, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 3, 0)}, // TIM2_CH3
+ // {PB_11, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 4, 0)}, // TIM2_CH4
+ {PB_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 1, 1)}, // TIM1_CH1N
+ {PB_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 2, 1)}, // TIM1_CH2N
+ {PB_14_ALT1, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM15, 1, 0)}, // TIM15_CH1
+ // {PB_15, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 3, 1)}, // TIM1_CH3N
+ // {PB_15_ALT1, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM15, 1, 1)}, // TIM15_CH1N
+ // {PB_15_ALT2, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM15, 2, 0)}, // TIM15_CH2
+ {PC_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM3, 1, 0)}, // TIM3_CH1
+ {PC_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM3, 2, 0)}, // TIM3_CH2
+ // {PC_8, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM3, 3, 0)}, // TIM3_CH3
+ // {PC_9, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM3, 4, 0)}, // TIM3_CH4
+ {NC, NP, 0}
+};
+#endif
+
+//*** UART ***
+
+#ifdef HAL_UART_MODULE_ENABLED
+WEAK const PinMap PinMap_UART_TX[] = {
+ {PA_0, USART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART4)},
+ {PA_2, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
+ // {PA_9, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
+ // {PA_14, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
+ {PB_6, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART1)},
+ {PB_10, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
+ // {PC_4, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART3)},
+ // {PC_10, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART3)},
+ // {PC_10_ALT1, USART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART4)},
+ {NC, NP, 0}
+};
+#endif
+
+#ifdef HAL_UART_MODULE_ENABLED
+WEAK const PinMap PinMap_UART_RX[] = {
+ // {PA_1, USART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART4)},
+ {PA_3, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
+ {PA_10, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
+ {PA_15, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
+ // {PB_7, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART1)},
+ // {PB_11, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
+ {PC_5, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART3)},
+ {PC_11, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART3)},
+ {PC_11_ALT1, USART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART4)},
+ {NC, NP, 0}
+};
+#endif
+
+#ifdef HAL_UART_MODULE_ENABLED
+WEAK const PinMap PinMap_UART_RTS[] = {
+ // {PA_1, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
+ // {PA_12, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
+ {PA_15, USART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART4)},
+ // {PB_1, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
+ {PB_14, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
+ // {PD_2, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART3)},
+ {NC, NP, 0}
+};
+#endif
+
+#ifdef HAL_UART_MODULE_ENABLED
+WEAK const PinMap PinMap_UART_CTS[] = {
+ {PA_0, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
+ // {PA_6, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
+ // {PA_11, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
+ // {PB_7, USART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART4)},
+ {PB_13, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
+ {NC, NP, 0}
+};
+#endif
+
+//*** SPI ***
+
+#ifdef HAL_SPI_MODULE_ENABLED
+WEAK const PinMap PinMap_SPI_MOSI[] = {
+ {PA_7, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
+ // {PB_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
+ // {PB_15, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
+ {PC_3, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_SPI2)},
+ {NC, NP, 0}
+};
+#endif
+
+#ifdef HAL_SPI_MODULE_ENABLED
+WEAK const PinMap PinMap_SPI_MISO[] = {
+ // {PA_6, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
+ {PB_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
+ {PB_14, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
+ // {PC_2, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_SPI2)},
+ {NC, NP, 0}
+};
+#endif
+
+#ifdef HAL_SPI_MODULE_ENABLED
+WEAK const PinMap PinMap_SPI_SCLK[] = {
+ {PA_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
+ {PB_3, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
+ {PB_10, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)},
+ {PB_13, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
+ {NC, NP, 0}
+};
+#endif
+
+#ifdef HAL_SPI_MODULE_ENABLED
+WEAK const PinMap PinMap_SPI_SSEL[] = {
+ {PA_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
+ {PA_15, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
+ {PB_9, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)},
+ {PB_12, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
+ {NC, NP, 0}
+};
+#endif
+
+//*** CAN ***
+
+#ifdef HAL_CAN_MODULE_ENABLED
+WEAK const PinMap PinMap_CAN_RD[] = {
+ {PA_11, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF4_CAN)},
+ {PB_8, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF4_CAN)},
+ {NC, NP, 0}
+};
+#endif
+
+#ifdef HAL_CAN_MODULE_ENABLED
+WEAK const PinMap PinMap_CAN_TD[] = {
+ {PA_12, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF4_CAN)},
+ {PB_9, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF4_CAN)},
+ {NC, NP, 0}
+};
+#endif
+
+//*** No ETHERNET ***
+
+//*** No QUADSPI ***
+
+//*** USB ***
+
+#if defined(HAL_PCD_MODULE_ENABLED) || defined(HAL_HCD_MODULE_ENABLED)
+WEAK const PinMap PinMap_USB[] = {
+ {PA_11, USB, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_DM
+ {PA_12, USB, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_DP
+ // {PA_13, USB, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_USB)}, // USB_NOE
+ {NC, NP, 0}
+};
+#endif
+
+//*** No SD ***
+#endif /* ARDUINO_PYBSTICK26_DUINO */
diff --git a/variants/STM32F0xx/F072R(8-B)Tx_F072RB/generic_clock.c b/variants/STM32F0xx/F072R(8-B)Tx_F072RB/generic_clock.c
index 065ba2cdcc..fc187d9992 100644
--- a/variants/STM32F0xx/F072R(8-B)Tx_F072RB/generic_clock.c
+++ b/variants/STM32F0xx/F072R(8-B)Tx_F072RB/generic_clock.c
@@ -21,8 +21,36 @@
*/
WEAK void SystemClock_Config(void)
{
- /* SystemClock_Config can be generated by STM32CubeMX */
-#warning "SystemClock_Config() is empty. Default clock at reset is used."
+ RCC_OscInitTypeDef RCC_OscInitStruct = {};
+ RCC_ClkInitTypeDef RCC_ClkInitStruct = {};
+ RCC_PeriphCLKInitTypeDef PeriphClkInit = {};
+
+ /** Initializes the RCC Oscillators according to the specified parameters
+ * in the RCC_OscInitTypeDef structure.
+ */
+ RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI48;
+ RCC_OscInitStruct.HSI48State = RCC_HSI48_ON;
+ RCC_OscInitStruct.PLL.PLLState = RCC_PLL_NONE;
+ if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) {
+ Error_Handler();
+ }
+ /** Initializes the CPU, AHB and APB buses clocks
+ */
+ RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK
+ | RCC_CLOCKTYPE_PCLK1;
+ RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_HSI48;
+ RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
+ RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
+
+ if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1) != HAL_OK) {
+ Error_Handler();
+ }
+ PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_USB;
+ PeriphClkInit.UsbClockSelection = RCC_USBCLKSOURCE_HSI48;
+
+ if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) != HAL_OK) {
+ Error_Handler();
+ }
}
#endif /* ARDUINO_GENERIC_* */
diff --git a/variants/STM32F0xx/F072R(8-B)Tx_F072RB/ldscript.ld b/variants/STM32F0xx/F072R(8-B)Tx_F072RB/ldscript.ld
new file mode 100644
index 0000000000..770c7e9c74
--- /dev/null
+++ b/variants/STM32F0xx/F072R(8-B)Tx_F072RB/ldscript.ld
@@ -0,0 +1,177 @@
+/**
+ ******************************************************************************
+ * @file LinkerScript.ld
+ * @author Auto-generated by STM32CubeIDE
+ * @brief Linker script for STM32F072RBTx Device from STM32F0 series
+ * 128Kbytes FLASH
+ * 16Kbytes RAM
+ *
+ * Set heap size, stack size and stack location according
+ * to application requirements.
+ *
+ * Set memory bank area and size if external memory is used
+ ******************************************************************************
+ * @attention
+ *
+ * © Copyright (c) 2020 STMicroelectronics.
+ * All rights reserved.
+ *
+ * This software component is licensed by ST under BSD 3-Clause license,
+ * the "License"; You may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at:
+ * opensource.org/licenses/BSD-3-Clause
+ *
+ ******************************************************************************
+ */
+
+/* Entry Point */
+ENTRY(Reset_Handler)
+
+/* Highest address of the user mode stack */
+_estack = ORIGIN(RAM) + LENGTH(RAM); /* end of "RAM" Ram type memory */
+
+_Min_Heap_Size = 0x200; /* required amount of heap */
+_Min_Stack_Size = 0x400; /* required amount of stack */
+
+/* Memories definition */
+MEMORY
+{
+ RAM (xrw) : ORIGIN = 0x20000000, LENGTH = LD_MAX_DATA_SIZE
+ FLASH (rx) : ORIGIN = 0x8000000 + LD_FLASH_OFFSET, LENGTH = LD_MAX_SIZE - LD_FLASH_OFFSET
+}
+
+/* Sections */
+SECTIONS
+{
+ /* The startup code into "FLASH" Rom type memory */
+ .isr_vector :
+ {
+ . = ALIGN(4);
+ KEEP(*(.isr_vector)) /* Startup code */
+ . = ALIGN(4);
+ } >FLASH
+
+ /* The program code and other data into "FLASH" Rom type memory */
+ .text :
+ {
+ . = ALIGN(4);
+ *(.text) /* .text sections (code) */
+ *(.text*) /* .text* sections (code) */
+ *(.glue_7) /* glue arm to thumb code */
+ *(.glue_7t) /* glue thumb to arm code */
+ *(.eh_frame)
+
+ KEEP (*(.init))
+ KEEP (*(.fini))
+
+ . = ALIGN(4);
+ _etext = .; /* define a global symbols at end of code */
+ } >FLASH
+
+ /* Constant data into "FLASH" Rom type memory */
+ .rodata :
+ {
+ . = ALIGN(4);
+ *(.rodata) /* .rodata sections (constants, strings, etc.) */
+ *(.rodata*) /* .rodata* sections (constants, strings, etc.) */
+ . = ALIGN(4);
+ } >FLASH
+
+ .ARM.extab : {
+ . = ALIGN(4);
+ *(.ARM.extab* .gnu.linkonce.armextab.*)
+ . = ALIGN(4);
+ } >FLASH
+
+ .ARM : {
+ . = ALIGN(4);
+ __exidx_start = .;
+ *(.ARM.exidx*)
+ __exidx_end = .;
+ . = ALIGN(4);
+ } >FLASH
+
+ .preinit_array :
+ {
+ . = ALIGN(4);
+ PROVIDE_HIDDEN (__preinit_array_start = .);
+ KEEP (*(.preinit_array*))
+ PROVIDE_HIDDEN (__preinit_array_end = .);
+ . = ALIGN(4);
+ } >FLASH
+
+ .init_array :
+ {
+ . = ALIGN(4);
+ PROVIDE_HIDDEN (__init_array_start = .);
+ KEEP (*(SORT(.init_array.*)))
+ KEEP (*(.init_array*))
+ PROVIDE_HIDDEN (__init_array_end = .);
+ . = ALIGN(4);
+ } >FLASH
+
+ .fini_array :
+ {
+ . = ALIGN(4);
+ PROVIDE_HIDDEN (__fini_array_start = .);
+ KEEP (*(SORT(.fini_array.*)))
+ KEEP (*(.fini_array*))
+ PROVIDE_HIDDEN (__fini_array_end = .);
+ . = ALIGN(4);
+ } >FLASH
+
+ /* Used by the startup to initialize data */
+ _sidata = LOADADDR(.data);
+
+ /* Initialized data sections into "RAM" Ram type memory */
+ .data :
+ {
+ . = ALIGN(4);
+ _sdata = .; /* create a global symbol at data start */
+ *(.data) /* .data sections */
+ *(.data*) /* .data* sections */
+ *(.RamFunc) /* .RamFunc sections */
+ *(.RamFunc*) /* .RamFunc* sections */
+
+ . = ALIGN(4);
+ _edata = .; /* define a global symbol at data end */
+
+ } >RAM AT> FLASH
+
+ /* Uninitialized data section into "RAM" Ram type memory */
+ . = ALIGN(4);
+ .bss :
+ {
+ /* This is used by the startup in order to initialize the .bss section */
+ _sbss = .; /* define a global symbol at bss start */
+ __bss_start__ = _sbss;
+ *(.bss)
+ *(.bss*)
+ *(COMMON)
+
+ . = ALIGN(4);
+ _ebss = .; /* define a global symbol at bss end */
+ __bss_end__ = _ebss;
+ } >RAM
+
+ /* User_heap_stack section, used to check that there is enough "RAM" Ram type memory left */
+ ._user_heap_stack :
+ {
+ . = ALIGN(8);
+ PROVIDE ( end = . );
+ PROVIDE ( _end = . );
+ . = . + _Min_Heap_Size;
+ . = . + _Min_Stack_Size;
+ . = ALIGN(8);
+ } >RAM
+
+ /* Remove information from the compiler libraries */
+ /DISCARD/ :
+ {
+ libc.a ( * )
+ libm.a ( * )
+ libgcc.a ( * )
+ }
+
+ .ARM.attributes 0 : { *(.ARM.attributes) }
+}
diff --git a/variants/STM32F0xx/F072R(8-B)Tx_F072RB/variant_DISCO_F072RB.cpp b/variants/STM32F0xx/F072R(8-B)Tx_F072RB/variant_DISCO_F072RB.cpp
new file mode 100644
index 0000000000..d8151ace7d
--- /dev/null
+++ b/variants/STM32F0xx/F072R(8-B)Tx_F072RB/variant_DISCO_F072RB.cpp
@@ -0,0 +1,163 @@
+/*
+ *******************************************************************************
+ * Copyright (c) 2021, STMicroelectronics
+ * All rights reserved.
+ *
+ * This software component is licensed by ST under BSD 3-Clause license,
+ * the "License"; You may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at:
+ * opensource.org/licenses/BSD-3-Clause
+ *
+ *******************************************************************************
+ */
+#if defined(ARDUINO_DISCO_F072RB)
+#include "pins_arduino.h"
+
+// Pin number
+const PinName digitalPin[] = {
+ //P2 connector Right side (top view)
+ PB_9,
+ PB_8,
+ PB_7,
+ PB_6,
+ PB_5,
+ PB_4,
+ PB_3,
+ PD_2,
+ PC_12,
+ PC_11,
+ PC_10,
+ PA_15,
+ PA_14,
+ PA_13,
+#ifdef USB_REMOVED
+ PA_12,
+ PA_11,
+#else
+ NC,
+ NC,
+#endif
+ PA_10,
+ PA_9,
+ PA_8,
+ PC_9,
+ PC_8,
+ PC_7,
+ PC_6,
+ PB_15,
+ PB_14,
+ PB_13,
+ //P1 connector Left side (top view)
+ PC_13,
+ PC_14,
+ PC_15,
+ PF_0,
+ PF_1,
+ PC_0,
+ PC_1,
+ PC_2,
+ PC_3,
+ PA_0,
+ PA_1,
+#ifdef TSC_REMOVED
+ PA_2,
+ PA_3,
+#else
+ NC,
+ NC,
+#endif
+ PA_4,
+ PA_5,
+#ifdef TSC_REMOVED
+ PA_6,
+ PA_7,
+#else
+ NC,
+ NC,
+#endif
+ PC_4,
+ PC_5,
+#ifdef TSC_REMOVED
+ PB_0,
+ PB_1,
+#else
+ NC,
+ NC,
+#endif
+ PB_2,
+ PB_10,
+ PB_11,
+ PB_12
+};
+
+// Analog (Ax) pin number array
+const uint32_t analogInputPin[] = {
+ 31, // A0
+ 32, // A1
+ 33, // A2
+ 34, // A3
+ 35, // A4
+ 36, // A5
+ 37, // A6
+ 38, // A7
+ 39, // A8
+ 40, // A9
+ 41, // A10
+ 42, // A11
+ 43, // A12
+ 44, // A13
+ 45, // A14
+ 46 // A15
+};
+
+// ----------------------------------------------------------------------------
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @brief System Clock Configuration
+ * @param None
+ * @retval None
+ */
+WEAK void SystemClock_Config(void)
+{
+ RCC_OscInitTypeDef RCC_OscInitStruct = {};
+ RCC_ClkInitTypeDef RCC_ClkInitStruct = {};
+ RCC_PeriphCLKInitTypeDef PeriphClkInit = {};
+
+ /* Initializes the CPU, AHB and APB busses clocks */
+ RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI | RCC_OSCILLATORTYPE_HSI48;
+ RCC_OscInitStruct.HSIState = RCC_HSI_ON;
+ RCC_OscInitStruct.HSI48State = RCC_HSI48_ON;
+ RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
+ RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
+ RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
+ RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL6;
+ RCC_OscInitStruct.PLL.PREDIV = RCC_PREDIV_DIV1;
+ if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) {
+ Error_Handler();
+ }
+ /* Initializes the CPU, AHB and APB busses clocks */
+ RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK
+ | RCC_CLOCKTYPE_PCLK1;
+ RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
+ RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
+ RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
+
+ if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1) != HAL_OK) {
+ Error_Handler();
+ }
+ PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_USB;
+ PeriphClkInit.UsbClockSelection = RCC_USBCLKSOURCE_HSI48;
+
+ if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) != HAL_OK) {
+ Error_Handler();
+ }
+}
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* ARDUINO_DISCO_F072RB */
diff --git a/variants/STM32F0xx/F072R(8-B)Tx_F072RB/variant_DISCO_F072RB.h b/variants/STM32F0xx/F072R(8-B)Tx_F072RB/variant_DISCO_F072RB.h
new file mode 100644
index 0000000000..e4854ceb97
--- /dev/null
+++ b/variants/STM32F0xx/F072R(8-B)Tx_F072RB/variant_DISCO_F072RB.h
@@ -0,0 +1,198 @@
+/*
+ *******************************************************************************
+ * Copyright (c) 2021, STMicroelectronics
+ * All rights reserved.
+ *
+ * This software component is licensed by ST under BSD 3-Clause license,
+ * the "License"; You may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at:
+ * opensource.org/licenses/BSD-3-Clause
+ *
+ *******************************************************************************
+ */
+#pragma once
+
+/*----------------------------------------------------------------------------
+ * STM32 pins number
+ *----------------------------------------------------------------------------*/
+
+// USB USER CN2
+// By default, SB20,23 (USB-USER) are OFF.
+// So PA11,12 are not available.
+// If ON and R12,13 removed,
+// #define USB_REMOVED
+// to get PA11,12 available.
+
+// Linear touch sensor
+// By default, SB27,28,29,30,31,32 (touch sensor) are OFF.
+// So PA2,3,6,7 and PB0,1 are not available.
+// If ON and R38,39,40 and C26,27,28 are removed,
+// #define TSC_REMOVED
+// to get PA2,3,6,7 and PB0,1 available.
+
+// P2 connector Right side (top view)
+#define PB9 0
+#define PB8 1
+#define PB7 2
+#define PB6 3
+#define PB5 4
+#define PB4 5
+#define PB3 6
+#define PD2 7
+#define PC12 8
+#define PC11 9
+#define PC10 10
+#define PA15 11
+#define PA14 12
+#define PA13 13
+#define PA12 14 // SB20 (default OFF): USB_DP
+#define PA11 15 // SB23 (default OFF): USB_DM
+#define PA10 16
+#define PA9 17
+#define PA8 18
+#define PC9 19 // LED_GREEN (LD4)
+#define PC8 20 // LED_ORANGE (LD3)
+#define PC7 21 // LED_BLUE (LD6)
+#define PC6 22 // LED_RED (LD5)
+#define PB15 23 // SPI2_MOSI (L3GD20)
+#define PB14 24 // SPI2_MISO (L3GD20)
+#define PB13 25 // SPI2_SCK (L3GD20)
+// P1 connector Left side (top view)
+#define PC13 26
+#define PC14 27
+#define PC15 28
+#define PF0 29
+#define PF1 30
+#define PC0 A0 // NCS_MEMS_SPI (L3GD20)
+#define PC1 A1 // MEMS INT1 (L3GD20)
+#define PC2 A2 // MEMS INT2 (L3GD20)
+#define PC3 A3
+#define PA0 A4 // USER_BTN
+#define PA1 A5
+#define PA2 A6 // SB27 (default OFF): TS_G1_IO3
+#define PA3 A7 // SB28 (default OFF): TS_G1_IO4
+#define PA4 A8
+#define PA5 A9
+#define PA6 A10 // SB29 (default OFF): TS_G2_IO3
+#define PA7 A11 // SB30 (default OFF): TS_G2_IO4
+#define PC4 A12
+#define PC5 A13 // Ext Reset
+#define PB0 A14 // SB31 (default OFF): TS_G3_IO2
+#define PB1 A15 // SB32 (default OFF): TS_G3_IO3
+#define PB2 47
+#define PB10 48 // I2C2 SCL: Extension / RF EEprom Connector
+#define PB11 49 // I2C2 SDA: Extension / RF EEprom Connector
+#define PB12 50
+
+// Alternate pins number
+#define PA1_ALT1 (PA1 | ALT1)
+#define PA2_ALT1 (PA2 | ALT1)
+#define PA3_ALT1 (PA3 | ALT1)
+#define PA6_ALT1 (PA6 | ALT1)
+#define PA7_ALT1 (PA7 | ALT1)
+#define PA7_ALT2 (PA7 | ALT2)
+#define PA7_ALT3 (PA7 | ALT3)
+#define PB0_ALT1 (PB0 | ALT1)
+#define PB1_ALT1 (PB1 | ALT1)
+#define PB1_ALT2 (PB1 | ALT2)
+#define PB14_ALT1 (PB14 | ALT1)
+#define PB15_ALT1 (PB15 | ALT1)
+#define PB15_ALT2 (PB15 | ALT2)
+#define PC10_ALT1 (PC10 | ALT1)
+#define PC11_ALT1 (PC11 | ALT1)
+
+#define NUM_DIGITAL_PINS 51
+#define NUM_ANALOG_INPUTS 16
+
+//On-board LED pin number
+#ifndef LED_BUILTIN
+ #define LED_BUILTIN PC9
+#endif
+#define LED_GREEN LED_BUILTIN
+#define LED_ORANGE PC8
+#define LED_BLUE PC7
+#define LED_RED PC6
+
+//On-board user button
+#ifndef LED_BUILTIN
+ #define LED_BUILTIN PA0
+#endif
+
+// SPI definitions
+// SPI1 is used
+#ifndef PIN_SPI_SS
+ #define PIN_SPI_SS PA4
+#endif
+#ifndef PIN_SPI_SS1
+ #define PIN_SPI_SS1 PC4
+#endif
+#ifndef PIN_SPI_SS2
+ #define PIN_SPI_SS2 PB12
+#endif
+#ifndef PIN_SPI_SS3
+ #define PIN_SPI_SS3 PB6
+#endif
+#ifndef PIN_SPI_MOSI
+ #define PIN_SPI_MOSI PB5
+#endif
+#ifndef PIN_SPI_MISO
+ #define PIN_SPI_MISO PB4
+#endif
+#ifndef PIN_SPI_SCK
+ #define PIN_SPI_SCK PB3
+#endif
+
+// I2C Definitions
+// I2C1 is used
+#ifndef PIN_WIRE_SDA
+ #define PIN_WIRE_SDA PB9
+#endif
+#ifndef PIN_WIRE_SCL
+ #define PIN_WIRE_SCL PB8
+#endif
+
+// Timer Definitions
+// Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin
+#ifndef TIMER_TONE
+ #define TIMER_TONE TIM6
+#endif
+#ifndef TIMER_SERVO
+ #define TIMER_SERVO TIM7
+#endif
+
+// UART Definitions
+#ifndef SERIAL_UART_INSTANCE
+ #define SERIAL_UART_INSTANCE 1 // USART 1
+#endif
+
+// Mandatory for Firmata
+#ifndef PIN_SERIAL_RX
+ #define PIN_SERIAL_RX PA10
+#endif
+#ifndef PIN_SERIAL_TX
+ #define PIN_SERIAL_TX PA9
+#endif
+
+/*----------------------------------------------------------------------------
+ * Arduino objects - C++ only
+ *----------------------------------------------------------------------------*/
+
+#ifdef __cplusplus
+ // These serial port names are intended to allow libraries and architecture-neutral
+ // sketches to automatically default to the correct port name for a particular type
+ // of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
+ // the first hardware serial port whose RX/TX pins are not dedicated to another use.
+ //
+ // SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
+ //
+ // SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
+ //
+ // SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
+ //
+ // SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
+ //
+ // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
+ // pins are NOT connected to anything by default.
+ #define SERIAL_PORT_MONITOR Serial
+ #define SERIAL_PORT_HARDWARE Serial
+#endif
diff --git a/variants/STM32F0xx/F072R(8-B)Tx_F072RB/variant_NUCLEO_F072RB.cpp b/variants/STM32F0xx/F072R(8-B)Tx_F072RB/variant_NUCLEO_F072RB.cpp
new file mode 100644
index 0000000000..dcc7434e2b
--- /dev/null
+++ b/variants/STM32F0xx/F072R(8-B)Tx_F072RB/variant_NUCLEO_F072RB.cpp
@@ -0,0 +1,146 @@
+/*
+ *******************************************************************************
+ * Copyright (c) 2021, STMicroelectronics
+ * All rights reserved.
+ *
+ * This software component is licensed by ST under BSD 3-Clause license,
+ * the "License"; You may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at:
+ * opensource.org/licenses/BSD-3-Clause
+ *
+ *******************************************************************************
+ */
+#if defined(ARDUINO_NUCLEO_F072RB)
+
+#include "pins_arduino.h"
+
+// Pin number
+const PinName digitalPin[] = {
+ PA_3,
+ PA_2,
+ PA_10,
+ PB_3,
+ PB_5,
+ PB_4,
+ PB_10,
+ PA_8,
+ PA_9,
+ PC_7,
+ PB_6,
+ PA_7,
+ PA_6,
+ PA_5,
+ PB_9,
+ PB_8,
+ // ST Morpho
+ // CN7 Left Side
+ PC_10,
+ PC_12,
+ PA_13,
+ PA_14,
+ PA_15,
+ PB_7,
+ PC_13,
+ PC_14,
+ PC_15,
+ PF_0,
+ PF_1,
+ PC_2,
+ PC_3,
+ // CN7 Right Side
+ PC_11,
+ PD_2,
+ // CN10 Left Side
+ PC_9,
+ // CN10 Right side
+ PC_8,
+ PC_6,
+ PC_5,
+ PA_12,
+ PA_11,
+ PB_12,
+ PB_11,
+ PB_2,
+ PB_1,
+ PB_15,
+ PB_14,
+ PB_13,
+ PC_4,
+ PA_0,
+ PA_1,
+ PA_4,
+ PB_0,
+ PC_1,
+ PC_0
+};
+
+// Analog (Ax) pin number array
+const uint32_t analogInputPin[] = {
+ 45, //A0
+ 46, //A1
+ 47, //A2
+ 48, //A3
+ 49, //A4
+ 50, //A5
+ 11, //A6
+ 12, //A7
+ 27, //A8
+ 28, //A9
+ 34, //A10
+ 44, //A11
+ 40, //A12
+ 13, //A13
+ 1, //A14
+ 0 //A15
+};
+
+// ----------------------------------------------------------------------------
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @brief System Clock Configuration
+ * @param None
+ * @retval None
+ */
+WEAK void SystemClock_Config(void)
+{
+ RCC_OscInitTypeDef RCC_OscInitStruct = {};
+ RCC_ClkInitTypeDef RCC_ClkInitStruct = {};
+ RCC_PeriphCLKInitTypeDef PeriphClkInit = {};
+ /*
+ * Initializes the RCC Oscillators according to the specified parameters
+ * in the RCC_OscInitTypeDef structure.
+ */
+ RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
+ RCC_OscInitStruct.HSEState = RCC_HSE_BYPASS; // External 8 MHz clock on OSC_IN
+ RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
+ RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
+ RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL6;
+ RCC_OscInitStruct.PLL.PREDIV = RCC_PREDIV_DIV1;
+ if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) {
+ Error_Handler();
+ }
+ /* Initializes the CPU, AHB and APB buses clocks */
+ RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK
+ | RCC_CLOCKTYPE_PCLK1;
+ RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
+ RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
+ RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
+
+ if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1) != HAL_OK) {
+ Error_Handler();
+ }
+ PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_USB;
+ PeriphClkInit.UsbClockSelection = RCC_USBCLKSOURCE_PLL;
+ if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) != HAL_OK) {
+ Error_Handler();
+ }
+}
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* ARDUINO_NUCLEO_F072RB */
diff --git a/variants/STM32F0xx/F072R(8-B)Tx_F072RB/variant_NUCLEO_F072RB.h b/variants/STM32F0xx/F072R(8-B)Tx_F072RB/variant_NUCLEO_F072RB.h
new file mode 100644
index 0000000000..0a2e6602fd
--- /dev/null
+++ b/variants/STM32F0xx/F072R(8-B)Tx_F072RB/variant_NUCLEO_F072RB.h
@@ -0,0 +1,151 @@
+/*
+ *******************************************************************************
+ * Copyright (c) 2021, STMicroelectronics
+ * All rights reserved.
+ *
+ * This software component is licensed by ST under BSD 3-Clause license,
+ * the "License"; You may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at:
+ * opensource.org/licenses/BSD-3-Clause
+ *
+ *******************************************************************************
+ */
+#pragma once
+
+/*----------------------------------------------------------------------------
+ * STM32 pins number
+ *----------------------------------------------------------------------------*/
+#define PA3 A15
+#define PA2 A14
+#define PA10 2
+#define PB3 3
+#define PB5 4
+#define PB4 5
+#define PB10 6
+#define PA8 7
+#define PA9 8
+#define PC7 9
+#define PB6 10
+#define PA7 A6
+#define PA6 A7
+#define PA5 A13
+#define PB9 14
+#define PB8 15
+// ST Morpho
+// CN7 Left Side
+#define PC10 16
+#define PC12 17
+#define PA13 18 // SWD
+#define PA14 19 // SWD
+#define PA15 20
+#define PB7 21
+#define PC13 22
+#define PC14 23
+#define PC15 24
+#define PF0 25
+#define PF1 26
+#define PC2 A8
+#define PC3 A9
+// CN7 Right Side
+#define PC11 29
+#define PD2 30
+// CN10 Left Side
+#define PC9 31
+// CN10 Right side
+#define PC8 32
+#define PC6 33
+#define PC5 A10
+#define PA12 35
+#define PA11 36
+#define PB12 37
+#define PB11 38
+#define PB2 39
+#define PB1 A12
+#define PB15 41
+#define PB14 42
+#define PB13 43
+#define PC4 A11
+#define PA0 A0
+#define PA1 A1
+#define PA4 A2
+#define PB0 A3
+#define PC1 A4
+#define PC0 A5
+
+// Alternate pins number
+#define PA1_ALT1 (PA1 | ALT1)
+#define PA2_ALT1 (PA2 | ALT1)
+#define PA3_ALT1 (PA3 | ALT1)
+#define PA6_ALT1 (PA6 | ALT1)
+#define PA7_ALT1 (PA7 | ALT1)
+#define PA7_ALT2 (PA7 | ALT2)
+#define PA7_ALT3 (PA7 | ALT3)
+#define PB0_ALT1 (PB0 | ALT1)
+#define PB1_ALT1 (PB1 | ALT1)
+#define PB1_ALT2 (PB1 | ALT2)
+#define PB14_ALT1 (PB14 | ALT1)
+#define PB15_ALT1 (PB15 | ALT1)
+#define PB15_ALT2 (PB15 | ALT2)
+#define PC10_ALT1 (PC10 | ALT1)
+#define PC11_ALT1 (PC11 | ALT1)
+
+#define NUM_DIGITAL_PINS 51
+#define NUM_ANALOG_INPUTS 16
+
+// On-board LED pin number
+#ifndef LED_BUILTIN
+ #define LED_BUILTIN PA5
+#endif
+#define LED_GREEN LED_BUILTIN
+
+// On-board user button
+#ifndef USER_BTN
+ #define USER_BTN PC13
+#endif
+
+// Timer Definitions
+// Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin
+#ifndef TIMER_TONE
+ #define TIMER_TONE TIM6
+#endif
+#ifndef TIMER_SERVO
+ #define TIMER_SERVO TIM7
+#endif
+
+// UART Definitions
+#ifndef SERIAL_UART_INSTANCE
+ #define SERIAL_UART_INSTANCE 2 //Connected to ST-Link
+#endif
+
+// Default pin used for 'Serial' instance (ex: ST-Link)
+// Mandatory for Firmata
+#ifndef PIN_SERIAL_RX
+ #define PIN_SERIAL_RX PA3
+#endif
+#ifndef PIN_SERIAL_TX
+ #define PIN_SERIAL_TX PA2
+#endif
+
+/*----------------------------------------------------------------------------
+ * Arduino objects - C++ only
+ *----------------------------------------------------------------------------*/
+
+#ifdef __cplusplus
+ // These serial port names are intended to allow libraries and architecture-neutral
+ // sketches to automatically default to the correct port name for a particular type
+ // of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
+ // the first hardware serial port whose RX/TX pins are not dedicated to another use.
+ //
+ // SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
+ //
+ // SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
+ //
+ // SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
+ //
+ // SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
+ //
+ // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
+ // pins are NOT connected to anything by default.
+ #define SERIAL_PORT_MONITOR Serial
+ #define SERIAL_PORT_HARDWARE Serial
+#endif
diff --git a/variants/STM32F0xx/PYBSTICK26_DUINO/variant_PYBSTICK26_DUINO.cpp b/variants/STM32F0xx/F072R(8-B)Tx_F072RB/variant_PYBSTICK26_DUINO.cpp
similarity index 59%
rename from variants/STM32F0xx/PYBSTICK26_DUINO/variant_PYBSTICK26_DUINO.cpp
rename to variants/STM32F0xx/F072R(8-B)Tx_F072RB/variant_PYBSTICK26_DUINO.cpp
index bc6ccfd94b..4c845b8fa2 100644
--- a/variants/STM32F0xx/PYBSTICK26_DUINO/variant_PYBSTICK26_DUINO.cpp
+++ b/variants/STM32F0xx/F072R(8-B)Tx_F072RB/variant_PYBSTICK26_DUINO.cpp
@@ -1,39 +1,19 @@
/*
*******************************************************************************
- * Copyright (c) 2018, STMicroelectronics
+ * Copyright (c) 2020, STMicroelectronics
* All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
+ * This software component is licensed by ST under BSD 3-Clause license,
+ * the "License"; You may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at:
+ * opensource.org/licenses/BSD-3-Clause
*
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * 3. Neither the name of STMicroelectronics nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*******************************************************************************
*/
+#if defined(ARDUINO_PYBSTICK26_DUINO)
#include "pins_arduino.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
-
// Digital PinName array (up to 64 pins)
const PinName digitalPin[] = {
PB_9,
@@ -82,10 +62,6 @@ const uint32_t analogInputPin[] = {
18 // A7
};
-#ifdef __cplusplus
-}
-#endif
-
// ----------------------------------------------------------------------------
#ifdef __cplusplus
@@ -136,3 +112,4 @@ WEAK void SystemClock_Config(void)
#ifdef __cplusplus
}
#endif
+#endif /* ARDUINO_PYBSTICK26_DUINO */
diff --git a/variants/STM32F0xx/F072R(8-B)Tx_F072RB/variant_PYBSTICK26_DUINO.h b/variants/STM32F0xx/F072R(8-B)Tx_F072RB/variant_PYBSTICK26_DUINO.h
new file mode 100644
index 0000000000..60e47c4a10
--- /dev/null
+++ b/variants/STM32F0xx/F072R(8-B)Tx_F072RB/variant_PYBSTICK26_DUINO.h
@@ -0,0 +1,157 @@
+/*
+ *******************************************************************************
+ * Copyright (c) 2021, STMicroelectronics
+ * All rights reserved.
+ *
+ * This software component is licensed by ST under BSD 3-Clause license,
+ * the "License"; You may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at:
+ * opensource.org/licenses/BSD-3-Clause
+ *
+ *******************************************************************************
+ */
+#pragma once
+
+/*----------------------------------------------------------------------------
+ * STM32 pins number
+ *----------------------------------------------------------------------------*/
+#define PB9 0
+#define PB8 1
+#define PB6 2
+#define PA2 A0
+#define PA3 A1
+#define PA0 A2
+#define PB3 6
+#define PB10 7
+#define PB12 8
+#define PB13 9
+#define PB14 10
+#define PA7 A3
+#define PB4 12
+#define PA5 A4
+#define PA10 14
+#define PA15 15
+#define PA4 A5
+#define PC3 A6
+#define PC5 A7
+#define PC6 19
+#define PC7 20
+
+#define PA13 21 // LED_RED
+#define PA14 22 // LED_GREEN
+#define PB0 23 // LED_YELLOW
+#define PB1 24 // LED_BLUE
+
+#define PC13 25 // USR_BTN
+
+#define PA11 26 // USB D-, CAN_RX
+#define PA12 27 // USB D+, CAN_TX
+
+#define PC14 28 // OSC32_IN
+#define PC15 29 // OSC32_OUT
+#define PF0 30 // OSC_IN
+#define PF1 31 // OSC_OUT
+
+// Alternate pins number
+#define PA2_ALT1 (PA2 | ALT1)
+#define PA3_ALT1 (PA3 | ALT1)
+#define PA7_ALT1 (PA7 | ALT1)
+#define PA7_ALT2 (PA7 | ALT2)
+#define PA7_ALT3 (PA7 | ALT3)
+#define PB0_ALT1 (PB0 | ALT1)
+#define PB1_ALT1 (PB1 | ALT1)
+#define PB1_ALT2 (PB1 | ALT2)
+#define PB14_ALT1 (PB14 | ALT1)
+
+#define NUM_DIGITAL_PINS 32
+#define NUM_ANALOG_INPUTS 8
+
+// PYBSTICK26 Sx pinout
+#define S3 PB9
+#define S5 PB8
+#define S7 PB6
+#define S8 PA2
+#define S10 PA3
+#define S11 PB3
+#define S12 PA0
+#define S13 PB10
+#define S13A PC3
+#define S15 PB12
+#define S15A PC5
+#define S16 PB13
+#define S16A PC6
+#define S18 PB14
+#define S18A PC7
+#define S19 PA7
+#define S21 PAB4
+#define S22 PA10
+#define S23 PA5
+#define S24 PA15
+#define S26 PA4
+
+// On-board LED pin number
+#define LED_GREEN PA14
+#define LED_RED PA13
+#define LED_YELLOW PB0
+#define LED_BLUE PB1
+
+#define LED_BUILTIN LED_RED
+
+// On-board user buttons
+#define USER_BTN PC13
+#define USER_BTN_2 PB6
+
+// SPI definitions
+#define PIN_SPI_SS PA15
+#define PIN_SPI_SS1 PA15
+#define PIN_SPI_SS2 PA4
+#define PIN_SPI_MOSI PA7
+#define PIN_SPI_MISO PB4
+#define PIN_SPI_SCK PA5
+
+// I2C definitions
+#define PIN_WIRE_SDA PB9
+#define PIN_WIRE_SCL PB8
+
+// Timer Definitions
+// Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin
+#define TIMER_TONE TIM6
+#define TIMER_SERVO TIM7
+
+// UART Definitions
+#define SERIAL_UART_INSTANCE 2
+
+// Default pin used for 'Serial' instance
+// Mandatory for Firmata
+#define PIN_SERIAL_RX PA3
+#define PIN_SERIAL_TX PA2
+
+/* Extra HAL definitions */
+#if !defined(HAL_DAC_MODULE_DISABLED)
+ #define HAL_DAC_MODULE_ENABLED
+#endif
+
+/*----------------------------------------------------------------------------
+ * Arduino objects - C++ only
+ *----------------------------------------------------------------------------*/
+
+#ifdef __cplusplus
+ // These serial port names are intended to allow libraries and architecture-neutral
+ // sketches to automatically default to the correct port name for a particular type
+ // of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
+ // the first hardware serial port whose RX/TX pins are not dedicated to another use.
+ //
+ // SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
+ //
+ // SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
+ //
+ // SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
+ //
+ // SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
+ //
+ // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
+ // pins are NOT connected to anything by default.
+ #define SERIAL_PORT_MONITOR Serial
+ #define SERIAL_PORT_USBVIRTUAL SerialUSB
+ #define SERIAL_PORT_HARDWARE Serial2
+#endif
diff --git a/variants/STM32F0xx/F091R(B-C)Tx_F091RC/generic_clock.c b/variants/STM32F0xx/F091R(B-C)Tx_F091RC/generic_clock.c
index 2f670ce43c..8a1a1cbaf2 100644
--- a/variants/STM32F0xx/F091R(B-C)Tx_F091RC/generic_clock.c
+++ b/variants/STM32F0xx/F091R(B-C)Tx_F091RC/generic_clock.c
@@ -21,8 +21,29 @@
*/
WEAK void SystemClock_Config(void)
{
- /* SystemClock_Config can be generated by STM32CubeMX */
-#warning "SystemClock_Config() is empty. Default clock at reset is used."
+ RCC_OscInitTypeDef RCC_OscInitStruct = {};
+ RCC_ClkInitTypeDef RCC_ClkInitStruct = {};
+
+ /** Initializes the RCC Oscillators according to the specified parameters
+ * in the RCC_OscInitTypeDef structure.
+ */
+ RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI48;
+ RCC_OscInitStruct.HSI48State = RCC_HSI48_ON;
+ RCC_OscInitStruct.PLL.PLLState = RCC_PLL_NONE;
+ if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) {
+ Error_Handler();
+ }
+ /** Initializes the CPU, AHB and APB buses clocks
+ */
+ RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK
+ | RCC_CLOCKTYPE_PCLK1;
+ RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_HSI48;
+ RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
+ RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
+
+ if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1) != HAL_OK) {
+ Error_Handler();
+ }
}
#endif /* ARDUINO_GENERIC_* */
diff --git a/variants/STM32F0xx/F091R(B-C)Tx_F091RC/ldscript.ld b/variants/STM32F0xx/F091R(B-C)Tx_F091RC/ldscript.ld
new file mode 100644
index 0000000000..c233d39bf9
--- /dev/null
+++ b/variants/STM32F0xx/F091R(B-C)Tx_F091RC/ldscript.ld
@@ -0,0 +1,177 @@
+/**
+ ******************************************************************************
+ * @file LinkerScript.ld
+ * @author Auto-generated by STM32CubeIDE
+ * @brief Linker script for STM32F091Rx Device from STM32F0 series
+ * 128/256Kbytes FLASH
+ * 32Kbytes RAM
+ *
+ * Set heap size, stack size and stack location according
+ * to application requirements.
+ *
+ * Set memory bank area and size if external memory is used
+ ******************************************************************************
+ * @attention
+ *
+ * © Copyright (c) 2020 STMicroelectronics.
+ * All rights reserved.
+ *
+ * This software component is licensed by ST under BSD 3-Clause license,
+ * the "License"; You may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at:
+ * opensource.org/licenses/BSD-3-Clause
+ *
+ ******************************************************************************
+ */
+
+/* Entry Point */
+ENTRY(Reset_Handler)
+
+/* Highest address of the user mode stack */
+_estack = ORIGIN(RAM) + LENGTH(RAM); /* end of "RAM" Ram type memory */
+
+_Min_Heap_Size = 0x200; /* required amount of heap */
+_Min_Stack_Size = 0x400; /* required amount of stack */
+
+/* Memories definition */
+MEMORY
+{
+ RAM (xrw) : ORIGIN = 0x20000000, LENGTH = LD_MAX_DATA_SIZE
+ FLASH (rx) : ORIGIN = 0x8000000 + LD_FLASH_OFFSET, LENGTH = LD_MAX_SIZE - LD_FLASH_OFFSET
+}
+
+/* Sections */
+SECTIONS
+{
+ /* The startup code into "FLASH" Rom type memory */
+ .isr_vector :
+ {
+ . = ALIGN(4);
+ KEEP(*(.isr_vector)) /* Startup code */
+ . = ALIGN(4);
+ } >FLASH
+
+ /* The program code and other data into "FLASH" Rom type memory */
+ .text :
+ {
+ . = ALIGN(4);
+ *(.text) /* .text sections (code) */
+ *(.text*) /* .text* sections (code) */
+ *(.glue_7) /* glue arm to thumb code */
+ *(.glue_7t) /* glue thumb to arm code */
+ *(.eh_frame)
+
+ KEEP (*(.init))
+ KEEP (*(.fini))
+
+ . = ALIGN(4);
+ _etext = .; /* define a global symbols at end of code */
+ } >FLASH
+
+ /* Constant data into "FLASH" Rom type memory */
+ .rodata :
+ {
+ . = ALIGN(4);
+ *(.rodata) /* .rodata sections (constants, strings, etc.) */
+ *(.rodata*) /* .rodata* sections (constants, strings, etc.) */
+ . = ALIGN(4);
+ } >FLASH
+
+ .ARM.extab : {
+ . = ALIGN(4);
+ *(.ARM.extab* .gnu.linkonce.armextab.*)
+ . = ALIGN(4);
+ } >FLASH
+
+ .ARM : {
+ . = ALIGN(4);
+ __exidx_start = .;
+ *(.ARM.exidx*)
+ __exidx_end = .;
+ . = ALIGN(4);
+ } >FLASH
+
+ .preinit_array :
+ {
+ . = ALIGN(4);
+ PROVIDE_HIDDEN (__preinit_array_start = .);
+ KEEP (*(.preinit_array*))
+ PROVIDE_HIDDEN (__preinit_array_end = .);
+ . = ALIGN(4);
+ } >FLASH
+
+ .init_array :
+ {
+ . = ALIGN(4);
+ PROVIDE_HIDDEN (__init_array_start = .);
+ KEEP (*(SORT(.init_array.*)))
+ KEEP (*(.init_array*))
+ PROVIDE_HIDDEN (__init_array_end = .);
+ . = ALIGN(4);
+ } >FLASH
+
+ .fini_array :
+ {
+ . = ALIGN(4);
+ PROVIDE_HIDDEN (__fini_array_start = .);
+ KEEP (*(SORT(.fini_array.*)))
+ KEEP (*(.fini_array*))
+ PROVIDE_HIDDEN (__fini_array_end = .);
+ . = ALIGN(4);
+ } >FLASH
+
+ /* Used by the startup to initialize data */
+ _sidata = LOADADDR(.data);
+
+ /* Initialized data sections into "RAM" Ram type memory */
+ .data :
+ {
+ . = ALIGN(4);
+ _sdata = .; /* create a global symbol at data start */
+ *(.data) /* .data sections */
+ *(.data*) /* .data* sections */
+ *(.RamFunc) /* .RamFunc sections */
+ *(.RamFunc*) /* .RamFunc* sections */
+
+ . = ALIGN(4);
+ _edata = .; /* define a global symbol at data end */
+
+ } >RAM AT> FLASH
+
+ /* Uninitialized data section into "RAM" Ram type memory */
+ . = ALIGN(4);
+ .bss :
+ {
+ /* This is used by the startup in order to initialize the .bss section */
+ _sbss = .; /* define a global symbol at bss start */
+ __bss_start__ = _sbss;
+ *(.bss)
+ *(.bss*)
+ *(COMMON)
+
+ . = ALIGN(4);
+ _ebss = .; /* define a global symbol at bss end */
+ __bss_end__ = _ebss;
+ } >RAM
+
+ /* User_heap_stack section, used to check that there is enough "RAM" Ram type memory left */
+ ._user_heap_stack :
+ {
+ . = ALIGN(8);
+ PROVIDE ( end = . );
+ PROVIDE ( _end = . );
+ . = . + _Min_Heap_Size;
+ . = . + _Min_Stack_Size;
+ . = ALIGN(8);
+ } >RAM
+
+ /* Remove information from the compiler libraries */
+ /DISCARD/ :
+ {
+ libc.a ( * )
+ libm.a ( * )
+ libgcc.a ( * )
+ }
+
+ .ARM.attributes 0 : { *(.ARM.attributes) }
+}
diff --git a/variants/STM32F0xx/NUCLEO_F091RC/variant_NUCLEO_F091RC.cpp b/variants/STM32F0xx/F091R(B-C)Tx_F091RC/variant_NUCLEO_F091RC.cpp
similarity index 63%
rename from variants/STM32F0xx/NUCLEO_F091RC/variant_NUCLEO_F091RC.cpp
rename to variants/STM32F0xx/F091R(B-C)Tx_F091RC/variant_NUCLEO_F091RC.cpp
index 1ef3e41afc..a65c751859 100644
--- a/variants/STM32F0xx/NUCLEO_F091RC/variant_NUCLEO_F091RC.cpp
+++ b/variants/STM32F0xx/F091R(B-C)Tx_F091RC/variant_NUCLEO_F091RC.cpp
@@ -1,27 +1,19 @@
/*
- Copyright (c) 2011 Arduino. All right reserved.
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- See the GNU Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-*/
+ *******************************************************************************
+ * Copyright (c) 2021, STMicroelectronics
+ * All rights reserved.
+ *
+ * This software component is licensed by ST under BSD 3-Clause license,
+ * the "License"; You may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at:
+ * opensource.org/licenses/BSD-3-Clause
+ *
+ *******************************************************************************
+ */
+#if defined(ARDUINO_NUCLEO_F091RC)
#include "pins_arduino.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
-
// Pin number
const PinName digitalPin[] = {
PA_3, //D0
@@ -96,13 +88,13 @@ const uint32_t analogInputPin[] = {
28, //A8
29, //A9
35, //A10
- 45 //A11
+ 45, //A11
+ 41, //A12
+ 13, //A13
+ 1, //A14
+ 0 //A15
};
-#ifdef __cplusplus
-}
-#endif
-
// ----------------------------------------------------------------------------
#ifdef __cplusplus
@@ -116,22 +108,31 @@ extern "C" {
*/
WEAK void SystemClock_Config(void)
{
- RCC_OscInitTypeDef RCC_OscInitStruct;
- RCC_ClkInitTypeDef RCC_ClkInitStruct;
-
+ RCC_OscInitTypeDef RCC_OscInitStruct = {};
+ RCC_ClkInitTypeDef RCC_ClkInitStruct = {};
+ /*
+ * Initializes the RCC Oscillators according to the specified parameters
+ * in the RCC_OscInitTypeDef structure.
+ */
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI48;
RCC_OscInitStruct.HSI48State = RCC_HSI48_ON;
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_NONE;
- HAL_RCC_OscConfig(&RCC_OscInitStruct);
-
+ if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) {
+ Error_Handler();
+ }
+ /* Initializes the CPU, AHB and APB buses clocks */
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK
| RCC_CLOCKTYPE_PCLK1;
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_HSI48;
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
- HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1);
+
+ if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1) != HAL_OK) {
+ Error_Handler();
+ }
}
#ifdef __cplusplus
}
#endif
+#endif /* ARDUINO_NUCLEO_F091RC */
diff --git a/variants/STM32F0xx/F091R(B-C)Tx_F091RC/variant_NUCLEO_F091RC.h b/variants/STM32F0xx/F091R(B-C)Tx_F091RC/variant_NUCLEO_F091RC.h
new file mode 100644
index 0000000000..a2473f2aea
--- /dev/null
+++ b/variants/STM32F0xx/F091R(B-C)Tx_F091RC/variant_NUCLEO_F091RC.h
@@ -0,0 +1,155 @@
+/*
+ *******************************************************************************
+ * Copyright (c) 2021, STMicroelectronics
+ * All rights reserved.
+ *
+ * This software component is licensed by ST under BSD 3-Clause license,
+ * the "License"; You may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at:
+ * opensource.org/licenses/BSD-3-Clause
+ *
+ *******************************************************************************
+ */
+#pragma once
+
+/*----------------------------------------------------------------------------
+ * STM32 pins number
+ *----------------------------------------------------------------------------*/
+
+#define PA3 A15
+#define PA2 A14
+#define PA10 2
+#define PB3 3
+#define PB5 4
+#define PB4 5
+#define PB10 6
+#define PA8 7
+#define PA9 8
+#define PC7 9
+#define PB6 10
+#define PA7 A6
+#define PA6 A7
+#define PA5 A13
+#define PB9 14
+#define PB8 15
+// ST Morpho
+// CN7 Left Side
+#define PC10 16
+#define PC12 17
+#define PF11 18 // BOOT0
+#define PA13 19 // SWD
+#define PA14 20 // SWD
+#define PA15 21
+#define PB7 22
+#define PC13 23
+#define PC14 24
+#define PC15 25
+#define PF0 26
+#define PF1 27
+#define PC2 A8
+#define PC3 A9
+// CN7 Right Side
+#define PC11 30
+#define PD2 31
+// CN10 Left Side
+#define PC9 32
+// CN10 Right side
+#define PC8 33
+#define PC6 34
+#define PC5 A10
+#define PA12 36
+#define PA11 37
+#define PB12 38
+#define PB11 39
+#define PB2 40
+#define PB1 A12
+#define PB15 42
+#define PB14 43
+#define PB13 44
+#define PC4 A11
+#define PA0 A0
+#define PA1 A1
+#define PA4 A2
+#define PB0 A3
+#define PC1 A4
+#define PC0 A5
+
+// Alternate pins number
+#define PA1_ALT1 (PA1 | ALT1)
+#define PA2_ALT1 (PA2 | ALT1)
+#define PA3_ALT1 (PA3 | ALT1)
+#define PA6_ALT1 (PA6 | ALT1)
+#define PA7_ALT1 (PA7 | ALT1)
+#define PA7_ALT2 (PA7 | ALT2)
+#define PA7_ALT3 (PA7 | ALT3)
+#define PB0_ALT1 (PB0 | ALT1)
+#define PB1_ALT1 (PB1 | ALT1)
+#define PB1_ALT2 (PB1 | ALT2)
+#define PB14_ALT1 (PB14 | ALT1)
+#define PB15_ALT1 (PB15 | ALT1)
+#define PB15_ALT2 (PB15 | ALT2)
+#define PC0_ALT1 (PC0 | ALT1)
+#define PC1_ALT1 (PC1 | ALT1)
+#define PC10_ALT1 (PC10 | ALT1)
+#define PC11_ALT1 (PC11 | ALT1)
+
+#define NUM_DIGITAL_PINS 52
+#define NUM_ANALOG_INPUTS 16
+
+// On-board LED pin number
+#ifndef LED_BUILTIN
+ #define LED_BUILTIN PA5
+#endif
+#define LED_GREEN LED_BUILTIN
+
+// On-board user button
+#ifndef USER_BTN
+ #define USER_BTN PC13
+#endif
+
+// Timer Definitions
+// Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin
+#ifndef TIMER_TONE
+ #define TIMER_TONE TIM6
+#endif
+#ifndef TIMER_SERVO
+ #define TIMER_SERVO TIM7
+#endif
+
+// UART Definitions
+#ifndef SERIAL_UART_INSTANCE
+ #define SERIAL_UART_INSTANCE 2 //Connected to ST-Link
+#endif
+
+// Default pin used for 'Serial' instance (ex: ST-Link)
+// Mandatory for Firmata
+#ifndef PIN_SERIAL_RX
+ #define PIN_SERIAL_RX PA3
+#endif
+#ifndef PIN_SERIAL_TX
+ #define PIN_SERIAL_TX PA2
+#endif
+
+/*----------------------------------------------------------------------------
+ * Arduino objects - C++ only
+ *----------------------------------------------------------------------------*/
+
+#ifdef __cplusplus
+ // These serial port names are intended to allow libraries and architecture-neutral
+ // sketches to automatically default to the correct port name for a particular type
+ // of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
+ // the first hardware serial port whose RX/TX pins are not dedicated to another use.
+ //
+ // SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
+ //
+ // SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
+ //
+ // SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
+ //
+ // SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
+ //
+ // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
+ // pins are NOT connected to anything by default.
+ #define SERIAL_PORT_MONITOR Serial
+ #define SERIAL_PORT_HARDWARE Serial
+#endif
diff --git a/variants/STM32F0xx/MALYANMx00_F070CB/PeripheralPins.c b/variants/STM32F0xx/MALYANMx00_F070CB/PeripheralPins.c
deleted file mode 100644
index 80a0766f44..0000000000
--- a/variants/STM32F0xx/MALYANMx00_F070CB/PeripheralPins.c
+++ /dev/null
@@ -1,228 +0,0 @@
-/*
- *******************************************************************************
- * Copyright (c) 2019, STMicroelectronics
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * 3. Neither the name of STMicroelectronics nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *******************************************************************************
- * Automatically generated from STM32F070CBTx.xml
- */
-#include "Arduino.h"
-#include "PeripheralPins.h"
-
-/* =====
- * Note: Commented lines are alternative possibilities which are not used per default.
- * If you change them, you will have to know what you do
- * =====
- */
-
-//*** ADC ***
-
-#ifdef HAL_ADC_MODULE_ENABLED
-WEAK const PinMap PinMap_ADC[] = {
- {PA_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC_IN0
- {PA_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC_IN1
- {PA_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC_IN2
- {PA_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC_IN3
- {PA_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC_IN4
- {PA_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC_IN5
- {PA_6, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC_IN6
- {PA_7, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC_IN7
- {PB_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC_IN8
- {PB_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC_IN9
- {NC, NP, 0}
-};
-#endif
-
-//*** No DAC ***
-
-//*** I2C ***
-
-#ifdef HAL_I2C_MODULE_ENABLED
-WEAK const PinMap PinMap_I2C_SDA[] = {
- {PB_7, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
- {PB_9, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
- {PB_11, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C2)},
- {PB_14, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF5_I2C2)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_I2C_MODULE_ENABLED
-WEAK const PinMap PinMap_I2C_SCL[] = {
- {PB_6, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
- {PB_8, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
- {PB_10, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C2)},
- {PB_13, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF5_I2C2)},
- {NC, NP, 0}
-};
-#endif
-
-//*** PWM ***
-
-#ifdef HAL_TIM_MODULE_ENABLED
-WEAK const PinMap PinMap_PWM[] = {
- {PA_1, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM15, 1, 1)}, // TIM15_CH1N
- {PA_2, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM15, 1, 0)}, // TIM15_CH1
- {PA_3, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM15, 2, 0)}, // TIM15_CH2
- {PA_4, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM14, 1, 0)}, // TIM14_CH1
- {PA_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 1, 0)}, // TIM3_CH1
- // {PA_6, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM16, 1, 0)}, // TIM16_CH1
- // {PA_7, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 1, 1)}, // TIM1_CH1N
- // {PA_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 2, 0)}, // TIM3_CH2
- // {PA_7, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM14, 1, 0)}, // TIM14_CH1
- {PA_7, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM17, 1, 0)}, // TIM17_CH1
- {PA_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 1, 0)}, // TIM1_CH1
- {PA_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 2, 0)}, // TIM1_CH2
- {PA_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 3, 0)}, // TIM1_CH3
- {PA_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 4, 0)}, // TIM1_CH4
- {PB_0, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 2, 1)}, // TIM1_CH2N
- // {PB_0, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 3, 0)}, // TIM3_CH3
- {PB_1, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 3, 1)}, // TIM1_CH3N
- // {PB_1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 4, 0)}, // TIM3_CH4
- // {PB_1, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM14, 1, 0)}, // TIM14_CH1
- {PB_4, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 1, 0)}, // TIM3_CH1
- {PB_5, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 2, 0)}, // TIM3_CH2
- {PB_6, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM16, 1, 1)}, // TIM16_CH1N
- {PB_7, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM17, 1, 1)}, // TIM17_CH1N
- {PB_8, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM16, 1, 0)}, // TIM16_CH1
- {PB_9, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM17, 1, 0)}, // TIM17_CH1
- {PB_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 1, 1)}, // TIM1_CH1N
- {PB_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 2, 1)}, // TIM1_CH2N
- // {PB_14, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM15, 1, 0)}, // TIM15_CH1
- // {PB_15, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 3, 1)}, // TIM1_CH3N
- // {PB_15, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM15, 1, 1)}, // TIM15_CH1N
- {PB_15, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM15, 2, 0)}, // TIM15_CH2
- {NC, NP, 0}
-};
-#endif
-
-//*** SERIAL ***
-
-#ifdef HAL_UART_MODULE_ENABLED
-WEAK const PinMap PinMap_UART_TX[] = {
- {PA_0, USART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART4)},
- {PA_2, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
- {PA_9, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
- {PA_14, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
- {PB_6, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART1)},
- {PB_10, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_UART_MODULE_ENABLED
-WEAK const PinMap PinMap_UART_RX[] = {
- {PA_1, USART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART4)},
- {PA_3, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
- {PA_10, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
- {PA_15, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
- {PB_7, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART1)},
- {PB_11, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_UART_MODULE_ENABLED
-WEAK const PinMap PinMap_UART_RTS[] = {
- {PA_1, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
- {PA_12, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
- {PA_15, USART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART4)},
- {PB_1, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
- {PB_14, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_UART_MODULE_ENABLED
-WEAK const PinMap PinMap_UART_CTS[] = {
- {PA_0, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
- {PA_6, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
- {PA_11, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
- {PB_7, USART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART4)},
- {PB_13, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
- {NC, NP, 0}
-};
-#endif
-
-//*** SPI ***
-
-#ifdef HAL_SPI_MODULE_ENABLED
-WEAK const PinMap PinMap_SPI_MOSI[] = {
- {PA_7, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PB_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PB_15, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_SPI_MODULE_ENABLED
-WEAK const PinMap PinMap_SPI_MISO[] = {
- {PA_6, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PB_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PB_14, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_SPI_MODULE_ENABLED
-WEAK const PinMap PinMap_SPI_SCLK[] = {
- {PA_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PB_3, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PB_10, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)},
- {PB_13, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_SPI_MODULE_ENABLED
-WEAK const PinMap PinMap_SPI_SSEL[] = {
- {PA_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PA_15, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PB_9, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)},
- {PB_12, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
- {NC, NP, 0}
-};
-#endif
-
-//*** No CAN ***
-
-//*** No ETHERNET ***
-
-//*** No QUADSPI ***
-
-//*** USB ***
-
-#ifdef HAL_PCD_MODULE_ENABLED
-WEAK const PinMap PinMap_USB[] = {
- {PA_11, USB, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_DM
- {PA_12, USB, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_DP
- {PA_13, USB, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_USB)}, // USB_NOE
- {NC, NP, 0}
-};
-#endif
-
-//*** No USB_OTG_FS ***
-
-//*** No USB_OTG_HS ***
diff --git a/variants/STM32F0xx/MALYANMx00_F070CB/PinNamesVar.h b/variants/STM32F0xx/MALYANMx00_F070CB/PinNamesVar.h
deleted file mode 100644
index 6d0d761274..0000000000
--- a/variants/STM32F0xx/MALYANMx00_F070CB/PinNamesVar.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* SYS_WKUP */
-#ifdef PWR_WAKEUP_PIN1
- SYS_WKUP1 = PA_0,
-#endif
-#ifdef PWR_WAKEUP_PIN2
- SYS_WKUP2 = PC_13,
-#endif
-#ifdef PWR_WAKEUP_PIN3
- SYS_WKUP3 = NC,
-#endif
-#ifdef PWR_WAKEUP_PIN4
- SYS_WKUP4 = PA_2,
-#endif
-#ifdef PWR_WAKEUP_PIN5
- SYS_WKUP5 = NC,
-#endif
-#ifdef PWR_WAKEUP_PIN6
- SYS_WKUP6 = PB_5,
-#endif
-#ifdef PWR_WAKEUP_PIN7
- SYS_WKUP7 = PB_15,
-#endif
-#ifdef PWR_WAKEUP_PIN8
- SYS_WKUP8 = NC,
-#endif
-/* USB */
-#ifdef USBCON
- USB_DM = PA_11,
- USB_DP = PA_12,
- USB_NOE = PA_13,
-#endif
diff --git a/variants/STM32F0xx/NUCLEO_F030R8/PeripheralPins.c b/variants/STM32F0xx/NUCLEO_F030R8/PeripheralPins.c
deleted file mode 100644
index 81b2b322c6..0000000000
--- a/variants/STM32F0xx/NUCLEO_F030R8/PeripheralPins.c
+++ /dev/null
@@ -1,212 +0,0 @@
-/*
- *******************************************************************************
- * Copyright (c) 2019, STMicroelectronics
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * 3. Neither the name of STMicroelectronics nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *******************************************************************************
- * Automatically generated from STM32F030R8Tx.xml
- */
-#include "Arduino.h"
-#include "PeripheralPins.h"
-
-/* =====
- * Note: Commented lines are alternative possibilities which are not used per default.
- * If you change them, you will have to know what you do
- * =====
- */
-
-//*** ADC ***
-
-#ifdef HAL_ADC_MODULE_ENABLED
-WEAK const PinMap PinMap_ADC[] = {
- {PA_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC_IN0
- {PA_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC_IN1
- // {PA_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC_IN2 - STLink Tx
- // {PA_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC_IN3 - STLink Rx
- {PA_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC_IN4
- // {PA_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC_IN5 - LED
- {PA_6, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC_IN6
- {PA_7, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC_IN7
- {PB_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC_IN8
- // {PB_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC_IN9
- {PC_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC_IN10
- {PC_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC_IN11
- {PC_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC_IN12
- {PC_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC_IN13
- {PC_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC_IN14
- {PC_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC_IN15
- {NC, NP, 0}
-};
-#endif
-
-//*** No DAC ***
-
-//*** I2C ***
-
-#ifdef HAL_I2C_MODULE_ENABLED
-WEAK const PinMap PinMap_I2C_SDA[] = {
- {PB_7, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
- {PB_9, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
- {PB_11, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C2)},
- {PF_7, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF_NONE)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_I2C_MODULE_ENABLED
-WEAK const PinMap PinMap_I2C_SCL[] = {
- {PB_6, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
- {PB_8, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
- {PB_10, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C2)},
- {PF_6, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF_NONE)},
- {NC, NP, 0}
-};
-#endif
-
-//*** PWM ***
-
-#ifdef HAL_TIM_MODULE_ENABLED
-WEAK const PinMap PinMap_PWM[] = {
- // {PA_2, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM15, 1, 0)}, // TIM15_CH1 - STLink Tx
- // {PA_3, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM15, 2, 0)}, // TIM15_CH2 - STLink Rx
- {PA_4, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM14, 1, 0)}, // TIM14_CH1
- {PA_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 1, 0)}, // TIM3_CH1
- // {PA_6, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM16, 1, 0)}, // TIM16_CH1
- // {PA_7, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 1, 1)}, // TIM1_CH1N
- {PA_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 2, 0)}, // TIM3_CH2
- // {PA_7, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM14, 1, 0)}, // TIM14_CH1
- // {PA_7, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM17, 1, 0)}, // TIM17_CH1
- {PA_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 1, 0)}, // TIM1_CH1
- {PA_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 2, 0)}, // TIM1_CH2
- {PA_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 3, 0)}, // TIM1_CH3
- {PA_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 4, 0)}, // TIM1_CH4
- {PB_0, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 2, 1)}, // TIM1_CH2N
- {PB_0, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 3, 0)}, // TIM3_CH3
- // {PB_1, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 3, 1)}, // TIM1_CH3N
- {PB_1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 4, 0)}, // TIM3_CH4
- // {PB_1, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM14, 1, 0)}, // TIM14_CH1
- {PB_4, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 1, 0)}, // TIM3_CH1
- {PB_5, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 2, 0)}, // TIM3_CH2
- {PB_6, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM16, 1, 1)}, // TIM16_CH1N
- {PB_7, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM17, 1, 1)}, // TIM17_CH1N
- {PB_8, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM16, 1, 0)}, // TIM16_CH1
- {PB_9, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM17, 1, 0)}, // TIM17_CH1
- {PB_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 1, 1)}, // TIM1_CH1N
- // {PB_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 2, 1)}, // TIM1_CH2N
- {PB_14, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM15, 1, 0)}, // TIM15_CH1
- // {PB_15, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 3, 1)}, // TIM1_CH3N
- // {PB_15, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM15, 1, 1)}, // TIM15_CH1N
- {PB_15, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM15, 2, 0)}, // TIM15_CH2
- {PC_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_MCO, 1, 0)}, // TIM3_CH1
- {PC_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_MCO, 2, 0)}, // TIM3_CH2
- {PC_8, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 3, 0)}, // TIM3_CH3
- {PC_9, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_MCO, 4, 0)}, // TIM3_CH4
- {NC, NP, 0}
-};
-#endif
-
-//*** SERIAL ***
-
-#ifdef HAL_UART_MODULE_ENABLED
-WEAK const PinMap PinMap_UART_TX[] = {
- {PA_2, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
- {PA_9, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
- {PA_14, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
- {PB_6, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART1)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_UART_MODULE_ENABLED
-WEAK const PinMap PinMap_UART_RX[] = {
- {PA_3, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
- {PA_10, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
- {PA_15, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
- {PB_7, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART1)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_UART_MODULE_ENABLED
-WEAK const PinMap PinMap_UART_RTS[] = {
- {PA_1, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
- {PA_12, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_UART_MODULE_ENABLED
-WEAK const PinMap PinMap_UART_CTS[] = {
- {PA_0, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
- {PA_11, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
- {NC, NP, 0}
-};
-#endif
-
-//*** SPI ***
-
-#ifdef HAL_SPI_MODULE_ENABLED
-WEAK const PinMap PinMap_SPI_MOSI[] = {
- {PA_7, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PB_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PB_15, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_SPI_MODULE_ENABLED
-WEAK const PinMap PinMap_SPI_MISO[] = {
- {PA_6, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PB_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PB_14, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_SPI_MODULE_ENABLED
-WEAK const PinMap PinMap_SPI_SCLK[] = {
- {PA_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)}, // LED
- {PB_3, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PB_13, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_SPI_MODULE_ENABLED
-WEAK const PinMap PinMap_SPI_SSEL[] = {
- {PA_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PA_15, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PB_12, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
- {NC, NP, 0}
-};
-#endif
-
-//*** No CAN ***
-
-//*** No ETHERNET ***
-
-//*** No QUADSPI ***
-
-//*** No USB ***
diff --git a/variants/STM32F0xx/NUCLEO_F030R8/PinNamesVar.h b/variants/STM32F0xx/NUCLEO_F030R8/PinNamesVar.h
deleted file mode 100644
index 87d21ee39c..0000000000
--- a/variants/STM32F0xx/NUCLEO_F030R8/PinNamesVar.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/* SYS_WKUP */
-#ifdef PWR_WAKEUP_PIN1
- SYS_WKUP1 = PA_0,
-#endif
-#ifdef PWR_WAKEUP_PIN2
- SYS_WKUP2 = PC_13,
-#endif
-#ifdef PWR_WAKEUP_PIN3
- SYS_WKUP3 = NC,
-#endif
-#ifdef PWR_WAKEUP_PIN4
- SYS_WKUP4 = NC,
-#endif
-#ifdef PWR_WAKEUP_PIN5
- SYS_WKUP5 = NC,
-#endif
-#ifdef PWR_WAKEUP_PIN6
- SYS_WKUP6 = NC,
-#endif
-#ifdef PWR_WAKEUP_PIN7
- SYS_WKUP7 = NC,
-#endif
-#ifdef PWR_WAKEUP_PIN8
- SYS_WKUP8 = NC,
-#endif
diff --git a/variants/STM32F0xx/NUCLEO_F030R8/ldscript.ld b/variants/STM32F0xx/NUCLEO_F030R8/ldscript.ld
deleted file mode 100644
index 1b6dd33981..0000000000
--- a/variants/STM32F0xx/NUCLEO_F030R8/ldscript.ld
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
-*****************************************************************************
-**
-
-** File : LinkerScript.ld
-**
-** Abstract : Linker script for STM32F030R8Tx Device with
-** 64KByte FLASH, 8KByte RAM
-**
-** Set heap size, stack size and stack location according
-** to application requirements.
-**
-** Set memory bank area and size if external memory is used.
-**
-** Target : STMicroelectronics STM32
-**
-**
-** Distribution: The file is distributed as is, without any warranty
-** of any kind.
-**
-*****************************************************************************
-** @attention
-**
-** © COPYRIGHT(c) 2014 Ac6
-**
-** Redistribution and use in source and binary forms, with or without modification,
-** are permitted provided that the following conditions are met:
-** 1. Redistributions of source code must retain the above copyright notice,
-** this list of conditions and the following disclaimer.
-** 2. Redistributions in binary form must reproduce the above copyright notice,
-** this list of conditions and the following disclaimer in the documentation
-** and/or other materials provided with the distribution.
-** 3. Neither the name of Ac6 nor the names of its contributors
-** may be used to endorse or promote products derived from this software
-** without specific prior written permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-** SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-**
-*****************************************************************************
-*/
-
-/* Entry Point */
-ENTRY(Reset_Handler)
-
-/* Highest address of the user mode stack */
-_estack = 0x20002000; /* end of RAM */
-/* Generate a link error if heap and stack don't fit into RAM */
-_Min_Heap_Size = 0x400; /* required amount of heap */
-_Min_Stack_Size = 0x860; /* required amount of stack */
-
-/* Specify the memory areas */
-MEMORY
-{
-FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 64K
-RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 8K
-}
-
-/* Define output sections */
-SECTIONS
-{
- /* The startup code goes first into FLASH */
- .isr_vector :
- {
- . = ALIGN(4);
- KEEP(*(.isr_vector)) /* Startup code */
- . = ALIGN(4);
- } >FLASH
-
- /* The program code and other data goes into FLASH */
- .text ALIGN(4):
- {
- . = ALIGN(4);
- *(.text) /* .text sections (code) */
- *(.text*) /* .text* sections (code) */
- *(.glue_7) /* glue arm to thumb code */
- *(.glue_7t) /* glue thumb to arm code */
- *(.eh_frame)
-
- KEEP (*(.init))
- KEEP (*(.fini))
-
- . = ALIGN(4);
- _etext = .; /* define a global symbols at end of code */
- } >FLASH
-
- /* Constant data goes into FLASH */
- .rodata :
- {
- . = ALIGN(4);
- *(.rodata) /* .rodata sections (constants, strings, etc.) */
- *(.rodata*) /* .rodata* sections (constants, strings, etc.) */
- . = ALIGN(4);
- } >FLASH
-
- .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >FLASH
- .ARM : {
- __exidx_start = .;
- *(.ARM.exidx*)
- __exidx_end = .;
- } >FLASH
-
- .preinit_array :
- {
- PROVIDE_HIDDEN (__preinit_array_start = .);
- KEEP (*(.preinit_array*))
- PROVIDE_HIDDEN (__preinit_array_end = .);
- } >FLASH
- .init_array :
- {
- PROVIDE_HIDDEN (__init_array_start = .);
- KEEP (*(SORT(.init_array.*)))
- KEEP (*(.init_array*))
- PROVIDE_HIDDEN (__init_array_end = .);
- } >FLASH
- .fini_array :
- {
- PROVIDE_HIDDEN (__fini_array_start = .);
- KEEP (*(SORT(.fini_array.*)))
- KEEP (*(.fini_array*))
- PROVIDE_HIDDEN (__fini_array_end = .);
- } >FLASH
-
- /* used by the startup to initialize data */
- _sidata = LOADADDR(.data);
-
- /* Initialized data sections goes into RAM, load LMA copy after code */
- .data :
- {
- . = ALIGN(4);
- _sdata = .; /* create a global symbol at data start */
- *(.data) /* .data sections */
- *(.data*) /* .data* sections */
-
- . = ALIGN(4);
- _edata = .; /* define a global symbol at data end */
- } >RAM AT> FLASH
-
-
- /* Uninitialized data section */
- . = ALIGN(4);
- .bss :
- {
- /* This is used by the startup in order to initialize the .bss secion */
- _sbss = .; /* define a global symbol at bss start */
- __bss_start__ = _sbss;
- *(.bss)
- *(.bss*)
- *(COMMON)
-
- . = ALIGN(4);
- _ebss = .; /* define a global symbol at bss end */
- __bss_end__ = _ebss;
- } >RAM
-
- /* User_heap_stack section, used to check that there is enough RAM left */
- ._user_heap_stack :
- {
- . = ALIGN(8);
- PROVIDE ( end = . );
- PROVIDE ( _end = . );
- . = . + _Min_Heap_Size;
- . = . + _Min_Stack_Size;
- . = ALIGN(8);
- } >RAM
-
-
-
- /* Remove information from the standard libraries */
- /DISCARD/ :
- {
- libc.a ( * )
- libm.a ( * )
- libgcc.a ( * )
- }
-
- .ARM.attributes 0 : { *(.ARM.attributes) }
-}
diff --git a/variants/STM32F0xx/NUCLEO_F030R8/variant_NUCLEO_F030R8.cpp b/variants/STM32F0xx/NUCLEO_F030R8/variant_NUCLEO_F030R8.cpp
deleted file mode 100644
index 18b625eba3..0000000000
--- a/variants/STM32F0xx/NUCLEO_F030R8/variant_NUCLEO_F030R8.cpp
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- Copyright (c) 2011 Arduino. All right reserved.
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- See the GNU Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-*/
-
-#include "pins_arduino.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-// Pin number
-const PinName digitalPin[] = {
- PA_3, //D0
- PA_2, //D1
- PA_10, //D2
- PB_3, //D3 - no PWM
- PB_5, //D4
- PB_4, //D5
- PB_10, //D6 - no PWM
- PA_8, //D7
- PA_9, //D8
- PC_7, //D9
- PB_6, //D10
- PA_7, //D11
- PA_6, //D12
- PA_5, //D13
- PB_9, //D14
- PB_8, //D15
- // ST Morpho
- // CN7 Left Side
- PC_10, //D16
- PC_12, //D17
- PF_6, //D18
- PF_7, //D19
- PA_13, //D20 - SWD
- PA_14, //D21 - SWD
- PA_15, //D22
- PB_7, //D23
- PC_13, //D24
- PC_14, //D25
- PC_15, //D26
- PF_0, //D27
- PF_1, //D28
- PC_2, //D29
- PC_3, //D30
- // CN7 Right Side
- PC_11, //D31
- PD_2, //D32
- // CN10 Left Side
- PC_9, //D33
- // CN10 Right side
- PC_8, //D34
- PC_6, //D35
- PC_5, //D36
- PA_12, //D37
- PA_11, //D38
- PB_12, //D39
- PB_11, //D40
- PB_2, //D41
- PB_1, //D42
- PB_15, //D43
- PB_14, //D44
- PB_13, //D45
- PC_4, //D46
- PF_5, //D47
- PF_4, //D48
- PA_0, //D49/A0
- PA_1, //D50/A1
- PA_4, //D51/A2
- PB_0, //D52/A3
- PC_1, //D53/A4
- PC_0 //D54/A5
-};
-
-// Analog (Ax) pin number array
-const uint32_t analogInputPin[] = {
- 49, //A0
- 50, //A1
- 51, //A2
- 52, //A3
- 53, //A4
- 54, //A5
- 11, //A6
- 12, //A7
- 29, //A8
- 30, //A9
- 36, //A10
- 46 //A11
-};
-
-#ifdef __cplusplus
-}
-#endif
-
-// ----------------------------------------------------------------------------
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * @brief System Clock Configuration
- * The system Clock is configured as follow :
- * System Clock source = PLL (HSI/2)
- * SYSCLK(Hz) = 48000000
- * HCLK(Hz) = 48000000
- * AHB Prescaler = 1
- * APB1 Prescaler = 1
- * HSI Frequency(Hz) = 8000000
- * PREDIV = 1
- * PLLMUL = 12
- * Flash Latency(WS) = 1
- * @param None
- * @retval None
- */
-WEAK void SystemClock_Config(void)
-{
- RCC_ClkInitTypeDef RCC_ClkInitStruct;
- RCC_OscInitTypeDef RCC_OscInitStruct;
-
- /* No HSE Oscillator on Nucleo, Activate PLL with HSI/2 as source */
- RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
- RCC_OscInitStruct.HSIState = RCC_HSI_ON;
- RCC_OscInitStruct.HSICalibrationValue = 15;
- RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
- RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
- RCC_OscInitStruct.PLL.PREDIV = RCC_PREDIV_DIV1;
- RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL12;
- if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) {
- /* Initialization Error */
- while (1);
- }
-
- /* Select PLL as system clock source and configure the HCLK, PCLK1 clocks dividers */
- RCC_ClkInitStruct.ClockType = (RCC_CLOCKTYPE_SYSCLK | RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_PCLK1);
- RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
- RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
- RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
- if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1) != HAL_OK) {
- /* Initialization Error */
- while (1);
- }
-}
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/variants/STM32F0xx/NUCLEO_F030R8/variant_NUCLEO_F030R8.h b/variants/STM32F0xx/NUCLEO_F030R8/variant_NUCLEO_F030R8.h
deleted file mode 100644
index 11e056581a..0000000000
--- a/variants/STM32F0xx/NUCLEO_F030R8/variant_NUCLEO_F030R8.h
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- Copyright (c) 2011 Arduino. All right reserved.
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- See the GNU Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-*/
-
-#ifndef _VARIANT_ARDUINO_STM32_
-#define _VARIANT_ARDUINO_STM32_
-
-#ifdef __cplusplus
-extern "C" {
-#endif // __cplusplus
-
-/*----------------------------------------------------------------------------
- * Pins
- *----------------------------------------------------------------------------*/
-
-#define PA3 0
-#define PA2 1
-#define PA10 2
-#define PB3 3 // no PWM
-#define PB5 4
-#define PB4 5
-#define PB10 6 // no PWM
-#define PA8 7
-#define PA9 8
-#define PC7 9
-#define PB6 10
-#define PA7 A6
-#define PA6 A7
-#define PA5 13
-#define PB9 14
-#define PB8 15
-// ST Morpho
-// CN7 Left Side
-#define PC10 16
-#define PC12 17
-#define PF6 18
-#define PF7 19
-#define PA13 20 // SWD
-#define PA14 21 // SWD
-#define PA15 22
-#define PB7 23
-#define PC13 24
-#define PC14 25
-#define PC15 26
-#define PF0 27
-#define PF1 28
-#define PC2 A8
-#define PC3 A9
-// CN7 Right Side
-#define PC11 31
-#define PD2 32
-// CN10 Left Side
-#define PC9 33
-// CN10 Right side
-#define PC8 34
-#define PC6 35
-#define PC5 A10
-#define PA12 37
-#define PA11 38
-#define PB12 39
-#define PB11 40
-#define PB2 41
-#define PB1 42
-#define PB15 43
-#define PB14 44
-#define PB13 45
-#define PC4 A11
-#define PF5 47
-#define PF4 48
-#define PA0 A0
-#define PA1 A1
-#define PA4 A2
-#define PB0 A3
-#define PC1 A4
-#define PC0 A5
-
-// This must be a literal
-#define NUM_DIGITAL_PINS 55
-// This must be a literal with a value less than or equal to to MAX_ANALOG_INPUTS
-#define NUM_ANALOG_INPUTS 12
-
-// On-board LED pin number
-#define LED_BUILTIN 13
-#define LED_GREEN LED_BUILTIN
-
-// On-board user button
-#define USER_BTN PC13
-
-// Timer Definitions
-// Use TIM6 when possible as servo and tone don't need GPIO output pin
-#define TIMER_TONE TIM6
-#define TIMER_SERVO TIM3
-
-// UART Definitions
-#define SERIAL_UART_INSTANCE 2 //Connected to ST-Link
-// Default pin used for 'Serial' instance (ex: ST-Link)
-// Mandatory for Firmata
-#define PIN_SERIAL_RX 0
-#define PIN_SERIAL_TX 1
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-/*----------------------------------------------------------------------------
- * Arduino objects - C++ only
- *----------------------------------------------------------------------------*/
-
-#ifdef __cplusplus
- // These serial port names are intended to allow libraries and architecture-neutral
- // sketches to automatically default to the correct port name for a particular type
- // of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
- // the first hardware serial port whose RX/TX pins are not dedicated to another use.
- //
- // SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
- //
- // SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
- //
- // SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
- //
- // SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
- //
- // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
- // pins are NOT connected to anything by default.
- #define SERIAL_PORT_MONITOR Serial
- #define SERIAL_PORT_HARDWARE Serial
-#endif
-
-#endif /* _VARIANT_ARDUINO_STM32_ */
diff --git a/variants/STM32F0xx/NUCLEO_F031K6/PeripheralPins.c b/variants/STM32F0xx/NUCLEO_F031K6/PeripheralPins.c
deleted file mode 100644
index 86303d5e89..0000000000
--- a/variants/STM32F0xx/NUCLEO_F031K6/PeripheralPins.c
+++ /dev/null
@@ -1,176 +0,0 @@
-/*
- *******************************************************************************
- * Copyright (c) 2020, STMicroelectronics
- * All rights reserved.
- *
- * This software component is licensed by ST under BSD 3-Clause license,
- * the "License"; You may not use this file except in compliance with the
- * License. You may obtain a copy of the License at:
- * opensource.org/licenses/BSD-3-Clause
- *
- *******************************************************************************
- * Automatically generated from STM32F031K6Tx.xml
- */
-#include "Arduino.h"
-#include "PeripheralPins.h"
-
-/* =====
- * Note: Commented lines are alternative possibilities which are not used per default.
- * If you change them, you will have to know what you do
- * =====
- */
-
-//*** ADC ***
-
-#ifdef HAL_ADC_MODULE_ENABLED
-WEAK const PinMap PinMap_ADC[] = {
- {PA_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC_IN0
- {PA_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC_IN1
- {PA_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC_IN2 // Connected to STLink Tx
- {PA_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC_IN3
- {PA_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC_IN4
- {PA_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC_IN5
- {PA_6, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC_IN6
- {PA_7, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC_IN7
- {PB_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC_IN8
- {PB_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC_IN9
- {NC, NP, 0}
-};
-#endif
-
-//*** No DAC ***
-
-//*** I2C ***
-
-#ifdef HAL_I2C_MODULE_ENABLED
-WEAK const PinMap PinMap_I2C_SDA[] = {
- {PA_10, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)},
- {PB_7, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_I2C_MODULE_ENABLED
-WEAK const PinMap PinMap_I2C_SCL[] = {
- {PA_9, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)},
- {PB_6, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
- {NC, NP, 0}
-};
-#endif
-
-//*** PWM ***
-
-#ifdef HAL_TIM_MODULE_ENABLED
-WEAK const PinMap PinMap_PWM[] = {
- {PA_0, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 1, 0)}, // TIM2_CH1
- {PA_1, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 2, 0)}, // TIM2_CH2
- {PA_2, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 3, 0)}, // TIM2_CH3 // Connected to STLink Tx
- {PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 4, 0)}, // TIM2_CH4
- {PA_4, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM14, 1, 0)}, // TIM14_CH1
- {PA_5, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 1, 0)}, // TIM2_CH1
- {PA_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 1, 0)}, // TIM3_CH1
- // {PA_6, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM16, 1, 0)}, // TIM16_CH1
- {PA_7, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 1, 1)}, // TIM1_CH1N
- // {PA_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 2, 0)}, // TIM3_CH2
- // {PA_7, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM14, 1, 0)}, // TIM14_CH1
- // {PA_7, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM17, 1, 0)}, // TIM17_CH1
- {PA_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 1, 0)}, // TIM1_CH1
- {PA_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 2, 0)}, // TIM1_CH2
- {PA_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 3, 0)}, // TIM1_CH3
- {PA_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 4, 0)}, // TIM1_CH4
- {PA_15, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 1, 0)}, // TIM2_CH1 // Connected to STLink Rx
- // {PB_0, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 2, 1)}, // TIM1_CH2N
- {PB_0, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 3, 0)}, // TIM3_CH3
- // {PB_1, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 3, 1)}, // TIM1_CH3N
- {PB_1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 4, 0)}, // TIM3_CH4
- // {PB_1, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM14, 1, 0)}, // TIM14_CH1
- {PB_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 2, 0)}, // TIM2_CH2
- {PB_4, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 1, 0)}, // TIM3_CH1
- {PB_5, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 2, 0)}, // TIM3_CH2
- {PB_6, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM16, 1, 1)}, // TIM16_CH1N
- {PB_7, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM17, 1, 1)}, // TIM17_CH1N
- {NC, NP, 0}
-};
-#endif
-
-//*** SERIAL ***
-
-#ifdef HAL_UART_MODULE_ENABLED
-WEAK const PinMap PinMap_UART_TX[] = {
- {PA_2, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)}, // Connected to STLink Rx
- {PA_9, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
- // {PA_14, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)}, // Connected to SWCLK
- {PB_6, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART1)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_UART_MODULE_ENABLED
-WEAK const PinMap PinMap_UART_RX[] = {
- {PA_3, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
- {PA_10, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
- {PA_15, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)}, // Connected to STLink Rx
- {PB_7, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART1)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_UART_MODULE_ENABLED
-WEAK const PinMap PinMap_UART_RTS[] = {
- {PA_1, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
- {PA_12, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_UART_MODULE_ENABLED
-WEAK const PinMap PinMap_UART_CTS[] = {
- {PA_0, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
- {PA_11, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
- {NC, NP, 0}
-};
-#endif
-
-//*** SPI ***
-
-#ifdef HAL_SPI_MODULE_ENABLED
-WEAK const PinMap PinMap_SPI_MOSI[] = {
- {PA_7, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PB_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_SPI_MODULE_ENABLED
-WEAK const PinMap PinMap_SPI_MISO[] = {
- {PA_6, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PB_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_SPI_MODULE_ENABLED
-WEAK const PinMap PinMap_SPI_SCLK[] = {
- {PA_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PB_3, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_SPI_MODULE_ENABLED
-WEAK const PinMap PinMap_SPI_SSEL[] = {
- {PA_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PA_15, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)}, // Connected to STLink Rx
- {NC, NP, 0}
-};
-#endif
-
-//*** No CAN ***
-
-//*** No ETHERNET ***
-
-//*** No QUADSPI ***
-
-//*** No USB ***
-
-//*** No SD ***
diff --git a/variants/STM32F0xx/NUCLEO_F031K6/PinNamesVar.h b/variants/STM32F0xx/NUCLEO_F031K6/PinNamesVar.h
deleted file mode 100644
index 87d21ee39c..0000000000
--- a/variants/STM32F0xx/NUCLEO_F031K6/PinNamesVar.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/* SYS_WKUP */
-#ifdef PWR_WAKEUP_PIN1
- SYS_WKUP1 = PA_0,
-#endif
-#ifdef PWR_WAKEUP_PIN2
- SYS_WKUP2 = PC_13,
-#endif
-#ifdef PWR_WAKEUP_PIN3
- SYS_WKUP3 = NC,
-#endif
-#ifdef PWR_WAKEUP_PIN4
- SYS_WKUP4 = NC,
-#endif
-#ifdef PWR_WAKEUP_PIN5
- SYS_WKUP5 = NC,
-#endif
-#ifdef PWR_WAKEUP_PIN6
- SYS_WKUP6 = NC,
-#endif
-#ifdef PWR_WAKEUP_PIN7
- SYS_WKUP7 = NC,
-#endif
-#ifdef PWR_WAKEUP_PIN8
- SYS_WKUP8 = NC,
-#endif
diff --git a/variants/STM32F0xx/NUCLEO_F031K6/variant_NUCLEO_F031K6.cpp b/variants/STM32F0xx/NUCLEO_F031K6/variant_NUCLEO_F031K6.cpp
deleted file mode 100644
index d09496694e..0000000000
--- a/variants/STM32F0xx/NUCLEO_F031K6/variant_NUCLEO_F031K6.cpp
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- Copyright (c) 2011 Arduino. All right reserved.
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- See the GNU Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-*/
-
-#include "pins_arduino.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-// Pin number
-const PinName digitalPin[] = {
- PA_10, //D0
- PA_9, //D1
- PA_12, //D2 - no PWM
- PB_0, //D3
- PB_7, //D4
- PB_6, //D5
- PB_1, //D6
- PF_0, //D7 - no PWM
- PF_1, //D8 - no PWM
- PA_8, //D9
- PA_11, //D10
- PB_5, //D11
- PB_4, //D12
- PB_3, //D13 - LED
- PA_0, //D14/A0
- PA_1, //D15/A1
- PA_3, //D16/A2
- PA_4, //D17/A3
- PA_5, //D18/A4
- PA_6, //D19/A5
- PA_7, //D20/A6
- PA_2, //D21/A7 - STLink Tx
- PA_15 //D22 - STLink Rx
-};
-
-// Analog (Ax) pin number array
-const uint32_t analogInputPin[] = {
- 14, // A0
- 15, // A1
- 16, // A2
- 17, // A3
- 18, // A4
- 19, // A5
- 20, // A6
- 21 // A7
-};
-
-#ifdef __cplusplus
-}
-#endif
-
-// ----------------------------------------------------------------------------
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * @brief System Clock Configuration
- * @param None
- * @retval None
- */
-WEAK void SystemClock_Config(void)
-{
- RCC_ClkInitTypeDef RCC_ClkInitStruct;
- RCC_OscInitTypeDef RCC_OscInitStruct;
-
- /* No HSE Oscillator on Nucleo, Activate PLL with HSI/2 as source */
- RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_NONE;
- RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
- RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
- RCC_OscInitStruct.PLL.PREDIV = RCC_PREDIV_DIV1;
- RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL12;
- if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) {
- /* Initialization Error */
- while (1);
- }
-
- /* Select PLL as system clock source and configure the HCLK, PCLK1 clocks dividers */
- RCC_ClkInitStruct.ClockType = (RCC_CLOCKTYPE_SYSCLK | RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_PCLK1);
- RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
- RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
- RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
- if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1) != HAL_OK) {
- /* Initialization Error */
- while (1);
- }
-}
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/variants/STM32F0xx/NUCLEO_F031K6/variant_NUCLEO_F031K6.h b/variants/STM32F0xx/NUCLEO_F031K6/variant_NUCLEO_F031K6.h
deleted file mode 100644
index 0b16505f31..0000000000
--- a/variants/STM32F0xx/NUCLEO_F031K6/variant_NUCLEO_F031K6.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- Copyright (c) 2011 Arduino. All right reserved.
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- See the GNU Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-*/
-
-#ifndef _VARIANT_ARDUINO_STM32_
-#define _VARIANT_ARDUINO_STM32_
-
-#ifdef __cplusplus
-extern "C" {
-#endif // __cplusplus
-
-/*----------------------------------------------------------------------------
- * Pins
- *----------------------------------------------------------------------------*/
-
-// digital
-#define PA10 0
-#define PA9 1
-#define PA12 2 // no PWM
-#define PB0 3
-#define PB7 4
-#define PB6 5
-#define PB1 6
-#define PF0 7 // no PWM
-#define PF1 8 // no PWM
-#define PA8 9
-#define PA11 10
-#define PB5 11
-#define PB4 12
-#define PB3 13 // LED
-// analog in
-#define PA0 A0
-#define PA1 A1
-#define PA3 A2
-#define PA4 A3
-#define PA5 A4
-#define PA6 A5
-#define PA7 A6
-#define PA2 A7 // SB2 ON STLink Tx
-#define PA15 22 // STLink Rx
-
-// This must be a literal
-#define NUM_DIGITAL_PINS 23
-// This must be a literal with a value less than or equal to to MAX_ANALOG_INPUTS
-#define NUM_ANALOG_INPUTS 8
-
-// On-board LED pin number
-#define LED_BUILTIN 13
-#define LED_GREEN LED_BUILTIN
-
-// I2C Definitions
-#define PIN_WIRE_SDA 4
-#define PIN_WIRE_SCL 5
-
-// Timer Definitions
-#define TIMER_TONE TIM1
-#define TIMER_SERVO TIM3
-
-// UART Definitions
-#define SERIAL_UART_INSTANCE 1 //Connected to ST-Link
-// Default pin used for 'Serial' instance (ex: ST-Link)
-// Mandatory for Firmata
-#define PIN_SERIAL_RX PA15
-#define PIN_SERIAL_TX PA2
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-/*----------------------------------------------------------------------------
- * Arduino objects - C++ only
- *----------------------------------------------------------------------------*/
-
-#ifdef __cplusplus
- // These serial port names are intended to allow libraries and architecture-neutral
- // sketches to automatically default to the correct port name for a particular type
- // of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
- // the first hardware serial port whose RX/TX pins are not dedicated to another use.
- //
- // SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
- //
- // SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
- //
- // SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
- //
- // SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
- //
- // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
- // pins are NOT connected to anything by default.
- #define SERIAL_PORT_MONITOR Serial
- #define SERIAL_PORT_HARDWARE Serial
-#endif
-
-#endif /* _VARIANT_ARDUINO_STM32_ */
diff --git a/variants/STM32F0xx/NUCLEO_F072RB/PeripheralPins.c b/variants/STM32F0xx/NUCLEO_F072RB/PeripheralPins.c
deleted file mode 100644
index 3961956d10..0000000000
--- a/variants/STM32F0xx/NUCLEO_F072RB/PeripheralPins.c
+++ /dev/null
@@ -1,265 +0,0 @@
-/*
- *******************************************************************************
- * Copyright (c) 2020, STMicroelectronics
- * All rights reserved.
- *
- * This software component is licensed by ST under BSD 3-Clause license,
- * the "License"; You may not use this file except in compliance with the
- * License. You may obtain a copy of the License at:
- * opensource.org/licenses/BSD-3-Clause
- *
- *******************************************************************************
- * Automatically generated from STM32F072R(8-B)Tx.xml
- */
-#include "Arduino.h"
-#include "PeripheralPins.h"
-
-/* =====
- * Note: Commented lines are alternative possibilities which are not used per default.
- * If you change them, you will have to know what you do
- * =====
- */
-
-//*** ADC ***
-
-#ifdef HAL_ADC_MODULE_ENABLED
-WEAK const PinMap PinMap_ADC[] = {
- {PA_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC_IN0
- {PA_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC_IN1
- // {PA_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC_IN2- D1 - STLink Tx
- // {PA_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC_IN3- D0 - STLink Rx
- {PA_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC_IN4
- // {PA_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC_IN5 - D13 (LED1)
- {PA_6, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC_IN6
- {PA_7, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC_IN7
- {PB_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC_IN8
- // {PB_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC_IN9 - NC
- {PC_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC_IN10
- {PC_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC_IN11
- {PC_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC_IN12
- {PC_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC_IN13
- {PC_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC_IN14
- {PC_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC_IN15
- {NC, NP, 0}
-};
-#endif
-
-//*** DAC ***
-
-#ifdef HAL_DAC_MODULE_ENABLED
-WEAK const PinMap PinMap_DAC[] = {
- {PA_4, DAC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // DAC_OUT1
- {PA_5, DAC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // DAC_OUT2
- {NC, NP, 0}
-};
-#endif
-
-//*** I2C ***
-
-#ifdef HAL_I2C_MODULE_ENABLED
-WEAK const PinMap PinMap_I2C_SDA[] = {
- {PB_7, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
- {PB_9, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
- {PB_11, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C2)},
- {PB_14, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF5_I2C2)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_I2C_MODULE_ENABLED
-WEAK const PinMap PinMap_I2C_SCL[] = {
- {PB_6, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
- {PB_8, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
- {PB_10, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C2)},
- {PB_13, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF5_I2C2)},
- {NC, NP, 0}
-};
-#endif
-
-//*** PWM ***
-
-#ifdef HAL_TIM_MODULE_ENABLED
-WEAK const PinMap PinMap_PWM[] = {
- {PA_0, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 1, 0)}, // TIM2_CH1
- // {PA_1, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 2, 0)}, // TIM2_CH2
- {PA_1, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM15, 1, 1)}, // TIM15_CH1N
- // {PA_2, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 3, 0)}, // TIM2_CH3
- // {PA_2, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM15, 1, 0)}, // TIM15_CH1
- // {PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 4, 0)}, // TIM2_CH4
- // {PA_3, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM15, 2, 0)}, // TIM15_CH2
- {PA_4, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM14, 1, 0)}, // TIM14_CH1
- {PA_5, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 1, 0)}, // TIM2_CH1
- // {PA_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 1, 0)}, // TIM3_CH1
- {PA_6, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM16, 1, 0)}, // TIM16_CH1
- // {PA_7, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 1, 1)}, // TIM1_CH1N
- // {PA_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 2, 0)}, // TIM3_CH2
- // {PA_7, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM14, 1, 0)}, // TIM14_CH1
- {PA_7, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM17, 1, 0)}, // TIM17_CH1
- {PA_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 1, 0)}, // TIM1_CH1
- {PA_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 2, 0)}, // TIM1_CH2
- {PA_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 3, 0)}, // TIM1_CH3
- {PA_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 4, 0)}, // TIM1_CH4
- {PA_15, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 1, 0)}, // TIM2_CH1
- // {PB_0, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 2, 1)}, // TIM1_CH2N
- {PB_0, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 3, 0)}, // TIM3_CH3
- // {PB_1, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 3, 1)}, // TIM1_CH3N
- // {PB_1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 4, 0)}, // TIM3_CH4
- // {PB_1, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM14, 1, 0)}, // TIM14_CH1
- {PB_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 2, 0)}, // TIM2_CH2
- {PB_4, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 1, 0)}, // TIM3_CH1
- {PB_5, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 2, 0)}, // TIM3_CH2
- {PB_6, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM16, 1, 1)}, // TIM16_CH1N
- {PB_7, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM17, 1, 1)}, // TIM17_CH1N
- {PB_8, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM16, 1, 0)}, // TIM16_CH1
- {PB_9, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM17, 1, 0)}, // TIM17_CH1
- {PB_10, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 3, 0)}, // TIM2_CH3
- // {PB_11, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 4, 0)}, // TIM2_CH4
- {PB_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 1, 1)}, // TIM1_CH1N
- {PB_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 2, 1)}, // TIM1_CH2N
- // {PB_14, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM15, 1, 0)}, // TIM15_CH1
- // {PB_15, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 3, 1)}, // TIM1_CH3N
- // {PB_15, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM15, 1, 1)}, // TIM15_CH1N
- {PB_15, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM15, 2, 0)}, // TIM15_CH2
- {PC_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM3, 1, 0)}, // TIM3_CH1
- {PC_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM3, 2, 0)}, // TIM3_CH2
- {PC_8, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM3, 3, 0)}, // TIM3_CH3
- {PC_9, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM3, 4, 0)}, // TIM3_CH4
- {NC, NP, 0}
-};
-#endif
-
-//*** SERIAL ***
-
-#ifdef HAL_UART_MODULE_ENABLED
-WEAK const PinMap PinMap_UART_TX[] = {
- {PA_0, USART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART4)},
- {PA_2, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
- {PA_9, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
- // {PA_14, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)}, // SWCLK
- {PB_6, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART1)},
- {PB_10, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
- {PC_4, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART3)},
- {PC_10, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART3)},
- {PC_10, USART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART4)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_UART_MODULE_ENABLED
-WEAK const PinMap PinMap_UART_RX[] = {
- {PA_1, USART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART4)},
- {PA_3, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
- {PA_10, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
- {PA_15, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
- {PB_7, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART1)},
- {PB_11, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
- {PC_5, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART3)},
- // {PC_11, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART3)},
- {PC_11, USART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART4)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_UART_MODULE_ENABLED
-WEAK const PinMap PinMap_UART_RTS[] = {
- {PA_1, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
- {PA_12, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
- {PA_15, USART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART4)},
- {PB_1, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
- {PB_14, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
- {PD_2, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART3)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_UART_MODULE_ENABLED
-WEAK const PinMap PinMap_UART_CTS[] = {
- {PA_0, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
- {PA_6, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
- {PA_11, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
- {PB_7, USART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART4)},
- {PB_13, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
- {NC, NP, 0}
-};
-#endif
-
-//*** SPI ***
-
-#ifdef HAL_SPI_MODULE_ENABLED
-WEAK const PinMap PinMap_SPI_MOSI[] = {
- {PA_7, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PB_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PB_15, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
- {PC_3, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_SPI2)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_SPI_MODULE_ENABLED
-WEAK const PinMap PinMap_SPI_MISO[] = {
- {PA_6, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PB_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PB_14, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
- {PC_2, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_SPI2)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_SPI_MODULE_ENABLED
-WEAK const PinMap PinMap_SPI_SCLK[] = {
- {PA_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PB_3, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PB_10, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)},
- {PB_13, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_SPI_MODULE_ENABLED
-WEAK const PinMap PinMap_SPI_SSEL[] = {
- {PA_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PA_15, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PB_9, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)},
- {PB_12, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
- {NC, NP, 0}
-};
-#endif
-
-//*** CAN ***
-
-#ifdef HAL_CAN_MODULE_ENABLED
-WEAK const PinMap PinMap_CAN_RD[] = {
- {PA_11, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF4_CAN)},
- {PB_8, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF4_CAN)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_CAN_MODULE_ENABLED
-WEAK const PinMap PinMap_CAN_TD[] = {
- {PA_12, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF4_CAN)},
- {PB_9, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF4_CAN)},
- {NC, NP, 0}
-};
-#endif
-
-//*** No ETHERNET ***
-
-//*** No QUADSPI ***
-
-//*** USB ***
-
-#ifdef HAL_PCD_MODULE_ENABLED
-WEAK const PinMap PinMap_USB[] = {
- {PA_11, USB, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_DM
- {PA_12, USB, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_DP
- {PA_13, USB, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_USB)}, // USB_NOE
- {NC, NP, 0}
-};
-#endif
-
-//*** No USB_OTG_FS ***
-
-//*** No USB_OTG_HS ***
-
-//*** No SD ***
diff --git a/variants/STM32F0xx/NUCLEO_F072RB/PinNamesVar.h b/variants/STM32F0xx/NUCLEO_F072RB/PinNamesVar.h
deleted file mode 100644
index 52526fe78b..0000000000
--- a/variants/STM32F0xx/NUCLEO_F072RB/PinNamesVar.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* SYS_WKUP */
-#ifdef PWR_WAKEUP_PIN1
- SYS_WKUP1 = PA_0,
-#endif
-#ifdef PWR_WAKEUP_PIN2
- SYS_WKUP2 = PC_13,
-#endif
-#ifdef PWR_WAKEUP_PIN3
- SYS_WKUP3 = PE_6, /* Manually updated */
-#endif
-#ifdef PWR_WAKEUP_PIN4
- SYS_WKUP4 = PA_2,
-#endif
-#ifdef PWR_WAKEUP_PIN5
- SYS_WKUP5 = PC_5,
-#endif
-#ifdef PWR_WAKEUP_PIN6
- SYS_WKUP6 = PB_5,
-#endif
-#ifdef PWR_WAKEUP_PIN7
- SYS_WKUP7 = PB_15,
-#endif
-#ifdef PWR_WAKEUP_PIN8
- SYS_WKUP8 = PF_2, /* Manually updated */
-#endif
-/* USB */
-#ifdef USBCON
- USB_DM = PA_11,
- USB_DP = PA_12,
- USB_NOE = PA_13,
-#endif
diff --git a/variants/STM32F0xx/NUCLEO_F072RB/ldscript.ld b/variants/STM32F0xx/NUCLEO_F072RB/ldscript.ld
deleted file mode 100644
index 44015746d5..0000000000
--- a/variants/STM32F0xx/NUCLEO_F072RB/ldscript.ld
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
-*****************************************************************************
-**
-
-** File : ldscript.ld
-**
-** Abstract : Linker script for STM32F072RB Device with
-** 128KByte FLASH, 16KByte RAM
-**
-** Set heap size, stack size and stack location according
-** to application requirements.
-**
-** Set memory bank area and size if external memory is used.
-**
-** Target : STMicroelectronics STM32
-**
-**
-** Distribution: The file is distributed as is, without any warranty
-** of any kind.
-**
-*****************************************************************************
-** @attention
-**
-** © COPYRIGHT(c) 2014 Ac6
-**
-** Redistribution and use in source and binary forms, with or without modification,
-** are permitted provided that the following conditions are met:
-** 1. Redistributions of source code must retain the above copyright notice,
-** this list of conditions and the following disclaimer.
-** 2. Redistributions in binary form must reproduce the above copyright notice,
-** this list of conditions and the following disclaimer in the documentation
-** and/or other materials provided with the distribution.
-** 3. Neither the name of Ac6 nor the names of its contributors
-** may be used to endorse or promote products derived from this software
-** without specific prior written permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-** SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-**
-*****************************************************************************
-*/
-
-/* Entry Point */
-ENTRY(Reset_Handler)
-
-/* Highest address of the user mode stack */
-_estack = 0x20004000; /* end of RAM */
-/* Generate a link error if heap and stack don't fit into RAM */
-_Min_Heap_Size = 0x200; /* required amount of heap */
-_Min_Stack_Size = 0x400; /* required amount of stack */
-
-/* Specify the memory areas */
-MEMORY
-{
-RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 16K
-FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 128K
-}
-
-/* Define output sections */
-SECTIONS
-{
- /* The startup code goes first into FLASH */
- .isr_vector :
- {
- . = ALIGN(4);
- KEEP(*(.isr_vector)) /* Startup code */
- . = ALIGN(4);
- } >FLASH
-
- /* The program code and other data goes into FLASH */
- .text :
- {
- . = ALIGN(4);
- *(.text) /* .text sections (code) */
- *(.text*) /* .text* sections (code) */
- *(.glue_7) /* glue arm to thumb code */
- *(.glue_7t) /* glue thumb to arm code */
- *(.eh_frame)
-
- KEEP (*(.init))
- KEEP (*(.fini))
-
- . = ALIGN(4);
- _etext = .; /* define a global symbols at end of code */
- } >FLASH
-
- /* Constant data goes into FLASH */
- .rodata :
- {
- . = ALIGN(4);
- *(.rodata) /* .rodata sections (constants, strings, etc.) */
- *(.rodata*) /* .rodata* sections (constants, strings, etc.) */
- . = ALIGN(4);
- } >FLASH
-
- .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >FLASH
- .ARM : {
- __exidx_start = .;
- *(.ARM.exidx*)
- __exidx_end = .;
- } >FLASH
-
- .preinit_array :
- {
- PROVIDE_HIDDEN (__preinit_array_start = .);
- KEEP (*(.preinit_array*))
- PROVIDE_HIDDEN (__preinit_array_end = .);
- } >FLASH
- .init_array :
- {
- PROVIDE_HIDDEN (__init_array_start = .);
- KEEP (*(SORT(.init_array.*)))
- KEEP (*(.init_array*))
- PROVIDE_HIDDEN (__init_array_end = .);
- } >FLASH
- .fini_array :
- {
- PROVIDE_HIDDEN (__fini_array_start = .);
- KEEP (*(SORT(.fini_array.*)))
- KEEP (*(.fini_array*))
- PROVIDE_HIDDEN (__fini_array_end = .);
- } >FLASH
-
- /* used by the startup to initialize data */
- _sidata = LOADADDR(.data);
-
- /* Initialized data sections goes into RAM, load LMA copy after code */
- .data :
- {
- . = ALIGN(4);
- _sdata = .; /* create a global symbol at data start */
- *(.data) /* .data sections */
- *(.data*) /* .data* sections */
-
- . = ALIGN(4);
- _edata = .; /* define a global symbol at data end */
- } >RAM AT> FLASH
-
-
- /* Uninitialized data section */
- . = ALIGN(4);
- .bss :
- {
- /* This is used by the startup in order to initialize the .bss secion */
- _sbss = .; /* define a global symbol at bss start */
- __bss_start__ = _sbss;
- *(.bss)
- *(.bss*)
- *(COMMON)
-
- . = ALIGN(4);
- _ebss = .; /* define a global symbol at bss end */
- __bss_end__ = _ebss;
- } >RAM
-
- /* User_heap_stack section, used to check that there is enough RAM left */
- ._user_heap_stack :
- {
- . = ALIGN(4);
- PROVIDE ( end = . );
- PROVIDE ( _end = . );
- . = . + _Min_Heap_Size;
- . = . + _Min_Stack_Size;
- . = ALIGN(4);
- } >RAM
-
-
-
- /* Remove information from the standard libraries */
- /DISCARD/ :
- {
- libc.a ( * )
- libm.a ( * )
- libgcc.a ( * )
- }
-
- .ARM.attributes 0 : { *(.ARM.attributes) }
-}
-
-
diff --git a/variants/STM32F0xx/NUCLEO_F072RB/variant_NUCLEO_F072RB.cpp b/variants/STM32F0xx/NUCLEO_F072RB/variant_NUCLEO_F072RB.cpp
deleted file mode 100644
index 1ef3e41afc..0000000000
--- a/variants/STM32F0xx/NUCLEO_F072RB/variant_NUCLEO_F072RB.cpp
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- Copyright (c) 2011 Arduino. All right reserved.
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- See the GNU Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-*/
-
-#include "pins_arduino.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-// Pin number
-const PinName digitalPin[] = {
- PA_3, //D0
- PA_2, //D1
- PA_10, //D2
- PB_3, //D3
- PB_5, //D4
- PB_4, //D5
- PB_10, //D6
- PA_8, //D7
- PA_9, //D8
- PC_7, //D9
- PB_6, //D10
- PA_7, //D11
- PA_6, //D12
- PA_5, //D13
- PB_9, //D14
- PB_8, //D15
- // ST Morpho
- // CN7 Left Side
- PC_10, //D16
- PC_12, //D17
- PF_11, //D18 - BOOT0
- PA_13, //D19 - SWD
- PA_14, //D20 - SWD
- PA_15, //D21
- PB_7, //D22
- PC_13, //D23
- PC_14, //D24
- PC_15, //D25
- PF_0, //D26
- PF_1, //D27
- PC_2, //D28
- PC_3, //D29
- // CN7 Right Side
- PC_11, //D30
- PD_2, //D31
- // CN10 Left Side
- PC_9, //D32
- // CN10 Right side
- PC_8, //D33
- PC_6, //D34
- PC_5, //D35
- PA_12, //D36
- PA_11, //D37
- PB_12, //D38
- PB_11, //D39
- PB_2, //D40
- PB_1, //D41
- PB_15, //D42
- PB_14, //D43
- PB_13, //D44
- PC_4, //D45
- PA_0, //D46/A0
- PA_1, //D47/A1
- PA_4, //D48/A2
- PB_0, //D49/A3
- PC_1, //D50/A4
- PC_0 //D51/A5
-};
-
-// Analog (Ax) pin number array
-const uint32_t analogInputPin[] = {
- 46, //A0
- 47, //A1
- 48, //A2
- 49, //A3
- 50, //A4
- 51, //A5
- 11, //A6
- 12, //A7
- 28, //A8
- 29, //A9
- 35, //A10
- 45 //A11
-};
-
-#ifdef __cplusplus
-}
-#endif
-
-// ----------------------------------------------------------------------------
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * @brief System Clock Configuration
- * @param None
- * @retval None
- */
-WEAK void SystemClock_Config(void)
-{
- RCC_OscInitTypeDef RCC_OscInitStruct;
- RCC_ClkInitTypeDef RCC_ClkInitStruct;
-
- RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI48;
- RCC_OscInitStruct.HSI48State = RCC_HSI48_ON;
- RCC_OscInitStruct.PLL.PLLState = RCC_PLL_NONE;
- HAL_RCC_OscConfig(&RCC_OscInitStruct);
-
- RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK
- | RCC_CLOCKTYPE_PCLK1;
- RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_HSI48;
- RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
- RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
- HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1);
-}
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/variants/STM32F0xx/NUCLEO_F072RB/variant_NUCLEO_F072RB.h b/variants/STM32F0xx/NUCLEO_F072RB/variant_NUCLEO_F072RB.h
deleted file mode 100644
index dcca0ce18f..0000000000
--- a/variants/STM32F0xx/NUCLEO_F072RB/variant_NUCLEO_F072RB.h
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- Copyright (c) 2011 Arduino. All right reserved.
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- See the GNU Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-*/
-
-#ifndef _VARIANT_ARDUINO_STM32_
-#define _VARIANT_ARDUINO_STM32_
-
-#ifdef __cplusplus
-extern "C" {
-#endif // __cplusplus
-
-/*----------------------------------------------------------------------------
- * Pins
- *----------------------------------------------------------------------------*/
-
-#define PA3 0
-#define PA2 1
-#define PA10 2
-#define PB3 3
-#define PB5 4
-#define PB4 5
-#define PB10 6
-#define PA8 7
-#define PA9 8
-#define PC7 9
-#define PB6 10
-#define PA7 A6
-#define PA6 A7
-#define PA5 13
-#define PB9 14
-#define PB8 15
-// ST Morpho
-// CN7 Left Side
-#define PC10 16
-#define PC12 17
-#define PF11 18 // BOOT0
-#define PA13 19 // SWD
-#define PA14 20 // SWD
-#define PA15 21
-#define PB7 22
-#define PC13 23
-#define PC14 24
-#define PC15 25
-#define PF0 26
-#define PF1 27
-#define PC2 A8
-#define PC3 A9
-// CN7 Right Side
-#define PC11 30
-#define PD2 31
-// CN10 Left Side
-#define PC9 32
-// CN10 Right side
-#define PC8 33
-#define PC6 34
-#define PC5 A10
-#define PA12 36
-#define PA11 37
-#define PB12 38
-#define PB11 39
-#define PB2 40
-#define PB1 41
-#define PB15 42
-#define PB14 43
-#define PB13 44
-#define PC4 A11
-#define PA0 A0
-#define PA1 A1
-#define PA4 A2
-#define PB0 A3
-#define PC1 A4
-#define PC0 A5
-
-// This must be a literal
-#define NUM_DIGITAL_PINS 52
-// This must be a literal with a value less than or equal to to MAX_ANALOG_INPUTS
-#define NUM_ANALOG_INPUTS 12
-
-// On-board LED pin number
-#define LED_BUILTIN 13
-#define LED_GREEN LED_BUILTIN
-
-// On-board user button
-#define USER_BTN PC13
-
-// Timer Definitions
-// Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin
-#define TIMER_TONE TIM6
-#define TIMER_SERVO TIM7
-
-// UART Definitions
-#define SERIAL_UART_INSTANCE 2 //Connected to ST-Link
-
-// Default pin used for 'Serial' instance (ex: ST-Link)
-// Mandatory for Firmata
-#define PIN_SERIAL_RX 0
-#define PIN_SERIAL_TX 1
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-/*----------------------------------------------------------------------------
- * Arduino objects - C++ only
- *----------------------------------------------------------------------------*/
-
-#ifdef __cplusplus
- // These serial port names are intended to allow libraries and architecture-neutral
- // sketches to automatically default to the correct port name for a particular type
- // of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
- // the first hardware serial port whose RX/TX pins are not dedicated to another use.
- //
- // SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
- //
- // SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
- //
- // SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
- //
- // SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
- //
- // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
- // pins are NOT connected to anything by default.
- #define SERIAL_PORT_MONITOR Serial
- #define SERIAL_PORT_HARDWARE Serial
-#endif
-
-#endif /* _VARIANT_ARDUINO_STM32_ */
diff --git a/variants/STM32F0xx/NUCLEO_F091RC/PeripheralPins.c b/variants/STM32F0xx/NUCLEO_F091RC/PeripheralPins.c
deleted file mode 100644
index 7ee46299af..0000000000
--- a/variants/STM32F0xx/NUCLEO_F091RC/PeripheralPins.c
+++ /dev/null
@@ -1,290 +0,0 @@
-/*
- *******************************************************************************
- * Copyright (c) 2019, STMicroelectronics
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * 3. Neither the name of STMicroelectronics nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *******************************************************************************
- * Automatically generated from STM32F091R(B-C)Tx.xml
- */
-#include "Arduino.h"
-#include "PeripheralPins.h"
-
-/* =====
- * Note: Commented lines are alternative possibilities which are not used per default.
- * If you change them, you will have to know what you do
- * =====
- */
-
-//*** ADC ***
-
-#ifdef HAL_ADC_MODULE_ENABLED
-WEAK const PinMap PinMap_ADC[] = {
- {PA_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC_IN0 - A0
- {PA_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC_IN1 - A1
- // {PA_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC_IN2 - D1 - STLink Tx
- // {PA_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC_IN3 - D0 - STLink Rx
- {PA_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC_IN4 - A2
- // {PA_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC_IN5 - D13 (LED1)
- {PA_6, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC_IN6 - D12
- {PA_7, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC_IN7 - D11
- {PB_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC_IN8 - A3
- // {PB_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC_IN9
- {PC_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC_IN10 - A5
- {PC_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC_IN11 - A4
- {PC_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC_IN12
- {PC_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC_IN13
- {PC_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC_IN14
- {PC_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC_IN15
- {NC, NP, 0}
-};
-#endif
-
-//*** DAC ***
-
-#ifdef HAL_DAC_MODULE_ENABLED
-WEAK const PinMap PinMap_DAC[] = {
- {PA_4, DAC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // DAC_OUT1 - A2
- {PA_5, DAC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // DAC_OUT2 - D13 (LED1)
- {NC, NP, 0}
-};
-#endif
-
-//*** I2C ***
-
-#ifdef HAL_I2C_MODULE_ENABLED
-WEAK const PinMap PinMap_I2C_SDA[] = {
- {PA_10, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, // D2
- {PA_12, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF5_I2C2)},
- {PB_7, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
- {PB_9, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)}, // D14
- {PB_11, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C2)},
- {PB_14, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF5_I2C2)},
- // {PF_0, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)}, // OSC_IN
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_I2C_MODULE_ENABLED
-WEAK const PinMap PinMap_I2C_SCL[] = {
- {PA_9, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, // D8
- {PA_11, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF5_I2C2)},
- {PB_6, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)}, // D10
- {PB_8, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)}, // D15
- {PB_10, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C2)}, // D6
- {PB_13, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF5_I2C2)},
- // {PF_1, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)}, // OSC_OUT
- {NC, NP, 0}
-};
-#endif
-
-//*** PWM ***
-
-#ifdef HAL_TIM_MODULE_ENABLED
-WEAK const PinMap PinMap_PWM[] = {
- {PA_0, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 1, 0)}, // TIM2_CH1 - A0
- // {PA_1, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 2, 0)}, // TIM2_CH2 - A1
- {PA_1, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM15, 1, 1)}, // TIM15_CH1N - A1
- // {PA_2, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 3, 0)}, // TIM2_CH3 - D1 - STLink Tx
- // {PA_2, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM15, 1, 0)}, // TIM15_CH1 - D1 - STLink Tx
- // {PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 4, 0)}, // TIM2_CH4 - D0 - STLink Rx
- // {PA_3, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM15, 2, 0)}, // TIM15_CH2 - D0 - STLink Rx
- {PA_4, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM14, 1, 0)}, // TIM14_CH1 - A2
- {PA_5, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 1, 0)}, // TIM2_CH1 - D13 (LED1)
- // {PA_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 1, 0)}, // TIM3_CH1 - D12
- {PA_6, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM16, 1, 0)}, // TIM16_CH1 - D12
- // {PA_7, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 1, 1)}, // TIM1_CH1N - D11
- // {PA_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 2, 0)}, // TIM3_CH2 - D11
- // {PA_7, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM14, 1, 0)}, // TIM14_CH1 - D11
- {PA_7, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM17, 1, 0)}, // TIM17_CH1 - D11
- {PA_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 1, 0)}, // TIM1_CH1 - D7
- {PA_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 2, 0)}, // TIM1_CH2 - D8
- {PA_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 3, 0)}, // TIM1_CH3
- {PA_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 4, 0)}, // TIM1_CH4
- {PA_15, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 1, 0)}, // TIM2_CH1
- // {PB_0, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 2, 1)}, // TIM1_CH2N
- {PB_0, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 3, 0)}, // TIM3_CH3 - A3
- // {PB_1, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 3, 1)}, // TIM1_CH3N
- // {PB_1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 4, 0)}, // TIM3_CH4
- // {PB_1, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM14, 1, 0)}, // TIM14_CH1
- {PB_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 2, 0)}, // TIM2_CH2
- {PB_4, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 1, 0)}, // TIM3_CH1 - D5
- {PB_5, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 2, 0)}, // TIM3_CH2 - D4
- {PB_6, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM16, 1, 1)}, // TIM16_CH1N - D10
- {PB_7, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM17, 1, 1)}, // TIM17_CH1N
- {PB_8, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM16, 1, 0)}, // TIM16_CH1 - D15
- {PB_9, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM17, 1, 0)}, // TIM17_CH1 - D14
- {PB_10, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 3, 0)}, // TIM2_CH3 - D6
- // {PB_11, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 4, 0)}, // TIM2_CH4
- {PB_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 1, 1)}, // TIM1_CH1N
- {PB_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 2, 1)}, // TIM1_CH2N
- // {PB_14, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM15, 1, 0)}, // TIM15_CH1
- // {PB_15, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 3, 1)}, // TIM1_CH3N
- // {PB_15, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM15, 1, 1)}, // TIM15_CH1N
- {PB_15, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM15, 2, 0)}, // TIM15_CH2
- {PC_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM3, 1, 0)}, // TIM3_CH1
- {PC_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM3, 2, 0)}, // TIM3_CH2 - D9
- {PC_8, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM3, 3, 0)}, // TIM3_CH3
- {PC_9, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM3, 4, 0)}, // TIM3_CH4
- {NC, NP, 0}
-};
-#endif
-
-//*** SERIAL ***
-
-#ifdef HAL_UART_MODULE_ENABLED
-WEAK const PinMap PinMap_UART_TX[] = {
- {PA_0, USART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART4)}, // A0
- {PA_2, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)}, // D1
- {PA_4, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_USART6)}, // A2
- {PA_9, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)}, // D8
- // {PA_14, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)}, // SWCLK
- {PB_3, USART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART5)}, // D3
- {PB_6, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART1)}, // D10
- {PB_10, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)}, // D6
- // {PC_0, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_USART6)}, // A5
- {PC_0, USART7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART7)}, // A5
- {PC_2, USART8, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_USART8)},
- {PC_4, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART3)},
- {PC_6, USART7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART7)},
- {PC_8, USART8, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART8)},
- // {PC_10, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART3)},
- {PC_10, USART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART4)},
- {PC_12, USART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_USART5)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_UART_MODULE_ENABLED
-WEAK const PinMap PinMap_UART_RX[] = {
- {PA_1, USART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART4)}, // A1
- {PA_3, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)}, // D0
- {PA_5, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_USART6)}, // D13 (LED1)
- {PA_10, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)}, // D2
- {PA_15, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
- {PB_4, USART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART5)}, // D5
- {PB_7, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART1)},
- {PB_11, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
- {PC_1, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_USART6)}, // A4
- // {PC_1, USART7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART7)},
- {PC_3, USART8, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_USART8)},
- {PC_5, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART3)},
- {PC_7, USART7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART7)}, // D9
- {PC_9, USART8, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART8)},
- // {PC_11, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART3)},
- {PC_11, USART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART4)},
- {PD_2, USART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_USART5)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_UART_MODULE_ENABLED
-WEAK const PinMap PinMap_UART_RTS[] = {
- {PA_1, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)}, // A1
- {PA_12, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
- {PA_15, USART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART4)},
- {PB_1, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
- {PB_5, USART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART5)},
- {PB_14, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
- {PD_2, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART3)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_UART_MODULE_ENABLED
-WEAK const PinMap PinMap_UART_CTS[] = {
- {PA_0, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)}, // A0
- {PA_6, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)}, // D12
- {PA_11, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
- {PB_7, USART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART4)},
- {PB_13, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
- {NC, NP, 0}
-};
-#endif
-
-//*** SPI ***
-
-#ifdef HAL_SPI_MODULE_ENABLED
-WEAK const PinMap PinMap_SPI_MOSI[] = {
- {PA_7, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)}, // D11
- {PB_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)}, // D4
- {PB_15, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
- {PC_3, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_SPI2)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_SPI_MODULE_ENABLED
-WEAK const PinMap PinMap_SPI_MISO[] = {
- {PA_6, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)}, // D12
- {PB_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)}, // D5
- {PB_14, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
- {PC_2, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_SPI2)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_SPI_MODULE_ENABLED
-WEAK const PinMap PinMap_SPI_SCLK[] = {
- {PA_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)}, // D13 (LED1)
- {PB_3, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)}, // D3
- {PB_10, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, // D6
- {PB_13, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_SPI_MODULE_ENABLED
-WEAK const PinMap PinMap_SPI_SSEL[] = {
- {PA_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)}, // A2
- {PA_15, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PB_9, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, // D14
- {PB_12, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
- {NC, NP, 0}
-};
-#endif
-
-//*** CAN ***
-
-#ifdef HAL_CAN_MODULE_ENABLED
-WEAK const PinMap PinMap_CAN_RD[] = {
- {PA_11, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF4_CAN)},
- {PB_8, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF4_CAN)}, // D15
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_CAN_MODULE_ENABLED
-WEAK const PinMap PinMap_CAN_TD[] = {
- {PA_12, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF4_CAN)},
- {PB_9, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF4_CAN)}, // D14
- {NC, NP, 0}
-};
-#endif
-
-//*** No ETHERNET ***
-
-//*** No QUADSPI ***
-
-//*** No USB ***
diff --git a/variants/STM32F0xx/NUCLEO_F091RC/PinNamesVar.h b/variants/STM32F0xx/NUCLEO_F091RC/PinNamesVar.h
deleted file mode 100644
index 5692940c74..0000000000
--- a/variants/STM32F0xx/NUCLEO_F091RC/PinNamesVar.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/* SYS_WKUP */
-#ifdef PWR_WAKEUP_PIN1
- SYS_WKUP1 = PA_0,
-#endif
-#ifdef PWR_WAKEUP_PIN2
- SYS_WKUP2 = PC_13,
-#endif
-#ifdef PWR_WAKEUP_PIN3
- SYS_WKUP3 = PE_6, /* manually updated */
-#endif
-#ifdef PWR_WAKEUP_PIN4
- SYS_WKUP4 = PA_2,
-#endif
-#ifdef PWR_WAKEUP_PIN5
- SYS_WKUP5 = PC_5,
-#endif
-#ifdef PWR_WAKEUP_PIN6
- SYS_WKUP6 = PB_5,
-#endif
-#ifdef PWR_WAKEUP_PIN7
- SYS_WKUP7 = PB_15,
-#endif
-#ifdef PWR_WAKEUP_PIN8
- SYS_WKUP8 = PF_2, /* manually updated */
-#endif
diff --git a/variants/STM32F0xx/NUCLEO_F091RC/ldscript.ld b/variants/STM32F0xx/NUCLEO_F091RC/ldscript.ld
deleted file mode 100644
index cb7cb07344..0000000000
--- a/variants/STM32F0xx/NUCLEO_F091RC/ldscript.ld
+++ /dev/null
@@ -1,180 +0,0 @@
-/**
- ******************************************************************************
- * @file STM32F091RC_FLASH.h
- * @author WI6LABS
- * @version V1.0.0
- * @date 11-July-2016
- * @brief Linker script for STM32F091RC Device with
- * 256KByte FLASH, 32KByte RAM
- *
- * Set heap size, stack size and stack location according
- * to application requirements.
- *
- * Set memory bank area and size if external memory is used.
- *
- ******************************************************************************
- * @attention
- *
- * © COPYRIGHT(c) 2016 STMicroelectronics
- *
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * 3. Neither the name of STMicroelectronics nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- ******************************************************************************
- */
-
-/* Entry Point */
-ENTRY(Reset_Handler)
-
-/* Highest address of the user mode stack */
-_estack = 0x20008000; /* end of RAM */
-/* Generate a link error if heap and stack don't fit into RAM */
-_Min_Heap_Size = 0x200;; /* required amount of heap */
-_Min_Stack_Size = 0x400;; /* required amount of stack */
-
-/* Specify the memory areas */
-MEMORY
-{
-FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 256K
-RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 32K
-}
-
-/* Define output sections */
-SECTIONS
-{
- /* The startup code goes first into FLASH */
- .isr_vector :
- {
- . = ALIGN(4);
- KEEP(*(.isr_vector)) /* Startup code */
- . = ALIGN(4);
- } >FLASH
-
- /* The program code and other data goes into FLASH */
- .text ALIGN(4):
- {
- . = ALIGN(4);
- *(.text) /* .text sections (code) */
- *(.text*) /* .text* sections (code) */
- *(.glue_7) /* glue arm to thumb code */
- *(.glue_7t) /* glue thumb to arm code */
- *(.eh_frame)
-
- KEEP (*(.init))
- KEEP (*(.fini))
-
- . = ALIGN(4);
- _etext = .; /* define a global symbols at end of code */
- } >FLASH
-
- /* Constant data goes into FLASH */
- .rodata ALIGN(4) :
- {
- . = ALIGN(4);
- *(.rodata) /* .rodata sections (constants, strings, etc.) */
- *(.rodata*) /* .rodata* sections (constants, strings, etc.) */
- . = ALIGN(4);
- } >FLASH
-
- .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >FLASH
- .ARM : {
- __exidx_start = .;
- *(.ARM.exidx*)
- __exidx_end = .;
- } >FLASH
-
- .preinit_array :
- {
- PROVIDE_HIDDEN (__preinit_array_start = .);
- KEEP (*(.preinit_array*))
- PROVIDE_HIDDEN (__preinit_array_end = .);
- } >FLASH
- .init_array :
- {
- PROVIDE_HIDDEN (__init_array_start = .);
- KEEP (*(SORT(.init_array.*)))
- KEEP (*(.init_array*))
- PROVIDE_HIDDEN (__init_array_end = .);
- } >FLASH
- .fini_array :
- {
- PROVIDE_HIDDEN (__fini_array_start = .);
- KEEP (*(SORT(.fini_array.*)))
- KEEP (*(.fini_array*))
- PROVIDE_HIDDEN (__fini_array_end = .);
- } >FLASH
-
- /* used by the startup to initialize data */
- _sidata = LOADADDR(.data);
-
- /* Initialized data sections goes into RAM, load LMA copy after code */
- .data :
- {
- . = ALIGN(4);
- _sdata = .; /* create a global symbol at data start */
- *(.data) /* .data sections */
- *(.data*) /* .data* sections */
-
- . = ALIGN(4);
- _edata = .; /* define a global symbol at data end */
- } >RAM AT> FLASH
-
-
- /* Uninitialized data section */
- . = ALIGN(4);
- .bss :
- {
- /* This is used by the startup in order to initialize the .bss secion */
- _sbss = .; /* define a global symbol at bss start */
- __bss_start__ = _sbss;
- *(.bss)
- *(.bss*)
- *(COMMON)
-
- . = ALIGN(4);
- _ebss = .; /* define a global symbol at bss end */
- __bss_end__ = _ebss;
- } >RAM
-
- /* User_heap_stack section, used to check that there is enough RAM left */
- ._user_heap_stack :
- {
- . = ALIGN(4);
- PROVIDE ( end = . );
- PROVIDE ( _end = . );
- . = . + _Min_Heap_Size;
- . = . + _Min_Stack_Size;
- . = ALIGN(4);
- } >RAM
-
-
-
- /* Remove information from the standard libraries */
- /DISCARD/ :
- {
- libc.a ( * )
- libm.a ( * )
- libgcc.a ( * )
- }
-
- .ARM.attributes 0 : { *(.ARM.attributes) }
-}
diff --git a/variants/STM32F0xx/NUCLEO_F091RC/variant_NUCLEO_F091RC.h b/variants/STM32F0xx/NUCLEO_F091RC/variant_NUCLEO_F091RC.h
deleted file mode 100644
index dcca0ce18f..0000000000
--- a/variants/STM32F0xx/NUCLEO_F091RC/variant_NUCLEO_F091RC.h
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- Copyright (c) 2011 Arduino. All right reserved.
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- See the GNU Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-*/
-
-#ifndef _VARIANT_ARDUINO_STM32_
-#define _VARIANT_ARDUINO_STM32_
-
-#ifdef __cplusplus
-extern "C" {
-#endif // __cplusplus
-
-/*----------------------------------------------------------------------------
- * Pins
- *----------------------------------------------------------------------------*/
-
-#define PA3 0
-#define PA2 1
-#define PA10 2
-#define PB3 3
-#define PB5 4
-#define PB4 5
-#define PB10 6
-#define PA8 7
-#define PA9 8
-#define PC7 9
-#define PB6 10
-#define PA7 A6
-#define PA6 A7
-#define PA5 13
-#define PB9 14
-#define PB8 15
-// ST Morpho
-// CN7 Left Side
-#define PC10 16
-#define PC12 17
-#define PF11 18 // BOOT0
-#define PA13 19 // SWD
-#define PA14 20 // SWD
-#define PA15 21
-#define PB7 22
-#define PC13 23
-#define PC14 24
-#define PC15 25
-#define PF0 26
-#define PF1 27
-#define PC2 A8
-#define PC3 A9
-// CN7 Right Side
-#define PC11 30
-#define PD2 31
-// CN10 Left Side
-#define PC9 32
-// CN10 Right side
-#define PC8 33
-#define PC6 34
-#define PC5 A10
-#define PA12 36
-#define PA11 37
-#define PB12 38
-#define PB11 39
-#define PB2 40
-#define PB1 41
-#define PB15 42
-#define PB14 43
-#define PB13 44
-#define PC4 A11
-#define PA0 A0
-#define PA1 A1
-#define PA4 A2
-#define PB0 A3
-#define PC1 A4
-#define PC0 A5
-
-// This must be a literal
-#define NUM_DIGITAL_PINS 52
-// This must be a literal with a value less than or equal to to MAX_ANALOG_INPUTS
-#define NUM_ANALOG_INPUTS 12
-
-// On-board LED pin number
-#define LED_BUILTIN 13
-#define LED_GREEN LED_BUILTIN
-
-// On-board user button
-#define USER_BTN PC13
-
-// Timer Definitions
-// Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin
-#define TIMER_TONE TIM6
-#define TIMER_SERVO TIM7
-
-// UART Definitions
-#define SERIAL_UART_INSTANCE 2 //Connected to ST-Link
-
-// Default pin used for 'Serial' instance (ex: ST-Link)
-// Mandatory for Firmata
-#define PIN_SERIAL_RX 0
-#define PIN_SERIAL_TX 1
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-/*----------------------------------------------------------------------------
- * Arduino objects - C++ only
- *----------------------------------------------------------------------------*/
-
-#ifdef __cplusplus
- // These serial port names are intended to allow libraries and architecture-neutral
- // sketches to automatically default to the correct port name for a particular type
- // of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
- // the first hardware serial port whose RX/TX pins are not dedicated to another use.
- //
- // SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
- //
- // SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
- //
- // SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
- //
- // SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
- //
- // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
- // pins are NOT connected to anything by default.
- #define SERIAL_PORT_MONITOR Serial
- #define SERIAL_PORT_HARDWARE Serial
-#endif
-
-#endif /* _VARIANT_ARDUINO_STM32_ */
diff --git a/variants/STM32F0xx/PYBSTICK26_DUINO/PeripheralPins.c b/variants/STM32F0xx/PYBSTICK26_DUINO/PeripheralPins.c
deleted file mode 100644
index 7337076e0a..0000000000
--- a/variants/STM32F0xx/PYBSTICK26_DUINO/PeripheralPins.c
+++ /dev/null
@@ -1,265 +0,0 @@
-/*
- *******************************************************************************
- * Copyright (c) 2020, STMicroelectronics
- * All rights reserved.
- *
- * This software component is licensed by ST under BSD 3-Clause license,
- * the "License"; You may not use this file except in compliance with the
- * License. You may obtain a copy of the License at:
- * opensource.org/licenses/BSD-3-Clause
- *
- *******************************************************************************
- * Automatically generated from STM32F072R(8-B)Tx.xml
- */
-#include "Arduino.h"
-#include "PeripheralPins.h"
-
-/* =====
- * Note: Commented lines are alternative possibilities which are not used per default.
- * If you change them, you will have to know what you do
- * =====
- */
-
-//*** ADC ***
-
-#ifdef HAL_ADC_MODULE_ENABLED
-WEAK const PinMap PinMap_ADC[] = {
- {PA_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC_IN0
- // {PA_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC_IN1
- {PA_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC_IN2
- {PA_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC_IN3
- {PA_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC_IN4
- {PA_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC_IN5
- // {PA_6, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC_IN6
- {PA_7, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC_IN7
- // {PB_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC_IN8
- // {PB_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC_IN9
- // {PC_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC_IN10
- // {PC_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC_IN11
- // {PC_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC_IN12
- {PC_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC_IN13
- // {PC_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC_IN14
- {PC_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC_IN15
- {NC, NP, 0}
-};
-#endif
-
-//*** DAC ***
-
-#ifdef HAL_DAC_MODULE_ENABLED
-WEAK const PinMap PinMap_DAC[] = {
- {PA_4, DAC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // DAC_OUT1
- {PA_5, DAC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // DAC_OUT2
- {NC, NP, 0}
-};
-#endif
-
-//*** I2C ***
-
-#ifdef HAL_I2C_MODULE_ENABLED
-WEAK const PinMap PinMap_I2C_SDA[] = {
- // {PB_7, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
- {PB_9, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
- // {PB_11, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C2)},
- {PB_14, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF5_I2C2)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_I2C_MODULE_ENABLED
-WEAK const PinMap PinMap_I2C_SCL[] = {
- {PB_6, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
- {PB_8, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
- {PB_10, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C2)},
- {PB_13, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF5_I2C2)},
- {NC, NP, 0}
-};
-#endif
-
-//*** PWM ***
-
-#ifdef HAL_TIM_MODULE_ENABLED
-WEAK const PinMap PinMap_PWM[] = {
- {PA_0, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 1, 0)}, // TIM2_CH1
- // {PA_1, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 2, 0)}, // TIM2_CH2
- // {PA_1, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM15, 1, 1)}, // TIM15_CH1N
- {PA_2, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 3, 0)}, // TIM2_CH3
- // {PA_2, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM15, 1, 0)}, // TIM15_CH1
- {PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 4, 0)}, // TIM2_CH4
- // {PA_3, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM15, 2, 0)}, // TIM15_CH2
- {PA_4, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM14, 1, 0)}, // TIM14_CH1
- {PA_5, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 1, 0)}, // TIM2_CH1
- // {PA_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 1, 0)}, // TIM3_CH1
- // {PA_6, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM16, 1, 0)}, // TIM16_CH1
- {PA_7, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 1, 1)}, // TIM1_CH1N
- // {PA_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 2, 0)}, // TIM3_CH2
- // {PA_7, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM14, 1, 0)}, // TIM14_CH1
- // {PA_7, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM17, 1, 0)}, // TIM17_CH1
- // {PA_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 1, 0)}, // TIM1_CH1
- // {PA_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 2, 0)}, // TIM1_CH2
- {PA_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 3, 0)}, // TIM1_CH3
- // {PA_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 4, 0)}, // TIM1_CH4
- {PA_15, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 1, 0)}, // TIM2_CH1
- // {PB_0, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 2, 1)}, // TIM1_CH2N
- {PB_0, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 3, 0)}, // TIM3_CH3
- // {PB_1, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 3, 1)}, // TIM1_CH3N
- {PB_1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 4, 0)}, // TIM3_CH4
- // {PB_1, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM14, 1, 0)}, // TIM14_CH1
- {PB_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 2, 0)}, // TIM2_CH2
- {PB_4, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 1, 0)}, // TIM3_CH1
- // {PB_5, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 2, 0)}, // TIM3_CH2
- {PB_6, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM16, 1, 1)}, // TIM16_CH1N
- // {PB_7, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM17, 1, 1)}, // TIM17_CH1N
- {PB_8, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM16, 1, 0)}, // TIM16_CH1
- {PB_9, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM17, 1, 0)}, // TIM17_CH1
- {PB_10, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 3, 0)}, // TIM2_CH3
- // {PB_11, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 4, 0)}, // TIM2_CH4
- {PB_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 1, 1)}, // TIM1_CH1N
- // {PB_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 2, 1)}, // TIM1_CH2N
- {PB_14, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM15, 1, 0)}, // TIM15_CH1
- // {PB_15, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 3, 1)}, // TIM1_CH3N
- // {PB_15, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM15, 1, 1)}, // TIM15_CH1N
- // {PB_15, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM15, 2, 0)}, // TIM15_CH2
- {PC_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM3, 1, 0)}, // TIM3_CH1
- {PC_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM3, 2, 0)}, // TIM3_CH2
- // {PC_8, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM3, 3, 0)}, // TIM3_CH3
- // {PC_9, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM3, 4, 0)}, // TIM3_CH4
- {NC, NP, 0}
-};
-#endif
-
-//*** SERIAL ***
-
-#ifdef HAL_UART_MODULE_ENABLED
-WEAK const PinMap PinMap_UART_TX[] = {
- {PA_0, USART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART4)},
- {PA_2, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
- // {PA_9, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
- // {PA_14, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
- {PB_6, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART1)},
- {PB_10, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
- // {PC_4, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART3)},
- // {PC_10, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART3)},
- // {PC_10, USART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART4)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_UART_MODULE_ENABLED
-WEAK const PinMap PinMap_UART_RX[] = {
- // {PA_1, USART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART4)},
- {PA_3, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
- {PA_10, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
- {PA_15, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
- // {PB_7, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART1)},
- // {PB_11, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
- {PC_5, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART3)},
- // {PC_11, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART3)},
- {PC_11, USART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART4)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_UART_MODULE_ENABLED
-WEAK const PinMap PinMap_UART_RTS[] = {
- // {PA_1, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
- // {PA_12, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
- {PA_15, USART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART4)},
- // {PB_1, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
- {PB_14, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
- // {PD_2, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART3)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_UART_MODULE_ENABLED
-WEAK const PinMap PinMap_UART_CTS[] = {
- {PA_0, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
- // {PA_6, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
- // {PA_11, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
- // {PB_7, USART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART4)},
- {PB_13, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
- {NC, NP, 0}
-};
-#endif
-
-//*** SPI ***
-
-#ifdef HAL_SPI_MODULE_ENABLED
-WEAK const PinMap PinMap_SPI_MOSI[] = {
- {PA_7, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- // {PB_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- // {PB_15, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
- {PC_3, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_SPI2)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_SPI_MODULE_ENABLED
-WEAK const PinMap PinMap_SPI_MISO[] = {
- // {PA_6, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PB_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PB_14, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
- // {PC_2, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_SPI2)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_SPI_MODULE_ENABLED
-WEAK const PinMap PinMap_SPI_SCLK[] = {
- {PA_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PB_3, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PB_10, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)},
- {PB_13, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_SPI_MODULE_ENABLED
-WEAK const PinMap PinMap_SPI_SSEL[] = {
- {PA_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PA_15, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PB_9, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)},
- {PB_12, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
- {NC, NP, 0}
-};
-#endif
-
-//*** CAN ***
-
-#ifdef HAL_CAN_MODULE_ENABLED
-WEAK const PinMap PinMap_CAN_RD[] = {
- {PA_11, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF4_CAN)},
- {PB_8, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF4_CAN)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_CAN_MODULE_ENABLED
-WEAK const PinMap PinMap_CAN_TD[] = {
- {PA_12, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF4_CAN)},
- {PB_9, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF4_CAN)},
- {NC, NP, 0}
-};
-#endif
-
-//*** No ETHERNET ***
-
-//*** No QUADSPI ***
-
-//*** USB ***
-
-#ifdef HAL_PCD_MODULE_ENABLED
-WEAK const PinMap PinMap_USB[] = {
- {PA_11, USB, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_DM
- {PA_12, USB, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_DP
- // {PA_13, USB, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_USB)}, // USB_NOE
- {NC, NP, 0}
-};
-#endif
-
-//*** No USB_OTG_FS ***
-
-//*** No USB_OTG_HS ***
-
-//*** No SD ***
diff --git a/variants/STM32F0xx/PYBSTICK26_DUINO/PinNamesVar.h b/variants/STM32F0xx/PYBSTICK26_DUINO/PinNamesVar.h
deleted file mode 100644
index 85988c06ef..0000000000
--- a/variants/STM32F0xx/PYBSTICK26_DUINO/PinNamesVar.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* SYS_WKUP */
-#ifdef PWR_WAKEUP_PIN1
- SYS_WKUP1 = PA_0,
-#endif
-#ifdef PWR_WAKEUP_PIN2
- SYS_WKUP2 = PC_13,
-#endif
-#ifdef PWR_WAKEUP_PIN3
- SYS_WKUP3 = PE_6, /* Manually updated */
-#endif
-#ifdef PWR_WAKEUP_PIN4
- SYS_WKUP4 = PA_2,
-#endif
-#ifdef PWR_WAKEUP_PIN5
- SYS_WKUP5 = PC_5,
-#endif
-#ifdef PWR_WAKEUP_PIN6
- SYS_WKUP6 = PB_5,
-#endif
-#ifdef PWR_WAKEUP_PIN7
- SYS_WKUP7 = PB_15,
-#endif
-#ifdef PWR_WAKEUP_PIN8
- SYS_WKUP8 = PF_2, /* Manually updated */
-#endif
-/* USB */
-#ifdef USBCON
- USB_DM = PA_11,
- USB_DP = PA_12,
- // USB_NOE = PA_13,
-#endif
diff --git a/variants/STM32F0xx/PYBSTICK26_DUINO/variant_PYBSTICK26_DUINO.h b/variants/STM32F0xx/PYBSTICK26_DUINO/variant_PYBSTICK26_DUINO.h
deleted file mode 100644
index b270e7a6e1..0000000000
--- a/variants/STM32F0xx/PYBSTICK26_DUINO/variant_PYBSTICK26_DUINO.h
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- Copyright (c) 2011 Arduino. All right reserved.
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- See the GNU Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-*/
-
-#ifndef _VARIANT_ARDUINO_STM32_
-#define _VARIANT_ARDUINO_STM32_
-
-#ifdef __cplusplus
-extern "C" {
-#endif // __cplusplus
-
-#define PB9 0
-#define PB8 1
-#define PB6 2
-#define PA2 A0
-#define PA3 A1
-#define PA0 A2
-#define PB3 6
-#define PB10 7
-#define PB12 8
-#define PB13 9
-#define PB14 10
-#define PA7 A3
-#define PB4 12
-#define PA5 A4
-#define PA10 14
-#define PA15 15
-#define PA4 A5
-#define PC3 A6
-#define PC5 A7
-#define PC6 19
-#define PC7 20
-
-#define PA13 21 // LED_RED
-#define PA14 22 // LED_GREEN
-#define PB0 23 // LED_YELLOW
-#define PB1 24 // LED_BLUE
-
-#define PC13 25 // USR_BTN
-
-#define PA11 26 // USB D-, CAN_RX
-#define PA12 27 // USB D+, CAN_TX
-
-#define PC14 28 // OSC32_IN
-#define PC15 29 // OSC32_OUT
-#define PF0 30 // OSC_IN
-#define PF1 31 // OSC_OUT
-
-// This must be a literal
-#define NUM_DIGITAL_PINS 32
-#define NUM_ANALOG_INPUTS 8
-
-// PYBSTICK26 Sx pinout
-#define S3 PB9
-#define S5 PB8
-#define S7 PB6
-#define S8 PA2
-#define S10 PA3
-#define S11 PB3
-#define S12 PA0
-#define S13 PB10
-#define S13A PC3
-#define S15 PB12
-#define S15A PC5
-#define S16 PB13
-#define S16A PC6
-#define S18 PB14
-#define S18A PC7
-#define S19 PA7
-#define S21 PAB4
-#define S22 PA10
-#define S23 PA5
-#define S24 PA15
-#define S26 PA4
-
-// On-board LED pin number
-#define LED_GREEN PA14
-#define LED_RED PA13
-#define LED_YELLOW PB0
-#define LED_BLUE PB1
-
-#define LED_BUILTIN LED_RED
-
-// On-board user buttons
-#define USER_BTN PC13
-#define USER_BTN_2 PB6
-
-// SPI definitions
-#define PIN_SPI_SS PA15
-#define PIN_SPI_SS1 PA15
-#define PIN_SPI_SS2 PA4
-#define PIN_SPI_MOSI PA7
-#define PIN_SPI_MISO PB4
-#define PIN_SPI_SCK PA5
-
-// I2C definitions
-#define PIN_WIRE_SDA PB9
-#define PIN_WIRE_SCL PB8
-
-// Timer Definitions
-// Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin
-#define TIMER_TONE TIM6
-#define TIMER_SERVO TIM7
-
-// UART Definitions
-#define SERIAL_UART_INSTANCE 2
-
-// Default pin used for 'Serial' instance
-// Mandatory for Firmata
-#define PIN_SERIAL_RX PA3
-#define PIN_SERIAL_TX PA2
-
-/* Extra HAL definitions */
-#define HAL_DAC_MODULE_ENABLED
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-/*----------------------------------------------------------------------------
- * Arduino objects - C++ only
- *----------------------------------------------------------------------------*/
-
-#ifdef __cplusplus
- // These serial port names are intended to allow libraries and architecture-neutral
- // sketches to automatically default to the correct port name for a particular type
- // of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
- // the first hardware serial port whose RX/TX pins are not dedicated to another use.
- //
- // SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
- //
- // SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
- //
- // SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
- //
- // SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
- //
- // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
- // pins are NOT connected to anything by default.
- #define SERIAL_PORT_MONITOR Serial
- #define SERIAL_PORT_USBVIRTUAL SerialUSB
- #define SERIAL_PORT_HARDWARE Serial2
-
-#endif
-
-#endif /* _VARIANT_ARDUINO_STM32_ */
diff --git a/variants/STM32F0xx/WRAITH32_F051K6/PeripheralPins.c b/variants/STM32F0xx/WRAITH32_F051K6/PeripheralPins.c
deleted file mode 100644
index 1f5cd53b13..0000000000
--- a/variants/STM32F0xx/WRAITH32_F051K6/PeripheralPins.c
+++ /dev/null
@@ -1,185 +0,0 @@
-/*
- *******************************************************************************
- * Copyright (c) 2019, STMicroelectronics
- * All rights reserved.
- *
- * This software component is licensed by ST under BSD 3-Clause license,
- * the "License"; You may not use this file except in compliance with the
- * License. You may obtain a copy of the License at:
- * opensource.org/licenses/BSD-3-Clause
- *
- *******************************************************************************
- * Automatically generated from STM32F051K6Ux.xml
- */
-#include "Arduino.h"
-#include "PeripheralPins.h"
-
-/* =====
- * Note: Commented lines are alternative possibilities which are not used per default.
- * If you change them, you will have to know what you do
- * =====
- */
-
-//*** ADC ***
-
-#ifdef HAL_ADC_MODULE_ENABLED
-WEAK const PinMap PinMap_ADC[] = {
- {PA_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC_IN0
- {PA_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC_IN1
- // {PA_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC_IN2 - RC Input
- {PA_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC_IN3
- {PA_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC_IN4
- {PA_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC_IN5
- {PA_6, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC_IN6
- {PA_7, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC_IN7
- // {PB_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC_IN8
- // {PB_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC_IN9
- {NC, NP, 0}
-};
-#endif
-
-//*** DAC ***
-
-#ifdef HAL_DAC_MODULE_ENABLED
-WEAK const PinMap PinMap_DAC[] = {
- {PA_4, DAC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // DAC1_OUT1
- {NC, NP, 0}
-};
-#endif
-
-//*** I2C ***
-
-#ifdef HAL_I2C_MODULE_ENABLED
-WEAK const PinMap PinMap_I2C_SDA[] = {
- {PB_7, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_I2C_MODULE_ENABLED
-WEAK const PinMap PinMap_I2C_SCL[] = {
- {PB_6, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
- {PB_8, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
- {NC, NP, 0}
-};
-#endif
-
-//*** PWM ***
-
-#ifdef HAL_TIM_MODULE_ENABLED
-WEAK const PinMap PinMap_PWM[] = {
- {PA_0, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 1, 0)}, // TIM2_CH1
- {PA_1, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 2, 0)}, // TIM2_CH2
- // {PA_2, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 3, 0)}, // TIM2_CH3
- // {PA_2, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM15, 1, 0)}, // TIM15_CH1
- {PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 4, 0)}, // TIM2_CH4
- {PA_3, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM15, 2, 0)}, // TIM15_CH2
- {PA_4, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM14, 1, 0)}, // TIM14_CH1
- {PA_5, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 1, 0)}, // TIM2_CH1
- {PA_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 1, 0)}, // TIM3_CH1
- {PA_6, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM16, 1, 0)}, // TIM16_CH1
- // {PA_7, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 1, 1)}, // TIM1_CH1N - C_FET_LO
- // {PA_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 2, 0)}, // TIM3_CH2 - C_FET_LO
- // {PA_7, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM14, 1, 0)}, // TIM14_CH1 - C_FET_LO
- // {PA_7, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM17, 1, 0)}, // TIM17_CH1 - C_FET_LO
- // {PA_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 1, 0)}, // TIM1_CH1 - B_FET_HI
- // {PA_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 2, 0)}, // TIM1_CH2 - A_FET_LO
- // {PA_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 3, 0)}, // TIM1_CH3 - A_FET_HI
- {PA_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 4, 0)}, // TIM1_CH4
- // {PA_15, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 1, 0)}, // TIM2_CH1 - LED_RED
- // {PB_0, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 2, 1)}, // TIM1_CH2N - C_FET_HI
- // {PB_0, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 3, 0)}, // TIM3_CH3 - C_FET_HI
- // {PB_1, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 3, 1)}, // TIM1_CH3N - B_FET_LO
- // {PB_1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 4, 0)}, // TIM3_CH4 - B_FET_LO
- // {PB_1, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM14, 1, 0)}, // TIM14_CH1 - B_FET_LO
- // {PB_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 2, 0)}, // TIM2_CH2 - LED_GREEN
- // {PB_4, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 1, 0)}, // TIM3_CH1 - LED_BLUE
- {PB_5, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 2, 0)}, // TIM3_CH2
- {PB_6, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM16, 1, 1)}, // TIM16_CH1N
- {PB_7, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM17, 1, 1)}, // TIM17_CH1N
- {PB_8, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM16, 1, 0)}, // TIM16_CH1
- {NC, NP, 0}
-};
-#endif
-
-//*** SERIAL ***
-
-#ifdef HAL_UART_MODULE_ENABLED
-WEAK const PinMap PinMap_UART_TX[] = {
- // {PA_2, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
- // {PA_9, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
- // {PA_14, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
- {PB_6, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART1)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_UART_MODULE_ENABLED
-WEAK const PinMap PinMap_UART_RX[] = {
- // {PA_3, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
- // {PA_10, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
- {PA_15, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
- {PB_7, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART1)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_UART_MODULE_ENABLED
-WEAK const PinMap PinMap_UART_RTS[] = {
- {PA_1, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
- {PA_12, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_UART_MODULE_ENABLED
-WEAK const PinMap PinMap_UART_CTS[] = {
- {PA_0, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
- {PA_11, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
- {NC, NP, 0}
-};
-#endif
-
-//*** SPI ***
-
-#ifdef HAL_SPI_MODULE_ENABLED
-WEAK const PinMap PinMap_SPI_MOSI[] = {
- {PA_7, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PB_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_SPI_MODULE_ENABLED
-WEAK const PinMap PinMap_SPI_MISO[] = {
- {PA_6, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PB_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_SPI_MODULE_ENABLED
-WEAK const PinMap PinMap_SPI_SCLK[] = {
- {PA_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PB_3, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {NC, NP, 0}
-};
-#endif
-
-#ifdef HAL_SPI_MODULE_ENABLED
-WEAK const PinMap PinMap_SPI_SSEL[] = {
- {PA_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {PA_15, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
- {NC, NP, 0}
-};
-#endif
-
-//*** No CAN ***
-
-//*** No ETHERNET ***
-
-//*** No QUADSPI ***
-
-//*** No USB ***
-
-//*** No SD ***
\ No newline at end of file
diff --git a/variants/STM32F0xx/WRAITH32_F051K6/PinNamesVar.h b/variants/STM32F0xx/WRAITH32_F051K6/PinNamesVar.h
deleted file mode 100644
index 83817ea403..0000000000
--- a/variants/STM32F0xx/WRAITH32_F051K6/PinNamesVar.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/* SYS_WKUP */
-#ifdef PWR_WAKEUP_PIN1
- SYS_WKUP1 = PA_0,
-#endif
-#ifdef PWR_WAKEUP_PIN2
- SYS_WKUP2 = NC,
-#endif
-#ifdef PWR_WAKEUP_PIN3
- SYS_WKUP3 = NC,
-#endif
-#ifdef PWR_WAKEUP_PIN4
- SYS_WKUP4 = NC,
-#endif
-#ifdef PWR_WAKEUP_PIN5
- SYS_WKUP5 = NC,
-#endif
-#ifdef PWR_WAKEUP_PIN6
- SYS_WKUP6 = NC,
-#endif
-#ifdef PWR_WAKEUP_PIN7
- SYS_WKUP7 = NC,
-#endif
-#ifdef PWR_WAKEUP_PIN8
- SYS_WKUP8 = NC,
-#endif
\ No newline at end of file
diff --git a/variants/STM32F0xx/WRAITH32_F051K6/variant_WRAITH32_F051K6.cpp b/variants/STM32F0xx/WRAITH32_F051K6/variant_WRAITH32_F051K6.cpp
deleted file mode 100644
index a8c60df59a..0000000000
--- a/variants/STM32F0xx/WRAITH32_F051K6/variant_WRAITH32_F051K6.cpp
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- Copyright (c) 2011 Arduino. All right reserved.
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- See the GNU Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-*/
-
-#include "pins_arduino.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-// Pin number
-const PinName digitalPin[] = {
- PA_10, //D0
- PA_9, //D1
- PA_12, //D2
- PB_0, //D3
- PB_7, //D4
- PB_6, //D5
- PB_1, //D6
- PF_0, //D7
- PF_1, //D8
- PA_8, //D9
- PA_11, //D10
- PB_5, //D11
- PB_4, //D12
- PB_3, //D13
- PA_0, //D14/A0
- PA_1, //D15/A1
- PA_3, //D16/A2
- PA_4, //D17/A3
- PA_5, //D18/A4
- PA_6, //D19/A5
- PA_7, //D20/A6
- PA_2, //D21
- PA_15 //D22
-};
-
-// Analog (Ax) pin number array
-const uint32_t analogInputPin[] = {
- 14, // A0
- 15, // A1
- 16, // A2
- 17, // A3
- 18, // A4
- 19, // A5
- 20 // A6
-};
-
-#ifdef __cplusplus
-}
-#endif
-
-// ----------------------------------------------------------------------------
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * @brief System Clock Configuration
- * @param None
- * @retval None
- */
-WEAK void SystemClock_Config(void)
-{
- RCC_OscInitTypeDef RCC_OscInitStruct;
- RCC_ClkInitTypeDef RCC_ClkInitStruct;
-
- // Initializes the CPU, AHB and APB busses clocks
- RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI | RCC_OSCILLATORTYPE_HSI14 | RCC_OSCILLATORTYPE_LSI;
- RCC_OscInitStruct.HSIState = RCC_HSI_ON;
- RCC_OscInitStruct.HSI14State = RCC_HSI14_ON;
- RCC_OscInitStruct.HSICalibrationValue = 16;
- RCC_OscInitStruct.HSI14CalibrationValue = 16;
- RCC_OscInitStruct.LSIState = RCC_LSI_ON;
- RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
- RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
- RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL12;
- RCC_OscInitStruct.PLL.PREDIV = RCC_PREDIV_DIV1;
- while (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK);
-
- // Initializes the CPU, AHB and APB busses clocks
- RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK | RCC_CLOCKTYPE_PCLK1;
- RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
- RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
- RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
- while (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1) != HAL_OK);
-}
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/variants/STM32F0xx/WRAITH32_F051K6/variant_WRAITH32_F051K6.h b/variants/STM32F0xx/WRAITH32_F051K6/variant_WRAITH32_F051K6.h
deleted file mode 100644
index 0f4d5db00c..0000000000
--- a/variants/STM32F0xx/WRAITH32_F051K6/variant_WRAITH32_F051K6.h
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- Copyright (c) 2011 Arduino. All right reserved.
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- See the GNU Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-*/
-
-#ifndef _VARIANT_ARDUINO_STM32_
-#define _VARIANT_ARDUINO_STM32_
-
-#ifdef __cplusplus
-extern "C" {
-#endif // __cplusplus
-
-/*----------------------------------------------------------------------------
- * Pins
- *----------------------------------------------------------------------------*/
-
-#define PA10 0
-#define PA9 1
-#define PA12 2
-#define PB0 3
-#define PB7 4 // RX, SDA
-#define PB6 5 // TX, SCL
-#define PB1 6
-#define PF0 7
-#define PF1 8
-#define PA8 9
-#define PA11 10
-#define PB5 11
-#define PB4 12 // LED_BLUE
-#define PB3 13 // LED_GREEN
-#define PA0 A0
-#define PA1 A1
-#define PA3 A2
-#define PA4 A3
-#define PA5 A4
-#define PA6 A5
-#define PA7 A6
-#define PA2 21 // RC Input
-#define PA15 22 // LED_RED
-
-// This must be a literal
-#define NUM_DIGITAL_PINS 23
-// This must be a literal with a value less than or equal to to MAX_ANALOG_INPUTS
-#define NUM_ANALOG_INPUTS 7
-
-// On-board LED pin number
-#define LED_GREEN PB3
-#define LED_BLUE PB4
-#define LED_RED PA15
-#define LED_BUILTIN LED_GREEN
-
-
-// On-board user button
-//#define USER_BTN NC
-
-// I2C Definitions
-#define PIN_WIRE_SDA PB7 // 4
-#define PIN_WIRE_SCL PB6 // 5
-
-// Timer Definitions
-#define TIMER_SERVO TIM6
-
-// UART Definitions
-#define SERIAL_UART_INSTANCE 2 //Connected to ST-Link
-
-// Serial Pin Firmata
-#define PIN_SERIAL_RX PB7 // 4
-#define PIN_SERIAL_TX PB6 // 5
-
-/* Extra HAL modules */
-#define HAL_DAC_MODULE_ENABLED
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-/*----------------------------------------------------------------------------
- * Arduino objects - C++ only
- *----------------------------------------------------------------------------*/
-
-#ifdef __cplusplus
- // These serial port names are intended to allow libraries and architecture-neutral
- // sketches to automatically default to the correct port name for a particular type
- // of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
- // the first hardware serial port whose RX/TX pins are not dedicated to another use.
- //
- // SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
- //
- // SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
- //
- // SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
- //
- // SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
- //
- // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
- // pins are NOT connected to anything by default.
- #define SERIAL_PORT_MONITOR Serial
- #define SERIAL_PORT_HARDWARE Serial
-#endif
-
-#endif /* _VARIANT_ARDUINO_STM32_ */