platformio / platform-ststm8

ST STM8: development platform for PlatformIO
https://registry.platformio.org/platforms/platformio/ststm8
Apache License 2.0
41 stars 26 forks source link

Please add support for Nucleo-8S208RB board #33

Closed gicking closed 3 years ago

gicking commented 3 years ago

please consider adding support for the Nucleo-8S208RB development board by STM. Thanks a lot in advance!

https://www.st.com/en/evaluation-tools/nucleo-8s208rb.html

maxgerhardt commented 3 years ago

Hey, do you also have a board to test?

Please again execute the steps at #34 but with the modifications to

  1. Create a new file nucleo_8s208rb.json in boards/
  2. Fill it with the content
    {
    "build": {
      "core": "sduino",
      "extra_flags": "-DSTM8S_208RB -DSTM8S208",
      "f_cpu": "16000000L",
      "cpu": "stm8",
      "mcu": "stm8s208rbt6",
      "variant": "mb208"
    }, 
    "frameworks": [
      "arduino",
      "spl"
    ],
    "upload": {
      "maximum_ram_size": 6144,
      "maximum_size": 131072,
      "protocol": "stlinkv2",
      "protocols": [
        "stlinkv2",
        "serial"
      ]
    },
    "name": "NUCLEO-8S208RB",
    "url": "https://www.st.com/en/evaluation-tools/nucleo-8s208rb.html",
    "vendor": "STMicroelectronics"
    }
  3. platformio.ini
    [env:nucleo_8s208rb]
    platform = ststm8
    board = nucleo_8s208rb
    framework = spl
    ; no upload_command needed, automatically derives -p stm8s208?b which is correct

    (may also be added to the existing platformio.ini, but then make sure to use the project and environment switcher to get the right environment)

The rest is the same (e.g. regarding the LED on pin PC5). Try to compile and uplaod and see if that works :)