Quick question. I'm compiling my sketch for both ATmega644p (sanguino bootloader) and ATMega1284p (Mighty bootloader). Code is identical and works on both processors. Is resulting .hex (generated by Arduino IDE) file compatible with both or I need to compile separately for each processor?
Small clarification, purpose is to use HEX file to update chips without Arduino IDE.
Chances are it's different - the two chips are different chips, and things like memory addresses, offsets, etc may well be different.
Test it: compile for both, and examine the two HEX files - see if they are different. If you're on anything except Windows the "diff" command could be useful for this - not sure how you'd do it on an inferior operating system though.
Those chips are not the same.
The larger memory of the 1284 requires other addressing. Even if the sketch is small, the interrupt vector (or return address of interrupt, I'm not sure) is different. The extra registers of the 1284 are not often used.
In the Arduino IDE, every chip is considered to be different. The avr gcc compiler produces code for just that specific chip.
You have to add your board and avr chip to the file boards.txt
Some chips are different, some are the same. For example the ATmega328p (picoPower) has a different signature than the ATmega328. They are different. But the ATmega8L (3.3V) is the same as the ATmega8 (5V).
Thanks. Yeah files are different. I can't believe I didn't think of doing file compare
"fc" command in superior OS
purpose is to use HEX file to update chips without Arduino IDE.
Ah, you Do Not need a stinking IDE...
http://forum.arduino.cc/index.php?PHPSESSID=agfgmdm6c1r7tbq8l8a9im2eo6&topic=182849.0