Hello,
attached is a minimal patch to add support for newer PIC18, with 14bits GPR/SFR addresses.
I think the difference is large enough that it needs a new architecture (especially as librairies compiled for pic16 won't run at all on this new generation of PIC18, as SFRs are above the0xfff limit).
I called it pic16ev, as preliminary work on gputils (which I also patched) did call them this way.
For this to work you'll also need a patched gputils, the patch is here:
I create this ticket so that work is not duplicated; it's not ready to be integrated as is (e.g. I didn't do any work on the I/O library as I use my own code) and anyway gputils should probably be patched first.
Also, almost all code should be shared with pic16 I guess.
The diff is against 3.7.0. Tested on a pic 18f25k42; the code does some function calls and strings/pointers manipulation (and uses UARTs and SPI with interrupts)
Ticket moved from /p/sdcc/bugs/2769/
Can't be converted:
Thanks.
However, the PIC situation is a bit difficult:
1) We'd need gputils support merged first. Unfortunately, there is not much maintenance happening on gputils.
2) The pic14 and pic16 backends in SDCC are not up to the quality standard of the other backends. They'd need developer time to become stable. I don't fell like adding another PIC backend that is likely to end up like the other ones.
So in summary, someone needs to maintain gputils and we'd need some SDCC developer that is actively working on PIC. I'd also like to see some existing PIC issues resolved first, in particular RFE [feature-requests:#403], maybe also RFE [feature-requests:#543], RFE [feature-requests:#473], RFE [feature-requests:#463] and some of the open bugs (PIC-specific bugs account for more than half of the currently open bugs).
Philipp
Related
Feature Requests: #403
Feature Requests: #463
Feature Requests:
#473Feature Requests: #543
Last edit: Maarten Brock 2018-10-14
I don't see the relevance of RFE [feature-requests:#473].
Related
Feature Requests:
#473I guess that was meant to say RFE [feature-requests:#472].
Philipp
Related
Feature Requests: #472