#199 Correction of cinc2h.pl

closed-fixed
Borut Ražem
None
5
2012-10-01
2012-09-28
Molnár Károly
No

- In the *.h files of pic14 series returns the "#define reg_ADDR" opportunities.

- Removed two empty lines in the end of *.c files.

- Removed the pseudo registers.
The sdcc handles it badly, if two different size variable is overlapped. :-(

Excerpt from the pic18f1220.c:

__at(0x0FC2) __sfr ADCON0;
__at(0x0FC2) volatile __ADCON0bits_t ADCON0bits;

__at(0x0FC3) __sfr ADRES;

__at(0x0FC3) volatile unsigned short wADRES;
__at(0x0FC3) __sfr ADRESL;

__at(0x0FC4) __sfr ADRESH;

------------------------------------------------------------------------

The sdcc this prepares from it, excerpt from the libdev18f1220_a-pic18f1220.asm:

_ADCON0
_ADCON0bits res 1
_ADRES
_ADRESL
_wADRES res 2

ustat_pic18f1220_08 udata 0X0FC4
_ADRESH res 1

Unfortunately, this is incorrect.

--------------------------------------------------------------------

This would be good:

_ADCON0
_ADCON0bits res 1
_wADRES res 2

ustat_pic18f1220_08 udata 0X0FC3
_ADRES
_ADRESL res 1
_ADRESH res 1

Therefore, this option has ceased.

Discussion

  • support/scripts/cinc2h.pl

     
    Attachments
  • Borut Ražem
    Borut Ražem
    2012-10-01

    • assigned_to: nobody --> borutr
    • status: open --> closed-fixed
     
  • Borut Ražem
    Borut Ražem
    2012-10-01

    Patch applied in svn revision #8126.

    Borut