[Openec] checksum of first 64k of updateme.bin not calculated correctly

Frieder Ferlemann frieder.ferlemann at web.de
Mon Nov 1 14:00:52 EDT 2010


Hi Paul,

Am 01.11.2010 14:01, schrieb Paul Fox:
>  > > affairs.
>  > 
>  > Fine.
> 
> yes, it's definitely rough, still.  :-)

:)

>  > These type of accesses could be reduced to:
>  > 
>  >                            1150 ;       updateme.c:423: xbi[SPICFG] &= 
>  > ~(SPICFG_WEN | SPICFG_CS_LOW);
>  >    0404 90 FE AD           1151         mov     dptr,#(_xbi + 0x000d)
>  >    0407 E0                 1152         movx    a, at dptr
>  >    0409 xx E7              1154         anl     a,#0xE7
>  >    040F xx                 1156         mov     r2,a
>  >    0410 F0                 1157         movx    @dptr,a
>  > 
>  > with relatively little effort by using a peephole file.
> 
> yes, we were talking about that sort of construct just a day or two
> ago.  fixing that would help a lot.

I'll implement this soon.

> regarding optimization -- from the sdcc docs, it looks like most (all?)
> optimizations are on by default, and the options exist to disable them,
> correct?  so there's nothing we should be adding to the makefile to
> make sure we're getting all available benefit?

You could set the (undocumented) environment variable
SDCC_SJMP_JUMPTABLE to optimize some switch statements
and could save a few bytes (say 20-40).
(There is another (undocumented) environment variable
SDCC_REGTRACK which enables tracking of register
values, but I would not recommend setting it).
So there's nothing to add to the makefile.

Greetings,
Frieder


More information about the Openec mailing list