Menu

#3342 __code / __data not documented for PIC16

open
nobody
PIC16
5
2024-05-30
2010-11-02
No

The __code and __data keywords, according to the index in the manual, are documented for the HC08, MCS51, and DS390 targets. It was only by examining the source code of the standard library that I discovered these keywords are also accepted by the PIC16 target. These (rather useful for performance) keywords should be documented either (1) in a generic, non-target-specific part of the manual, or (2) in the PIC16 section as well as their current locations.

At least, they applied in SDCC2.9.0. I'm assuming something like this wouldn't have been ripped out of 3.0.0, though I haven't actually tried it yet.

Discussion

  • Philipp Klaus Krause

    Looks like a documentation bug to me. The pic16 port is currently unmaintained, though.

     
  • Philipp Klaus Krause

    Ticket moved from /p/sdcc/webdocs/55/

    Can't be converted:

    • _milestone:
     
  • Tom Li

    Tom Li - 2022-12-30

    Same documentation problem for PIC14. I wasted many hours trying to solve a memory corruption due to overflow caused by a lookup table array. Eventually I found the undocumented __data keyword was the solution, but it was only documented at the 8051 section. No sign or hint was given that it was even supported on the PIC14.

     

    Last edit: Tom Li 2022-12-30
    • Philipp Klaus Krause

      pic14 is unmaintained, too. pic14 and pic16 are currently the only unmaintained ports. They have been unmaintained for a few years.

       
    • Benedikt Freisen

      Both PIC targets are indeed unmaintained. Patches from the community, including those improving the documentation, are welcome, though.

       
  • Daniel Drotos

    Daniel Drotos - 2024-05-30
    • Category: --> PIC16
     

Log in to post a comment.