Closed namoaton closed 5 years ago
bump
I would love to have this added as well
Would be great as there now is an ESP board with an STM8: ESP-14
+1, please add support for stm8L family
+2, please add support for stm8L family
bump
Not yet in Platformio??
nope
In the mean time, there's this: https://stm8-binutils-gdb.sourceforge.io/ It seems to work well, and maybe Platform.io can use it as a base for integration?
+1
As I see STM8 supported by SDCC - Small Device C Compiler https://www.fischl.de/stm8/stm8svl_discovery_linux/
+1 for STM8L
I will be glad to see support of STM8!
Folks, do you have any board from this list https://github.com/tenbaht/sduino/blob/development/sduino/hardware/sduino/stm8/boards.txt ?
I have one of those extremely cheap STM8S103 breakout boards, which I guess is called stm8sblue in your link. Although my board has an STM8S103F2, which only has 4 KiB of Flash.
I'll be willing and able to help implementing and testing.
pio platform install https://github.com/platformio/platform-ststm8.git
Does it work?
I'm not using VS Code, I'm running platformio directly from the command line (plain cmd
on Win10).
Compiling works.
But when uploading, the following error occurs:
Configuring upload protocol...
AVAILABLE: serial
CURRENT: upload_protocol = serial
Looking for upload port...
Error: Please specify `upload_port` for environment or use global `--upload-port` option.
For some development platforms it can be a USB flash drive (i.e. /media/<user>/<device name>)
*** [upload] Explicit exit, status 1
Upload command should be:
stm8flash.exe -cstlinkv2 -pstm8s103f2 -s flash -w .pioenvs\blue\firmware.ihx
However, this command mysteriously only works about 10 % of the time. But that might be some bad wiring, I'll keep investigating. Edit: As I suspected, this was because of very shoddy dupont wires that came with my stlink.
I now tried VS Code. Same problem with the upload tool.
Another problem is that when creating a new project, a main.cpp
file is automatically created, which confuses the build system (SDCC is only a C compiler):
Compiling .pioenvs\stm8sblue\FrameworkArduino\WInterrupts.c.rel
In file included from C:\users\a\.platformio\packages\framework-arduinoststm8\cores\sduino/Arduino.h:32:0,
from src\main.cpp:1:
C:\users\a\.platformio\packages\framework-arduinoststm8\STM8S_StdPeriph_Driver\inc/stm8s.h:90:3: error: #error "Unsupported Compiler!"
#error "Unsupported Compiler!" /* Compiler defines not found */
^~~~~
In file included from C:\users\a\.platformio\packages\framework-arduinoststm8\cores\sduino/Arduino.h:32:0,
from src\main.cpp:1:
C:\users\a\.platformio\packages\framework-arduinoststm8\STM8S_StdPeriph_Driver\inc/stm8s.h:2762:11: fatal error: intrinsics.h: No such file or directory
It works when the main.cpp
is manually renamed to main.c
.
Resolved in https://github.com/platformio/platform-ststm8/releases/tag/v1.0.0
Please file a new issue if you have any problems.
Board STM8L Discovery compiler SDCC - Small Device C Compiler