SDCC 3.6.0 released

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
User11792
Level 1
Level 1
A few weeks ago, SDCC 3.6.0 was released. SDCC is a free C implementation targeting various 8-bit architectures. In particular, it targets architectures that would be hard to target for GCC or LLVM: Few registers, highly irregular register and instruction sets, etc. The architectures supported include 8051. While most other compilers targeting the 8051 only aim for the 1989 ANSI C standard, SDCC aims for support of the newer 1999 and 2011 ISO C standards.

Here is the release announcement:

Today a new release of SDCC was made. We are now at version 3.6.0.
You can get it at:
sourceforge.n...cts/sdcc/files/

So what's new?
* Merged upstream binutils 2.25
* New memory management with lower overhead
* Changed default language dialect to --std-sdcc11
* Diagnostic for missing type specifier: No implicit int outside of C90
mode anymore
* C11 generic selections
* char type is now unsigned by default (old behaviour can be restored
using --fsigned-char)
* Character constants are now of type int instead of char.
* ISO C95 and ISO C11 wide character constants
* ISO C95 and ISO C11 wide string literals
* Basic standard library support for wide characters: c16rtomb(),
mbrtoc16(), mbsinit(), mbtowc(), mbrlen(), mbrtoc32, c32rtomb(),
mbrtowc(), wcrtomb(), mblen(), wctomb()
* Treat all ports the same in the manual (i.e. mcs51-specific stuff is now
clearly described as such)
* Reorganized interrupt handling for z80, z180, r2k, r3ka, tlcs90, gbz80
backends
* Workaround for stm8 division hardware bug
* ELF/DWARF support for stm8
* Output symbol table for ELF
* pic16 port now uses standard-compliant crt0iz that initializes static
and globals to 0 by default

And of course numerous feature requests and bug fixes are included as well.

Once again I hope you will enjoy using this new release.

Maarten Brock
SDCC 3.6.0 Release Manager


Upstream SDCC still lacks the XC800-specific aspects of the fork in DAvE-Bench. However, the fork in DAvE-Bench is based on SDCC 2.9.0, so it lacks 7 years of improvments in upstream SDCC.

Philipp
0 Likes
1 Reply
Not applicable
I've been using SDCC for the XC878 for a long time.

I run it with the following Parameters:`sdcc -mmcs51 --xram-loc 0xF000 --xram-size 3072`

The important part is to add some custom startup code, e.g.:
https://github.com/lonkamikaze/hsk-libs/blob/master/src/hsk_boot/hsk_boot.c#L108
https://github.com/lonkamikaze/hsk-libs/blob/master/src/hsk_boot/hsk_boot.c#L86

This function takes the frequency of your external oscillator and sets the PLL up to run the core at 24MHz:
https://github.com/lonkamikaze/hsk-libs/blob/master/src/hsk_boot/hsk_boot.c#L323
0 Likes