STM8 support dropped?

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: RoccoMarco, lbednarz, utzig, tfAteba, barthess

Gamadril
Posts: 3
Joined: Wed Jan 29, 2014 9:31 am
Location: Germany

STM8 support dropped?

Postby Gamadril » Wed Jan 29, 2014 9:37 am

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

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: STM8 support dropped?

Postby Giovanni » Wed Jan 29, 2014 9:45 am

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

Gamadril
Posts: 3
Joined: Wed Jan 29, 2014 9:31 am
Location: Germany

Re: STM8 support dropped?

Postby Gamadril » Wed Jan 29, 2014 10:23 am

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

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: STM8 support dropped?

Postby Giovanni » Wed Jan 29, 2014 11:10 am

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

Gamadril
Posts: 3
Joined: Wed Jan 29, 2014 9:31 am
Location: Germany

Re: STM8 support dropped?

Postby Gamadril » Thu Jan 30, 2014 10:33 am

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?

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: STM8 support dropped?

Postby Giovanni » Thu Jan 30, 2014 11:18 am

Can't tell, I should look at the code. It could also be an error in the macro.

Giovanni

User avatar
aGuegu
Posts: 29
Joined: Thu Dec 07, 2017 4:15 am
Has thanked: 1 time
Been thanked: 5 times

Re: STM8 support dropped?

Postby aGuegu » Mon Apr 09, 2018 7:21 am

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/stm8demos

And check this out:

http://www.colecovision.eu/stm8/compilers.shtml

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: STM8 support dropped?

Postby Giovanni » Mon Apr 09, 2018 7:49 am

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

User avatar
aGuegu
Posts: 29
Joined: Thu Dec 07, 2017 4:15 am
Has thanked: 1 time
Been thanked: 5 times

Re: STM8 support dropped?

Postby aGuegu » Mon Apr 09, 2018 4:39 pm

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.


Return to “General Support”

Who is online

Users browsing this forum: No registered users and 9 guests