St stm32f0discovery

Is there any reason that platformio does not support the arduino framework on this development board? The JSON file shows

  "frameworks": [
    "cmsis",
    "stm32cube",
    "libopencm3",
    "zephyr"
  ],

as does the wiki entry:
https://docs.platformio.org/en/latest/boards/ststm32/disco_f051r8.html#frameworks

STM support the board in arduino2 as a generic F) CPU with a specific STM32F051R8T6 entry. I prefer platformio as an IDE and ave tried various approaches using variants … but with no success.

Arduino-STM32 does not support it directly with a dedicated variant, only with a geneirc board definition:

so this is just missing in the PlatformIO board definition.

Try overwriting your disco_f051r8.json in C:\Users\<user>\.platformio\platforms\ststm32\boards with

{
  "build": {
    "cpu": "cortex-m0",
    "extra_flags": "-DSTM32F0 -DSTM32F051x8 -DARDUINO_GENERIC_F051R8TX",
    "f_cpu": "48000000L",
    "mcu": "stm32f051r8t6",
    "product_line": "STM32F051x8",
    "zephyr": {
       "variant": "stm32f0_disco"
    },
    "variant": "STM32F0xx/F051R8(H-T)"
  },
  "debug": {
    "default_tools": [
      "stlink"
    ],
    "jlink_device": "STM32F051R8",
    "onboard_tools": [
      "stlink"
    ],
    "openocd_board": "stm32f0discovery",
    "openocd_target": "stm32f0x",
    "svd_path": "STM32F0x1.svd"
  },
  "frameworks": [
    "arduino",
    "cmsis",
    "stm32cube",
    "libopencm3",
    "zephyr"
  ],
  "name": "ST STM32F0DISCOVERY",
  "upload": {
    "maximum_ram_size": 8192,
    "maximum_size": 65536,
    "protocol": "stlink",
    "protocols": [
      "jlink",
      "cmsis-dap",
      "stlink",
      "blackmagic"
    ]
  },
  "url": "http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1848/PF253215",
  "vendor": "ST"
}

Then you should be able to create an Arduino project for it.

Thanks, I will try that out tomorrow.
Cheers

Hi Max,
Thank you for your help.