Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#2044 Incorrect header interpretation (pic14)

closed-invalid
Borut Ražem
None
5
2014-04-16
2012-06-14
Molnár Károly
No

I found a bug, which I thought that was corrected long ago. This due error few years since I use, custom headers (picXXX.h), instead of which is her own the sdcc. (Since then I forgot about this error.) Now I want compile a source in such a way that the original headers are I use. Does not succeed. (The old problem still exists. I do not understand. So much time has passed, and no one signaled?) Then I now will do it. The error may be produced with the attached archive.

The error message:

adc_busy.c:10: error 26: '_ADCON0bits' not a structure/union member
adc_busy.c:10: error 25: Structure/Union expected left of '.->'

SDCC : pic16/pic14 3.1.5 #7899

Károly

Discussion

  • Anyway the pic14 libio is prepared, but after I can send if the compilation works with the original headers as well.

     
  • Borut Ražem
    Borut Ražem
    2012-06-18

    Karoly,

    since you already have the working header file, can you please analyze where the problem is and prepare a patch? Is it a problem in header file generation perl script or in the (probably manually written or modified) header file itself?

    Borut

     
  • This line is causing the problem, which is not actually error:
    546. line of pic12f675.h

    #define GO ADCON0bits.GO

    The solution is this: The command line of sdcc should be added this: -DNO_BIT_DEFINES
    Sorry that I did not notice this sooner.

    Other, but here also related to. Here we I asked, and I do not know what would be the better solution:
    https://sourceforge.net/tracker/?func=detail&atid=431665&aid=3526885&group_id=41924
    Manually to write in the header the definition of missing bits, or some way to improve the errors in the .INC files of gputils?

     
  • Borut Ražem
    Borut Ražem
    2012-06-18

    > This line is causing the problem, which is not actually error: 546. line of pic12f675.h

    So I can close this bug as "Invalid"?

    > Other, but here also related to. Here we I asked, and I do not know what
    would be the better solution:

    See my answer at https://sourceforge.net/tracker/?func=detail&atid=431665&aid=3526885&group_id=41924

    Borut

     
  • Yes, the "-DNO_BIT_DEFINES" definition will solves the problem.

     
  • Borut Ražem
    Borut Ražem
    2012-06-18

    • assigned_to: nobody --> borutr
    • status: open --> closed-invalid
     
  • Valka
    Valka
    2014-04-16

    i have encountered the same probelem.

    "-DNO_BIT_DEFINES" solved the problem

    but it was pretty hard to google this solution :(((9