Hello,
I want to validate the format of the bin file before upload it. For exemple, with hex files I can check that all data is in hex format. But for bin files i can't find a way.
Bin files have any header or format that i can parse to validate it?
.bin (binary) files are just the data, without any other information. See https://mcuoneclipse.com/2012/09/27/s-record-intel-hex-and-binary-files/ for a more detailed view.
What I do is to generate a separate header with hash/CRC, see https://mcuoneclipse.com/2015/04/26/crc-checksum-generation-with-srecord-tools-for-gnu-and-eclipse/
I hope this helps,
Erich