Introducing Sduino for the STM8

Arduino on the STM8 (8 bit processor)
MarkB
Posts: 7
Joined: Sun Oct 02, 2016 11:40 pm

Re: Introducing Sduino for the STM8

Post by MarkB » Mon Oct 23, 2017 4:41 pm

ag123 wrote:
Sat Oct 21, 2017 4:49 pm
any one figured out more than the above? which seem to suggest debug for stm8s is probably hitting a wall with open sourced tools.
Having fallen deep down the eForth rabbit hole, I haven't got around to trying it out, but there is an STM8 into GDB project here since earlier this year: https://sourceforge.net/projects/stm8-b ... gdb/files/

tenbaht
Posts: 8
Joined: Wed Oct 11, 2017 3:10 pm

Re: Introducing Sduino for the STM8

Post by tenbaht » Mon Oct 23, 2017 9:01 pm

STM8 support in SDCC is progressing fast in the last 12 months and IMHO perfectly production ready. The code size still seems to be bigger than with the commercial compilers, but I never investigated in detail how big the difference really is.

I really love the very direct access to the inner workings of the compilation stages, especially the extremely useful assembler listings. That is much better than for any other compiler I have used so far.

The simulator is progressing as well, but it is not yet for production use.

STM8 supports debugging via ST-Link. Are you aware of this project: https://stm8-binutils-gdb.sourceforge.io/ ? OpenOCD and gdb support for the STM8 via ST-Link. I didn't try it myself yet, but it sounds very interesting.
https://github.com/tenbaht/sduino - Programming the STM8 the Arduino way

gungsukma
Posts: 5
Joined: Thu Jan 12, 2017 5:44 am

Re: Introducing Sduino for the STM8

Post by gungsukma » Mon Nov 27, 2017 7:31 am

Please add a menu or something to unlock the protected chip

On linux terminal, it is:
echo "00 00 ff 00 ff 00 ff 00 ff 00 ff" | xxd -r -p > factory_defaults.bin
stm8flash -c stlinkv2 -p stm8s103f3 -s opt -w factory_defaults.bin

evildave_666
Posts: 34
Joined: Mon Apr 27, 2015 11:20 pm

Re: Introducing Sduino for the STM8

Post by evildave_666 » Wed Dec 06, 2017 3:29 am

Is it intentional that a board manager install is unable to directly access include paths and I still have to manually copy header/library files from the library directories when using the IDE or is my install somehow corrupt (something that's not entirely unlikely since I have half a dozen other cores installed)?

tenbaht
Posts: 8
Joined: Wed Oct 11, 2017 3:10 pm

Re: Introducing Sduino for the STM8

Post by tenbaht » Wed Dec 06, 2017 12:31 pm

No, you are not expected to copy library files. It should just work - the same way it does for the regular Arduino libs. But it only works for libraries that are modified for use with Sduino as most Arduino libs are written in C++ instead of plain C.

What exactly are you trying to do?
https://github.com/tenbaht/sduino - Programming the STM8 the Arduino way

tenbaht
Posts: 8
Joined: Wed Oct 11, 2017 3:10 pm

Re: Introducing Sduino for the STM8

Post by tenbaht » Wed Dec 06, 2017 12:39 pm

gungsukma wrote:
Mon Nov 27, 2017 7:31 am
Please add a menu or something to unlock the protected chip
Good suggestion, thank you. I set up a feature request: https://github.com/tenbaht/sduino/issues/37
I am little busy right now, but I will look into it as soon as time permits.
https://github.com/tenbaht/sduino - Programming the STM8 the Arduino way

evildave_666
Posts: 34
Joined: Mon Apr 27, 2015 11:20 pm

Re: Introducing Sduino for the STM8

Post by evildave_666 » Wed Dec 06, 2017 3:38 pm

tenbaht wrote:
Wed Dec 06, 2017 12:31 pm

What exactly are you trying to do?
Just compiling a simple sweep program using the servo library is failing due to not finding Servo.h unless I copy it and the rest of the library directory into my sketch.

If it is supposed to work I think I'm going to have to try a fresh install due to how many cores I have cluttering things up.

Post Reply