hermarcel wrote on Wednesday, July 13, 2005:
For a moment, you got me doubting myself here
I believe the word "extended" is misinterpreted here:
A device with more than 64kB flash is not a extended device in Microchip jargon. It’s just a device with more than 64 kB flash . Because pointers need to extend beyond the default 16bits, the compiler needs to know this. I have briefly looked at port.c for MPLAB and it seems to be ok for these larger pointers. You should set the large memory model to use this additional flash (as you already did).
The word “extended” applies to the instruction set. By setting the “extended instruction set” fuse (XINST), a few new instructions become available. More important is that a new addressing mode is enabled, too. Because of this new addressing mode, a lot of standard instructions function in a different way, so the compiler should know this (extended mode flag). The current FreeRTOS MPLAB port will definitely not run with this changed behaviour. The best way (I think) to look at this changed behaviour is to think of the pic in extended mode as an entirely new processor. When you look at the runtime routines that are delivered with the compiler in source, you’ll find two sets of them: one for the normal pic18 and one for the extended pic18. To adapt FreeRTOS to the extended mode pic18, a new port is needed.
- Set "large memory model" to use the flash above 64kB.
- Do NOT set extended mode and do NOT set the XINST fuse. The current port does not support the changed instruction set behaviour.
ps. I did not write the MPLAB port. I did, however, write the wizC/PIC18 port.