Hi Kyle,
Kyle wrote: > For reasons known only to MicroChip, the 12 & 14 bit cores count the code area > in words, whereas the 16 bit cores count it in bytes (though every instruction > is two bytes, or one word). > > Prior to jal 2.4l-beta, this was no being handled correctly. The code > generation was correct, but the assembly output did not match mpasm. This > ended up causing not only confusion but a problem when generating `asm goto n' > -- the result ended up being `goto 2n'. > > This has been fixed, but the generated device files for the 16 bit cores may > not be correct. I've not checked. From section 5.1 of > ``PIC18F2420/2520/4420/4520 Data Sheet'', we see: > > ``The PIC18F2420 and PIC18F4420 each have > 16 Kbytes of Flash memory and can store up to 8,192 > single-word instructions. The PIC18F2520 and > PIC18F4520 each have 32 Kbytes of Flash memory > and can store up to 16,384 single-word instructions.'' > > The means, for these chips we need: > > pragma code 16384 > > and > > pragma code 32768 > > (the total number of bytes available, *not* the total number of words). > > Hopefully this is clear. Clear, but in contradiction with your evenly clear statement in a (personal) message I received from you on the 28th of January: > pragma code *always* uses words. > > --kyle So I changed the Jallib device files to specify the amount of memory for the 18Fs in number of words. I assume you are sure (again!) and I'll change the pragma code in the Jallib device files for the 18F back to what these were initially: specifying number of bytes. Issue #57 is re-opened. BTW: 1 The chip definition files for the 18F which you deliver with the compiler still use number of words (I checked 2420 and 2520). BTW 2: The file JalPragm.txt does not mention the units, please update! Regards, Rob. -- Rob Hamerling, Vianen, NL (http://www.robh.nl/) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jallib" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jallib?hl=en -~----------~----~----~----~------~----~------~--~---
