Quick question - does the compiled size shown in the IDE include the reset and interrupt vectors?
I'm writing a bootloader for the 14K22 which has options of 1K and 2K boot block sizes. The code is compiling to 1003 bytes, if this includes the vectors then it fits in the smaller bootblock, if it doesn't then my calculations suggest I need to get the size to under 992 bytes - is that right? (Or change to the 2k block size)
Compiled size
Moderators: David Barker, Jerry Messina
-
- Swordfish Developer
- Posts: 1473
- Joined: Fri Jan 30, 2009 6:27 pm
- Location: US
Re: Compiled size
I haven't looked at this for a while, but from what I remember the "program bytes used" display in the IDE is purely a count of the number of bytes and doesn't take into account the locations. It even includes a count of the CONFIG bytes, which shouldn't really go against the max number of bytes in the program space for most chips (except for the J series).
When I'm doing a bootloader I usually just look at the hex file to make sure things are as I expected and there are no surprises.
I toss a "#variable _maxrom = BOOT_BLOCK_SIZE" into the source and if it starts complaining I know I need to take a look.
When I'm doing a bootloader I usually just look at the hex file to make sure things are as I expected and there are no surprises.
I toss a "#variable _maxrom = BOOT_BLOCK_SIZE" into the source and if it starts complaining I know I need to take a look.
-
- Swordfish Developer
- Posts: 1473
- Joined: Fri Jan 30, 2009 6:27 pm
- Location: US
Re: Compiled size
Here's a handy hex file display utility I found years ago. It shows the different regions of the hex file and their contents.
I think the website I got it from is now defunct, so I imagine it's ok to post.
I think the website I got it from is now defunct, so I imagine it's ok to post.
- Attachments
-
- HexLister.zip
- (266.75 KiB) Downloaded 186 times
-
- Posts: 219
- Joined: Wed Sep 11, 2013 1:27 pm
- Location: Chesterfield
Re: Compiled size
Good call, Jerry, I didn't think of that approach. The highest location in the hex file is 03E0 so it appears it's within the 1k boundary - just!