Hex Boot Loader

This is a serial Intel Hex format bootloader for ATMEGA4809, though it is pretty simple to port to other hardware. It occupies less than 512 bytes (I do not think it is possible to fit it under 256).

To use, burn into the processor. Compile your application and link it to start @0x200 by setting .text = 0x100 (its in words). Set the linker to creat a hex file.

Using a terminal emulator such as teraterm set to 115200 baud, no parity, 8 bit, 1 stop, XON/XOFF flow control, send the hex file.

This loader supports extended addressing (record type 2) so it will accpet files up to 1MB for things like SAMD21, SAMD51, etc.. Note further that you will have to change the WriteFlash() function as well as the write to memory method in general for different processors.

link to project https://gitlab.com/bjpiccioni/hex-boot-loader

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s