Hello together,
I´m just doing some experimental work with the Microchip Bootloader discribed in AN1310 documentation.
https://ww1.microchip.com/downloads/en/ ... 01310a.pdf
The bootloader works very well with some of my programs. But some programs occupy the memory space that is needed for the bootloader programm.
Is there a way to modify the FC Linker setup in a way in order to reserve the memory space adress range??
For example in MPLAB X you have a possibility to reserve a ROM space like "default,-7CFC-7FFE".
Any advice is welcome.
BR
Dirk
Modify XC8 Compiler/Linker inside FC for Bootloader
-
- Posts: 96
- http://meble-kuchenne.info.pl
- Joined: Fri Dec 04, 2020 11:03 am
- Has thanked: 6 times
- Been thanked: 12 times
-
- Matrix Staff
- Posts: 1920
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 622 times
- Been thanked: 645 times
Re: Modify XC8 Compiler/Linker inside FC for Bootloader
Hi Dirk.
I believe the best way for you will be the method in this post.
That applied to v8, but should equally work for v9.
I believe the best way for you will be the method in this post.
That applied to v8, but should equally work for v9.
Martin
Re: Modify XC8 Compiler/Linker inside FC for Bootloader
Hello Martin,
many thanks for the reply. If have checked the solution from Ben.
Yes if I understood right the modification would shift my applikation programm to a higher adress making space for the bootloader at the beginning.
The good thing with AN1310 is that the bootloader sits at the end of the adress range ( in example 7CFC-7FFE"). So I need free exclusive adress space at the end.
BR
Dirk
many thanks for the reply. If have checked the solution from Ben.
Yes if I understood right the modification would shift my applikation programm to a higher adress making space for the bootloader at the beginning.
The good thing with AN1310 is that the bootloader sits at the end of the adress range ( in example 7CFC-7FFE"). So I need free exclusive adress space at the end.
BR
Dirk
Happy FC9, FC-8 and FC-6 professional user 

Re: Modify XC8 Compiler/Linker inside FC for Bootloader
Hello Matrix Team,
Hello Martin,
How about the ROM Default range 0-fff? Would this limit /secure the adress end range for the boot loader if I would put thatr for example to 0-EEE??
BR
Dirk
<build>
<compiler exe="$(compilerpic)bin\xc8.exe"
params="--chip=$(chipalt) "$(target).c" --MSGDISABLE=359,1273,1388 --CODEOFFSET=1000h --ROM=default,-0-FFF" />
<programmer exe="$(appdir)tools\mLoader\mLoader.exe" params="-stproto "$(target).hex"" />
</build>
Hello Martin,
How about the ROM Default range 0-fff? Would this limit /secure the adress end range for the boot loader if I would put thatr for example to 0-EEE??
BR
Dirk
<build>
<compiler exe="$(compilerpic)bin\xc8.exe"
params="--chip=$(chipalt) "$(target).c" --MSGDISABLE=359,1273,1388 --CODEOFFSET=1000h --ROM=default,-0-FFF" />
<programmer exe="$(appdir)tools\mLoader\mLoader.exe" params="-stproto "$(target).hex"" />
</build>
Happy FC9, FC-8 and FC-6 professional user 

-
- Matrix Staff
- Posts: 1926
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 503 times
- Been thanked: 686 times
Re: Modify XC8 Compiler/Linker inside FC for Bootloader
Hello,
Yes I beleive that would work, that and remove the --CODEOFFSET section.
Yes I beleive that would work, that and remove the --CODEOFFSET section.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel