Hello to those wanting to see a working stm8 port in sdcc.
I've worked on the stm8 port a bit in the recent days. Of course it is
far from complete, and the code generated still tends to be inefficient
and buggy, and not all aspects of code generation are implemented yet.
Nevertheless, the port can now compile 30 of the standard library
functions: Assembly code is generated, assembling it fails, since some
of the glue code between compiler and assembler is missing¹.
The port can be found in the stm8 branch:
A patch to implement the missing glue would be welcome (or just commit
it to the branch if you are an sdcc developer). I guess most of the
implementation can be done by looking at how the z80 and hc08 ports do this.
¹ e.g. for emitting labels. Just do a make -k in device/lib/stm8 to see
the error messages from the assembler, have a look at the generated .asm