Page 1 of 1
STM8 support dropped?
Posted: Wed Jan 29, 2014 9:37 am
by Gamadril
Hello,
It seems that the latest ChibiOS/RT version does not support STM8 any more. Which was the latest release still supporting that platform? I want to try get it compiled with SDCC (Small Device C Compiler)...
regards
Re: STM8 support dropped?
Posted: Wed Jan 29, 2014 9:45 am
by Giovanni
Hi,
The STM8 support is present in 2.4.x and is still present in 2.6.x but untested.
The problem are the compilers:
1) Raisonance: works but the generated code could be better.
2) Cosmic: has bugs preventing the test suite execution completion.
3) IAR: limited to 8k does not allow testing.
When the STM8 support will be released officially in SDCC probably I will give it another try, probably I would also drop all the other compilers. You may definitely try a port for SDCC, it should not be difficult.
Giovanni
Re: STM8 support dropped?
Posted: Wed Jan 29, 2014 10:23 am
by Gamadril
Thanks Giovanni,
I did a quick test with the current SDCC snapshot (SDCC : mcs51/z80/z180/r2k/r3ka/gbz80/tlcs90/ds390/pic16/pic14/TININative/ds400/hc08/s08/stm8 3.3.2 #8938 (Jan 28 2014) (Mac OS X i386)), but it seems it does not like empty structs:
Code: Select all
ChibiOS_2.4.5/os/kernel/templates/chcore.h:123: syntax error: token -> '}' ; column 1
Are they there for doxygen?
and some macros:
Code: Select all
ChibiOS_2.4.5/os/kernel/include/ch.h:110: error 176: sizeof applied to an incomplete type
Re: STM8 support dropped?
Posted: Wed Jan 29, 2014 11:10 am
by Giovanni
Hi,
The empty struct are only in template files, you are not supposed to compile templates. See how the other 3 STM8 ports are placed under "ports" and create a 4th port under ./ports/SDCC/STM8
Giovanni
Re: STM8 support dropped?
Posted: Thu Jan 30, 2014 10:33 am
by Gamadril
Thanks for pointing to the right direction. I created a new port. However I'm not sure what are equivalents in SDCC for far/near/tiny/const...
Other problem I found trying to compile the STM8S discovery demo from ChibiOS:
Code: Select all
ChibiOS_2.4.5/test/test.h:80: error 195: Size of array 'T0' is negative
Seems it's the STACK_ALIGN macro. It makes the passed value negative (0x00A1 -> 0xFFA1)
SDCC bug?
Re: STM8 support dropped?
Posted: Thu Jan 30, 2014 11:18 am
by Giovanni
Can't tell, I should look at the code. It could also be an error in the macro.
Giovanni
Re: STM8 support dropped?
Posted: Mon Apr 09, 2018 7:21 am
by aGuegu
Is now a good timing to reconsider stm8 support?
Now SDCC, like 3.6.0, supports stm8 quite well. The community has developed a patch on STM standard Periph Libs.
https://github.com/gicking/STM8-SPL_SDCC_patch/I personally have tried the patched lib with SDCC on several typical boards, and I will keep doing it.
https://github.com/aguegu/stm8demosAnd check this out:
http://www.colecovision.eu/stm8/compilers.shtml
Re: STM8 support dropped?
Posted: Mon Apr 09, 2018 7:49 am
by Giovanni
Hi,
Support has been dropped after 2.6 because lack of interest/feedback and, mainly, me being tired to deal with bad proprietary toolchains.
What about debugging and ST-Link support? the compiler is just one of the required element. Porting the code from 2.6 should be easy.
Giovanni
Re: STM8 support dropped?
Posted: Mon Apr 09, 2018 4:39 pm
by aGuegu
Both ST-Link v1/v2 works fine with stm8flash.
I do not know how to debug on stm8, stm32 also, with GDB. All I got is one or two blinking led and serial output, and building my projects little step by step.
I know it is a lot of work. And I understand why you drop support.
There is another rtos called Atomthreads,
http://atomthreads.com/, claims it supports stm8. But at the first glance, it is lack of the HAL layer. I may try that first as long as I got enough understanding about the chip.