Am 24.09.2011 21:21, schrieb Dave McGuire:
> Expanded addressing support!
How? The problems will be similar to those in the mcs51 or Rabbit ports.
1) Make pointers 24 bit. This will allow to access averything using
standard C. However, pointer accesses will be slower, since CBAR wil
have to be set for every pointer access. I could be possible to
introduce additional near pointers that are still 16 bit.
2) Keep all data in the common are and only allow functions in the 20
bit address space. When calling functions marked as __banked, CBAR will
be set saved before the call. No function pointers to such functions
would be allowed. This one is easier to implement, and pointer accesses
are still fast, but it is somewhat limited.
3) N1169 with default 20 bit address space. Similar to 1), but with
optional near pointers done in a somewhat standard-conformant way.
4) N1169 with default 16 bit address space. Similar to 2), but somewhat
more standard-conformant. Functions would have a specific bank
associated, like __banked7, and there could be function pointers
pointing to them (which however could not be cast to void pointers).
I'll probably look into 2) for start, since it's the easiest to
implement, but the other options seem like a better choice in the long term.