Skip to main content
Ssaho.1
Associate
October 5, 2020
Question

Binary file parsing and CAN boot-loader

  • October 5, 2020
  • 2 replies
  • 3316 views

Hi, I am developing CAN Bootloader .This BOOtloader receives Application binary file information through CAN and update the Application .But i have a confusion that the binary file doesn't contain any Address data like Hex file format and SREC File format.

From my system end i need to Parse this binary File and send it through the CAN .can anyone please tell me how to parse the binary file

This topic has been closed for replies.

2 replies

Tesla DeLorean
Guru
October 5, 2020

You don't have to parse it, it is a large blob of binary data exactly representing the memory in the device. Use regular file reading methods.

The address will be whatever you'd told the linker to build it for.

In more normal update methods you'd wrap/package the output of the linker with metadata, and likely encrypt or sign it to protect against tampering, and ensure that the delivered image was complete and intact. See perhaps the .DFU format if you're not familiar with such concepts.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Ssaho.1
Ssaho.1Author
Associate
October 5, 2020

Thanks for ur Reply....while using Hex file format,i just parse the hex file and send the address and data to the boot-loader.But in this Binary format ,i did not find any Address and it is not user readable.

Ssaho.1
Ssaho.1Author
Associate
October 5, 2020

@Community member​  hi can u help me out