Hi,
I'm programming for Mega2560 and using un external AVRDUDE to program the chip.
So I do need to create the hex with bootloader files.
Everyting went well when I used some small sketches.
"Export compiled Binary" created the both: the simple and with_bootloader hex files.
Now, when I tried to do the same with some bigger project: the export do create the simple hex file - but not the other with_bootloader.
Even more: sometimes it creates some "fake" file - much smaller than the original. Probably using some other sketches' code.
I can add, that I can upload the big sketch to the mega2560 without problem directly.
The sketch can easily fit to it (25% of the flash).
Now, when I diminuished the code cancelling some parts - it went well and I could compile this smaller code to with_bootloader hex file.
The original code (that has the problem) has some 3000 lines of code
The simple compiled hex file has 183kB of length.
The diminuished code (that went well) has 2500 lines of code
Its simple hex file is 156,5 kB long
and the with_bootloader file: 173,5 kb
Where is the problem ?
Am I doing something wrong ?
Is there any limit that I ignore ?
Is this some bug ?
I've never heard of that problem but that does not mean that it's not known or exists. Can you post your BIG code (the 3000 line one, not the 2500 line one)? So we can try.
Which operating system are you using? Which version of the IDE are you using.
Out of curiosity, is it an issue not to have a binary with a bootloader?
How do you think you might help ?
Can you try to do the binaries with my sketch to see what happen ?
If yes, let you try. Just download the code on doume.info/n10.ino and try to Export compiled Binary. If you see that the with_bootloader file is bigger than the other so there should be a problem on my side. If it's much smaller, there is an issue...
when I try it now, the ino file has 77569B, the simple hex 183319b and with bootloader... 20528.
A have window 7 pro 64 system end 1.8.13 IDE
As of curiosity..
the problem is that I have to send the binary to a person (8500km away) who completly ignores the programming, just helping to repare the system. The simple programming with bootloader is easy
I've used two portable installs (1.8.13 and 1.8.19). 1.8.13 did not generate a version "with bootloader", possibly a config, not sure. The results
Note:
the code has a serious number of flaws that are picked up by the compiler
C:\Users\sterretje\Downloads\arduino\arduino-1.8.19-windows\arduino-1.8.19-AVRonly\portable\sketchbook\1014889\1014889.ino:959:36: warning: multi-character character constant [-Wmultichar]
if (flaga == 5 and keypressed == '**') //WCHODZI W EDYCJE CFA
^~~~
C:\Users\sterretje\Downloads\arduino\arduino-1.8.19-windows\arduino-1.8.19-AVRonly\portable\sketchbook\1014889\1014889.ino:202:15: warning: invalid conversion from 'const char*' to 'char' [-fpermissive]
char myChar = "";
^~
C:\Users\sterretje\Downloads\arduino\arduino-1.8.19-windows\arduino-1.8.19-AVRonly\portable\sketchbook\1014889\1014889.ino: In function 'void setup()':
C:\Users\sterretje\Downloads\arduino\arduino-1.8.19-windows\arduino-1.8.19-AVRonly\portable\sketchbook\1014889\1014889.ino:290:12: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
if (prix < 0)
~~~~~^~~
C:\Users\sterretje\Downloads\arduino\arduino-1.8.19-windows\arduino-1.8.19-AVRonly\portable\sketchbook\1014889\1014889.ino:407:8: warning: unused variable 'a' [-Wunused-variable]
byte a = 0;
^
C:\Users\sterretje\Downloads\arduino\arduino-1.8.19-windows\arduino-1.8.19-AVRonly\portable\sketchbook\1014889\1014889.ino: In function 'void loop()':
C:\Users\sterretje\Downloads\arduino\arduino-1.8.19-windows\arduino-1.8.19-AVRonly\portable\sketchbook\1014889\1014889.ino:566:20: warning: invalid conversion from 'const char*' to 'char' [-fpermissive]
keypressed = "";
^~
C:\Users\sterretje\Downloads\arduino\arduino-1.8.19-windows\arduino-1.8.19-AVRonly\portable\sketchbook\1014889\1014889.ino:658:22: warning: converting to non-pointer type 'char' from NULL [-Wconversion-null]
keypressed = NULL;
^~~~
C:\Users\sterretje\Downloads\arduino\arduino-1.8.19-windows\arduino-1.8.19-AVRonly\portable\sketchbook\1014889\1014889.ino:666:22: warning: converting to non-pointer type 'char' from NULL [-Wconversion-null]
keypressed = NULL;
^~~~
C:\Users\sterretje\Downloads\arduino\arduino-1.8.19-windows\arduino-1.8.19-AVRonly\portable\sketchbook\1014889\1014889.ino:678:24: warning: invalid conversion from 'const char*' to 'char' [-fpermissive]
keypressed = "";
^~
C:\Users\sterretje\Downloads\arduino\arduino-1.8.19-windows\arduino-1.8.19-AVRonly\portable\sketchbook\1014889\1014889.ino:684:24: warning: invalid conversion from 'const char*' to 'char' [-fpermissive]
keypressed = "";
^~
C:\Users\sterretje\Downloads\arduino\arduino-1.8.19-windows\arduino-1.8.19-AVRonly\portable\sketchbook\1014889\1014889.ino:694:24: warning: invalid conversion from 'const char*' to 'char' [-fpermissive]
keypressed = "";
^~
C:\Users\sterretje\Downloads\arduino\arduino-1.8.19-windows\arduino-1.8.19-AVRonly\portable\sketchbook\1014889\1014889.ino:959:33: warning: comparison is always false due to limited range of data type [-Wtype-limits]
if (flaga == 5 and keypressed == '**') //WCHODZI W EDYCJE CFA
~~~~~~~~~~~^~~~~~~
C:\Users\sterretje\Downloads\arduino\arduino-1.8.19-windows\arduino-1.8.19-AVRonly\portable\sketchbook\1014889\1014889.ino:981:18: warning: invalid conversion from 'const char*' to 'char' [-fpermissive]
keypressed = "";
^~
C:\Users\sterretje\Downloads\arduino\arduino-1.8.19-windows\arduino-1.8.19-AVRonly\portable\sketchbook\1014889\1014889.ino:1008:20: warning: invalid conversion from 'const char*' to 'char' [-fpermissive]
keypressed = "";
^~
C:\Users\sterretje\Downloads\arduino\arduino-1.8.19-windows\arduino-1.8.19-AVRonly\portable\sketchbook\1014889\1014889.ino:1025:20: warning: invalid conversion from 'const char*' to 'char' [-fpermissive]
keypressed = "";
^~
C:\Users\sterretje\Downloads\arduino\arduino-1.8.19-windows\arduino-1.8.19-AVRonly\portable\sketchbook\1014889\1014889.ino:1039:18: warning: invalid conversion from 'const char*' to 'char' [-fpermissive]
keypressed = "";
^~
C:\Users\sterretje\Downloads\arduino\arduino-1.8.19-windows\arduino-1.8.19-AVRonly\portable\sketchbook\1014889\1014889.ino:1046:18: warning: invalid conversion from 'const char*' to 'char' [-fpermissive]
keypressed = "";
^~
C:\Users\sterretje\Downloads\arduino\arduino-1.8.19-windows\arduino-1.8.19-AVRonly\portable\sketchbook\1014889\1014889.ino:1451:18: warning: unused variable 'keypressed' [-Wunused-variable]
char keypressed = myKeypad.getKey();
^~~~~~~~~~
C:\Users\sterretje\Downloads\arduino\arduino-1.8.19-windows\arduino-1.8.19-AVRonly\portable\sketchbook\1014889\1014889.ino:1497:18: warning: unused variable 'keypressed' [-Wunused-variable]
char keypressed = myKeypad.getKey();
^~~~~~~~~~
C:\Users\sterretje\Downloads\arduino\arduino-1.8.19-windows\arduino-1.8.19-AVRonly\portable\sketchbook\1014889\1014889.ino:1687:18: warning: unused variable 'keypressed' [-Wunused-variable]
char keypressed = myKeypad.getKey();
^~~~~~~~~~
C:\Users\sterretje\Downloads\arduino\arduino-1.8.19-windows\arduino-1.8.19-AVRonly\portable\sketchbook\1014889\1014889.ino:1689:27: warning: comparison with string literal results in unspecified behavior [-Waddress]
if (keypressed == "#")
^~~
C:\Users\sterretje\Downloads\arduino\arduino-1.8.19-windows\arduino-1.8.19-AVRonly\portable\sketchbook\1014889\1014889.ino:1689:27: warning: ISO C++ forbids comparison between pointer and integer [-fpermissive]
C:\Users\sterretje\Downloads\arduino\arduino-1.8.19-windows\arduino-1.8.19-AVRonly\portable\sketchbook\1014889\1014889.ino:2059:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < txt.length(); i++)
~~^~~~~~~~~~~~~~
C:\Users\sterretje\Downloads\arduino\arduino-1.8.19-windows\arduino-1.8.19-AVRonly\portable\sketchbook\1014889\1014889.ino:2352:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < txt.substring(3).length(); i++)
~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\sterretje\Downloads\arduino\arduino-1.8.19-windows\arduino-1.8.19-AVRonly\portable\sketchbook\1014889\1014889.ino:2418:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0 ; i < txt.length(); i++)
~~^~~~~~~~~~~~~~
C:\Users\sterretje\Downloads\arduino\arduino-1.8.19-windows\arduino-1.8.19-AVRonly\portable\sketchbook\1014889\1014889.ino: In function 'String rs485(int)':
C:\Users\sterretje\Downloads\arduino\arduino-1.8.19-windows\arduino-1.8.19-AVRonly\portable\sketchbook\1014889\1014889.ino:2713:19: warning: converting to non-pointer type 'unsigned char' from NULL [-Wconversion-null]
buffer[i] = NULL;
^~~~
C:\Users\sterretje\Downloads\arduino\arduino-1.8.19-windows\arduino-1.8.19-AVRonly\portable\sketchbook\1014889\1014889.ino:2695:18: warning: unused parameter 'flaga' [-Wunused-parameter]
String rs485(int flaga)
^~~~~
C:\Users\sterretje\Downloads\arduino\arduino-1.8.19-windows\arduino-1.8.19-AVRonly\portable\sketchbook\1014889\1014889.ino: In function 'String czytrfid()':
C:\Users\sterretje\Downloads\arduino\arduino-1.8.19-windows\arduino-1.8.19-AVRonly\portable\sketchbook\1014889\1014889.ino:2746:14: warning: invalid conversion from 'const char*' to 'char' [-fpermissive]
myChar = "";
^~
C:\Users\sterretje\Downloads\arduino\arduino-1.8.19-windows\arduino-1.8.19-AVRonly\portable\sketchbook\1014889\1014889.ino: In function 'String rfid(int, int)':
C:\Users\sterretje\Downloads\arduino\arduino-1.8.19-windows\arduino-1.8.19-AVRonly\portable\sketchbook\1014889\1014889.ino:2861:14: warning: invalid conversion from 'const char*' to 'char' [-fpermissive]
myChar = "";
^~
C:\Users\sterretje\Downloads\arduino\arduino-1.8.19-windows\arduino-1.8.19-AVRonly\portable\sketchbook\1014889\1014889.ino: In function 'void clearBufferArray()':
C:\Users\sterretje\Downloads\arduino\arduino-1.8.19-windows\arduino-1.8.19-AVRonly\portable\sketchbook\1014889\1014889.ino:2883:17: warning: converting to non-pointer type 'unsigned char' from NULL [-Wconversion-null]
buffer[i] = NULL;
^~~~
C:\Users\sterretje\Downloads\arduino\arduino-1.8.19-windows\arduino-1.8.19-AVRonly\portable\sketchbook\1014889\1014889.ino: In function 'String czytrfid()':
C:\Users\sterretje\Downloads\arduino\arduino-1.8.19-windows\arduino-1.8.19-AVRonly\portable\sketchbook\1014889\1014889.ino:2752:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^