Compiling firmware with Arduino IDE, .hex filesize does not match
for example, release version 143
compiled with Arduino 1.8.5
exported binary using Arduino ide, locate this and check the size
648997 bytes
compared to .hex from Prusa
prusa3d_fw_3_1_1_rc4_b143.hex == 681749 bytes
The file sizes do not match, not even very close
because of this I wonder what is different, have I lost some compiler switches or options? Is Prusa inserting something else into the .hex such as configuration tables or the bootloader?
I don't have any trouble with Arduino compiling the firmware and have used git checkout to test a few different versions
thanks in advance for any thoughts,
I don't have any plans for the firmware other than for my own learning and curiosity.
Mark
PS
I am on Linux
I added the board to arduino IDE using
https://raw.githubusercontent.com/ultimachine/ArduinoAddons/master/package_ultimachine_index.json
and selecting RAMBo board
I deleted the Liquid Crystal library from my Arduino installation folders /arduino-1.8.5/libraries/
I copied the two required libraries into my [my sketchbook location]/libraries
Re: Compiling firmware with Arduino IDE, .hex filesize does not match
I noticed the exact same thing, and wondered same, but have not seen any adverse affects as of yet. It is a mystery to me. Windows here IDE version 1.6.8,
Re: Compiling firmware with Arduino IDE, .hex filesize does not match
From my experience with .hex files, they are text files.
So I surmise that the difference in byte count of the two files comes from the line-end coding: CRLF for windows files vs LF for linux files.
Someone with both files may verify this by doing a line count on the files (wc -l) and see if the diff in bytes correlates with it.
I'm going from memory, so YMMV.
Eagerly awaiting my 1st 3d printer, the MK3! Cheers
Re: Compiling firmware with Arduino IDE, .hex filesize does not match
From my experience with .hex files, they are text files.
So I surmise that the difference in byte count of the two files comes from the line-end coding: CRLF for windows files vs LF for linux files.
Someone with both files may verify this by doing a line count on the files (wc -l) and see if the diff in bytes correlates with it.
I'm going from memory, so YMMV.
Eagerly awaiting my 1st 3d printer, the MK3! Cheers
Good thought but I opened the file and noticed a different number of lines. They are hex files and are sort of human-readable if you review the documentation for .hex files.
Re: Compiling firmware with Arduino IDE, .hex filesize does not match
Just a minor version change in Arduino can produce different hex file sizes- the compiler may optimise a bit differently, certain library sources may be a bit different, etc. Unless you are using the exact same version of Arduino, you won't get the same byte sizes.
Re: Compiling firmware with Arduino IDE, .hex filesize does not match
yes its a fair point but that's precisely what I am trying to find out - what is different?
I've downloaded the exact (I assume) Prusa source code specific to the commit matching the release number
I've pulled standard Arduino and then replaced the two libraries provided by Prusa, and I've deleted the stock Liquid Crystal library as described in the github readme.
next thing - I should probably try the Windows version of Arduino.