#198 Regenerate the DEVICE.[ch] files with the cinc2h.pl program.

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

In the pic14 and pic16 and branches, uniform the appearance of everything DEVICE.c and DEVICE.h files. Support of bit fields. New pseudo registers:

extern __at(0x0FC3) __sfr ADRES;
extern __at(0x0FC3) volatile unsigned short wADRES; <------ pseudo register
extern __at(0x0FC3) __sfr ADRESL;
extern __at(0x0FC4) __sfr ADRESH;

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

Update the device/lib/pic16/libio/usart/uopen.c file.
No necessary the \"PIR1bits.TXIF_PIR1 = 0;\" line. Instead, it is enough the \"PIR1bits.TXIF = 0;\" line.
No necessary the \"PIE1bits.TXIE_PIE1 = 0;\" line. Instead, it is enough the \"PIE1bits.TXIE = 0;\" line.

Discussion

  • The third (last) part of the new-device-files.patch.tar.7z file.

     
  • Borut Ražem
    Borut Ražem
    2012-09-27

    I took a look to changed device files and I have some concerns:
    - in the new device .c files the sfr definitions are:
    __at(<addr>) __sfr <register>;
    old definitions are:
    __sfr __at(<addr>) <register>;
    Is the new syntax correct?

    - in the old .h device files (at least some) there were definitions of sfr addresses but they are missing in the new ones. This means broken backward compatibility if somebody is using sfr address symbols in his source code

    - in the copyright notice Karoly's first and second name is written using non ASCII characters. This characters are utf-8 encoded. Since utf-8 is (still) not the default encoding on many platforms and is not supported by many editors I propose to keep the source files in plain ASCII encoding.

    - I already fixed a typo in all (c)inc2h*.pl scripts so the device files have to be regenerated.

    Karoly, please comment my concerns if you feel I'm wrong or prepare a new set of patches. Please prepare several smaller patches, i.e. first for pic14 headers, second for pic14 c files, third for pic16 headers and fourth for pic16 c files, instead of a big one which have to be sliced and then merged.

    Borut

     
  • Borut Ražem
    Borut Ražem
    2012-09-27

    I also noticed that 2 extra empty lines are generated at the end of .c files. Can this be corrected?

    Borut

     
  • > - in the new device .c files the sfr definitions are:
    > __at(<addr>) __sfr <register>;
    > old definitions are:
    > __sfr __at(<addr>) <register>;
    > Is the new syntax correct?

    Yes, the sdcc compiles correctly.

    > - in the old .h device files (at least some) there were definitions of sfr
    > addresses but they are missing in the new ones. This means broken backward
    > compatibility if somebody is using sfr address symbols in his source code

    In the pic14 series returns that opportunity.

    > Karoly, please comment my concerns if you feel I'm wrong or prepare a new
    > set of patches. Please prepare several smaller patches, i.e. first for
    > pic14 headers, second for pic14 c files, third for pic16 headers and fourth
    > for pic16 c files, instead of a big one which have to be sliced and then
    > merged.

    Really better this way.

    > I also noticed that 2 extra empty lines are generated at the end of .c
    > files. Can this be corrected?

    This too I will fix.

     
  • Piece of new devices.

     
  • Piece of new devices.

     
  • Piece of new devices.

     
  • Piece of new devices.

     
  • Correction because of the new device files.

     
  • 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 #8127.

    Borut