http://palmmicro.com/woody/blog/ar1688/20101123.php
The Journey to SDCC 3.0.0
Nov 23, 2010
It took the SDCC team 19 months travelling from 2.9.0 to 3.0.0 release
on Nov 1, seems that they had done many house keeping work during this time.
The items in release note directly related with our AR1688 Z80 are:
* changed z80 and gb targets object file extension to .rel
* special sdcc keywords which are not preceded by a double underscore
are deprecated in sdcc version 3.0.0 and higher. See section ANSI-Compliance
in sdccman
* asxxxx / aslink renamed to sdas / sdld and synchronized with ASXXXX
V2.0
Obviously those changes mean lots of changes in our source code and
related makefiles. Partly because of I was busy with PA6488 work and moving
my blog, partly because of I was lazy to fork a test version, I ignored the
test phase of release candidate 1 & 2. But as soon as I started testing
3.0.0, I realized that I had made a mistake.
Most other Z80 users in the world are as lazy as me! So the Z80 port
was not tested as good as the 8051 port. The first problem I met was inline
asm not working any more, the SDCC mailing list soon replied it was a known
bug already, and fixed in recent snapshot. Then I met another known problem,
sometimes jp instruction was optimized into jr incorrectly, this time no
ready fix yet, although somebody had already posted a workaround in the bug
tracking system.
With hundreds changes in my code, I do not hope to change back and
wait. I started to try the workaround myself, but this need to recompile
SDCC. As I had tried VC2008 to compile 2.9.0 and failed, I started to learn
other ways to compile SDCC on my Windows Vista.
At first I installed Cygwin, after several hours I got error messages
like "gcc options -mno-cygwin not used any more". I realized that Cygwin
compile was discarded the same way as MSVC. The only way is to use MinGW on
Linux now.
I downloaded VisualBox and installed it. It asked me for Linux install
DVD when I tried to add a Linux visual machine. Then I downloaded DAEMON
Tools Lite to simulate DVD drive and ubuntu-10.10-dvd-i386.iso as Linux
install file. The installation process was smoother than I expected. After
another several hours time I was able to compile and try the workaround
myself. Finally I used a safer workaround, which is now working together
with AR1688 software 0.49.007.
The result is good, SDCC 3.0.0 generated 5% less code than 2.9.0, with
Z80 usually it means 5% performance improve as well.
SDCC 3.0.0 hates bad code. I added hundreds of (UCHAR) before const
char like 'T', and adjusted many const string point declare. In rc4.c, a
line originally as "x = x + something" can not be compiled until I change it
to "x += something". The most fatal experience was with my own crt0.s, an
empty call was made to a non used section, it works on 2.9.0 but 3.0.0
compiled the call to an unexpected address and destroyed safe mode booting
process. I lost 2 phones before I figured out the problem.
With so many changes along with SDCC 3.0.0, we plan to release 0.50
software in the near future. Software API 0.49.007 as 0.50 release candidate
1 is available at the snapshot part now. Hope our customers are not so lazy
as Z80 SDCC users like me. Due to lots of file names changes, I suggest to
remove old API completely before extract the new API package.
The new API package is much larger than before, mostly because MinGW
compiled sdcc.exe 3.0.0 is now 2.3M bytes, while VC6 compiled sdcc.exe 2.9.0
only 0.8M bytes. And other SDCC related tools in bin directory are also much
larger than before.
The 8051 example code to work with AR168M in mcs51 directory is also
updated and now compiled with SDCC 3.0.0.
Woody
http://palmmicro.com/woody/
------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user