4.1 Application Code Format
To reduce the size of the image uploaded in the microcontroller’s memory, image information is added in the file that will be uploaded. This information contains the start address and the size of the new application image.
The .bin
file that will be uploaded by the script in the microcontroller
has the following format:
“INFO
” + Start Address + Application Size + Reserved Bytes +
“STX0
” + Application Code + 0xFF
(until the end of
the page).
The tags “INFO
” and “STX0
” are inserted by
the script in order to inform the bootloader that after them will follow the information
section, respectively the application code.
The information section has a size of 128 bytes.
Because the bootloader is informed about the size of the application that needs to be written in the memory, the uploading process is streamlined.