Is there a way to make the bootloader code occupy a specific section in program memory?
I noticed that some of the code is written in the top section of memory but the other part is written starting at section $11000. In my case it conflicts with my application code. So how do I force the bootloader code to occupy program memory starting from $00000 to $10000? I am assuming it can be done by changing some settings under Mplab XC8 compiler.
PIC: PIC18F87J11
Compiler: MPLAB XC8
Update:
Found the fix
Project properties > XC8 global options category > Memory Model > ROM ranges
ROM RANGE: 0-10000
Update:
I am seeing another issue though.
So I set the ROM range from $00000-$10000, but that's not enough space for the bootloader code even though it should. However when I look at the program memory under MPLAB XC8 after building the project, I noticed that there are some addressees left empty.
How do I force those addressees to be used? If those sections were used then the specified ROM size from 0-10000 should be enough for my bootloader code.
For example those addresses are used (data written there)
00000-0925C
But then these address are not used, just left blank
0925E- 0F77A (huge section, what a waste)
Then these addresses are used
0F77C-0FFFE
But then my program gets cut off at $10000 even though there seems to be more code to be written to memory.
So
How do I force those unused addressee to be used? Its just a huge waste of memory to skip them and I don't understand why they are empty. I can not give the Bootloader anymore ROM space, the rest must be given to the Application Code.
I hope everything is clear, thanks!