Tiny Multi Bootloader+

PIC18J family firmwares:



Principle

###todo

Description of the data tranfert

Note: there is no EEPROM on these chips.

Represents the character of one byte [] below.

① Flash transfer format:
[AddressU][AddressH][AddressL][2*N][DataL(1)][DataH(1)]....[DataL(N)][DataH(N)][SUM]

[AddressU] Start address of the flash page to override the data. (upper)
[AddressH] Start address of the flash page to override the data. (middle)
[AddressL] Start address of the flash page to override the data. (lower)
[2*N] Number of transfers of data as described in piccode.ini. (byte notation)
[DataL/H(n)] Rewrite data (2*N)bytes.
[SUM] Checksum.

② Config transfer format:
[CFGAddressU][CFGAddressH][CFGAddressL][8][CFGDataL(1)][CFGDataH(1)].....[CFGDataL(4)][CFGDataH(4)][SUM]

[CFGAddressU] Start address of the Config data to overwrite the data | 0x80. (upper)
[CFGAddressH] Start address of the Config data to overwrite the data. (middle)
[CFGAddressL] Start address of the Config data to overwrite the data. (lower)
CFGAddressU:CFGAddressH:CFGAddressL >= 0x800000
[8] Number of data transfers. (Always 8)
[CFGData(n)] Rewrite data (2*4)bytes.
[SUM] Checksum.

Modify existing fimwares for a new device

###todo

Before you compile your new bootloader verify that your compiler will generate absolute code (and not relocatable code)!
To do so, in MPLAB IDE go to "Project" > "Build Options..." > "Project"
Your "MPASM/C17/C18" tab must look like the following: