Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
question about page sizes for 18F26K22 and 18F27J13 [solved]
#1
Hey folks:

I have a question about how much rom to allocate for the loader for a couple of different chips.

For a 64KB 18F26K22 I am using, the docs say "7 pages at the end of memory, which may vary based on firmware version." Well, I'm not sure what the page size is and can't seem to get a straight answer. For some reason I had allocated 768 bytes, but now I can't find a reference for that number:
#org 0xFD00, 0xFFFF {} // allocate top 768-bytes out of 64K-bytes

I am also using a 128KB 18F27J13 and the docs say "the loader is in the 2nd-to-last page" (config stuff is up in the top page), so I should org 2 pages. But again I don't know how big that is in bytes.

When I used tinybootloader on an 18F2620 I just saved 256 bytes.

I see in the datasheets a reference to "64-byte blocks" -- is that a page? When I search for page, I end up in the footer of every, er "page" on the datasheet, and there are hundreds of those Smile.

I'm not expecting to hit the ceiling but would like to define it properly. Can anyone give me an answer (in bytes) for my ORG defs? Thx.

an addendum to my previous post:

I looking at the hex files for the two chips' loaders, I see:

18F26K22 has intel-hex data starting at 0xFDC0 (:10FDC0000F01000E3A...), which is probably why I ORGed starting at 0xFD00.

18F27J13 has intel-hex data starting at 0xF800 (:10F80000700ED3124...)
I am further confused on this part as it has 128Kbytes of flash, and am unsure how the 64K-based address records in intel-hex get mapped higher. I seem to recall that they do but I have not dug into intel-hex format in years. I hope the loader is actually getting placed at 0x1F800 and not 0x0F800. Still not sure what to ORG for this part.

thanks for any insight.

OK, I think I answered my own question about the intel-hex files:

For the 18F26K22, I see a line that seems to define the "extended" start address of 0x0000 (:020000040000FA) before all records.

For the 18F27J1, I see a line that seems to define the "extended" start address of 0x0001 (:020000040001F9). This is before the loader data records, and after the stuff that is at zero for vectoring. So it must indeed be located starting at 0x1F800.

But I am still wondering how many bytes in a page...
Reply


Messages In This Thread
question about page sizes for 18F26K22 and 18F27J13 [solved] - by teletype-guy - 2012-11-06, 06:59:44

Forum Jump:


Users browsing this thread: 1 Guest(s)