New board support

Hello

Support for the board I would like to use is now in the Arduino core:

(Release Arduino Core for STM32 2.11.0 · stm32duino/Arduino_Core_STM32 · GitHub)

variant(WL): add Oceanus-I module and EV

I need to work with this in PIO.

Is there a way I can do so?

Thanks

Can you try this?

  1. Create a new project for “Arduino Uno” and framework “Arduino”
  2. Overwrite the platformio.ini with
[env]
platform = ststm32@19.3.0
board = we_oceanus1
framework = arduino
platform_packages =
    framework-arduinoststm32@https://github.com/stm32duino/Arduino_Core_STM32/archive/refs/tags/2.11.0.zip

; Select whichever one you have via project environment switcher
; for "Oceanus-I Module"
[env:we_oceanus1]
board = we_oceanus1

; for "Oceanus-I EV"
[env:we_oceanus1_ev]
board = we_oceanus1_ev
  1. Create a new folder boards inside the project
  2. Create boards/we_oceanus1_ev.json as
{
  "build": {
    "arduino": {
        "variant_h": "variant_WE_OCEANUS1_EV.h"
    },
    "core": "stm32",
    "cpu": "cortex-m4",
    "extra_flags": "-DSTM32WL -DSTM32WLxx -DSTM32WLE5xx -DARDUINO_WE_OCEANUS1_EV",
    "f_cpu": "48000000L",
    "framework_extra_flags": {
      "arduino": "-DUSE_CM4_STARTUP_FILE -DCUSTOM_PERIPHERAL_PINS"
    },
    "mcu": "stm32wle5cc",
    "product_line": "STM32WLE5xx",
    "variant": "STM32WLxx/WL54CCU_WL55CCU_WLE4C(8-B-C)U_WLE5C(8-B-C)U"
  },
  "debug": {
    "default_tools": [
      "stlink"
    ],
    "jlink_device": "STM32WLE5CC",
    "onboard_tools": [
      "stlink"
    ],
    "openocd_target": "stm32wlx",
    "svd_path": "STM32WLE5_CM4.svd"
  },
  "frameworks": [
    "arduino"
  ],
  "name": "Oceanus-I EV",
  "upload": {
    "maximum_ram_size": 65536,
    "maximum_size": 262144,
    "protocol": "stlink",
    "protocols": [
      "jlink",
      "cmsis-dap",
      "stlink",
      "mbed"
    ]
  },
  "url": "https://www.we-online.com/de/components/products/OCEANUS-I",
  "vendor": "ST"
}
  1. Create boards/we_oceanus1.json as
{
  "build": {
    "arduino": {
        "variant_h": "variant_WE_OCEANUS1.h"
    },
    "core": "stm32",
    "cpu": "cortex-m4",
    "extra_flags": "-DSTM32WL -DSTM32WLxx -DSTM32WLE5xx -DARDUINO_WE_OCEANUS1",
    "f_cpu": "48000000L",
    "framework_extra_flags": {
      "arduino": "-DUSE_CM4_STARTUP_FILE -DCUSTOM_PERIPHERAL_PINS"
    },
    "mcu": "stm32wle5cc",
    "product_line": "STM32WLE5xx",
    "variant": "STM32WLxx/WL54CCU_WL55CCU_WLE4C(8-B-C)U_WLE5C(8-B-C)U"
  },
  "debug": {
    "default_tools": [
      "stlink"
    ],
    "jlink_device": "STM32WLE5CC",
    "onboard_tools": [
      "stlink"
    ],
    "openocd_target": "stm32wlx",
    "svd_path": "STM32WLE5_CM4.svd"
  },
  "frameworks": [
    "arduino"
  ],
  "name": "Oceanus-I Module",
  "upload": {
    "maximum_ram_size": 65536,
    "maximum_size": 262144,
    "protocol": "stlink",
    "protocols": [
      "jlink",
      "cmsis-dap",
      "stlink",
      "mbed"
    ]
  },
  "url": "https://www.we-online.com/de/components/products/OCEANUS-I",
  "vendor": "ST"
}
  1. Use the src/main.cpp
#include <Arduino.h>

#ifndef LED_BUILTIN // "Oceanus-I Module" has no defined blinky LED
#define LED PA7 /* change here as needed */
#else
#define LED LED_BUILTIN /* use LED of evaluation board */
#endif

void setup() {
    pinMode(LED, OUTPUT);
}

void loop() {
    digitalWrite(LED, LOW);
    delay(1000);
    digitalWrite(LED, HIGH);
    delay(1000);
}
  1. Try to build and upload as normal.

Wow. Thank you. Yes that works. Briliant. I will test some more but so far all good.

Thank you again