platformio / platform-ststm32

ST STM32: development platform for PlatformIO
https://registry.platformio.org/platforms/platformio/ststm32
Apache License 2.0
395 stars 309 forks source link

Board support request: LoRa E5 Dev Board / STM32WLE5JC #596

Closed nobodywasishere closed 1 year ago

nobodywasishere commented 2 years ago

This is the board/mcu I am looking to add support for, which is very similar to #543.

I have created this board json called lora_wle5jc.json that may work, I don't have a board on-hand just yet to test it yet and putting it in ~/.platformio/boards didn't let it show up in PlatformIO. I don't know of any frameworks that currently support it, but that is okay for what I am hoping to use it for (just bare-metal) (if a framework is required, please let me know). As well, I am not sure what upload protocols it supports just yet.

{
  "build": {
    "core": "stm32",
    "cpu": "cortex-m4",
    "extra_flags": "-DSTM32WLxx -DSTM32WLE5xx",
    "f_cpu": "48000000L",
    "framework_extra_flags": {
      "arduino": "-DUSE_CM4_STARTUP_FILE"
    },
    "mcu": "stm32wle5jc",
    "product_line": "STM32WLE5xx",
    "variant": "STM32WLxx/WL54JCI_WL55JCI_WLE5JC"
  },
  "debug": {
    "default_tools": [
      "stlink"
    ],
    "jlink_device": "STM32WLE5JC",
    "onboard_tools": [
      "stlink"
    ],
    "openocd_target": "stm32wlx",
    "svd_path": "STM32WLE5_CM4.svd"
  },
  "frameworks": [
  ],
  "name": "LoRa E5 Dev Board",
  "upload": {
    "maximum_ram_size": 65536,
    "maximum_size": 262144,
    "protocol": "stlink",
    "protocols": [
      "jlink",
      "cmsis-dap",
      "stlink",
      "mbed"
    ]
  },
  "url": "https://www.seeedstudio.com/LoRa-E5-Dev-Kit-p-4868.html",
  "vendor": "Seeed"
}

The SVD is available here.

nobodywasishere commented 2 years ago

I have a work-in-progress version going here that I'll update as I test it

nobodywasishere commented 2 years ago

Also this board is supported by Zephyr and there's useful documentation on how to use it here

nobodywasishere commented 2 years ago

I believe i've gotten both the CMSIS and STM32Cube frameworks working, still waiting to get a board to test them but they compile without errors. I'm starting to work on examples for these here. framework-stm32cubewl is already published to the PIO registry, and I'm currently waiting for framework-cmsis-stm32wl to be approved.

nobodywasishere commented 2 years ago

I've got working blinky programs with both CMSIS and STM32Cube frameworks, and have verified that those work for flashing the board. Should I create a PR with my board file? Currently still waiting for the framework-cmsis-stm32wl to be published, so until that happens CMSIS won't work.

drucknase commented 2 years ago

Hello, I use platformIO for my LoRa Node development. I bougth Seeed-Studio LoRa-E5 Dev board and want to use it with platformio IDE. Fortunately I found your board request but as far as I found this is until now not included in the platformio repository. So I tried to follow your thread but have no success to get my demo working. What I did:

[env:lora_e5_dev_board] platform = https://github.com/nobodywasishere/platform-ststm32.git board = lora_e5_dev_board framework = stm32cube `

============================================================

An unexpected error occurred. Further steps:

============================================================`

Thank's Wolfgang

nobodywasishere commented 2 years ago

What's happening is the proper framework package isn't being found. I believe you either need to add

[env:lora_e5_dev_board]
platform = https://github.com/nobodywasishere/platform-ststm32.git
platform_packages = 
    out0f0rder/framework-stm32cubewl
board = lora_e5_dev_board
framework = stm32cube

Or download https://github.com/out0f0rder/framework-stm32cubewl and put it in your ~/.platformio/packages folder (i dont know what it is on Windows)

nobodywasishere commented 2 years ago

Unfortunately i could not get the arduino framework working at this time, so your options are cmsis, stm32cube, and zephyr

drucknase commented 2 years ago

thank you for your fast response. I will try your proposal.