cancel
Showing results for 
Search instead for 
Did you mean: 

Binary file parsing and CAN boot-loader

Ssaho.1
Associate II

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

4 REPLIES 4

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 Venmo
Up vote any posts that you find helpful, it shows what's working..

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.

if u give any example code then it's helpful for me

Ssaho.1
Associate II

@Community member​  hi can u help me out