Loading...
Pages: [1]   Go Down
Author Topic: Sketch doesn't upload with specific array data (test case included)  (Read 158 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have run into a problem uploading a sketch to my Arduino Mega 2560.

Reduced test case and verbose output from uploader: https://gist.github.com/3026059

When I hit upload, it builds and starts uploading, but then hangs during the upload. TX/RX lights halt, my program does not start (although it does run, incorrectly, the next time I power on the device).

In the code, I have a large PROGMEM array (wavelet) which contains some sample data. When this is replaced with a different set of sample data of the same length, it uploads fine and behaves properly. The other set of sample data is included in the source that I posted above; just move the comments and build.

I get the same behavior when not using PROGMEM array, ie. uint8_t const wavelet[] = { ... };

Windows 7 64-bit, Arduino 1.0.1 software, Arduino Mega 2560 board, nothing attached except USB to dev machine.

Any suggestions for fixes or workarounds?
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 98
Posts: 6386
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You've hit the "!!!" bug but in your case it's the '0x21 0x21 0x21' bug.  Three bytes of '!' in a row triggers the firmware monitor and prompts for commands.

If you can change one of those three consecutive 0x21 bytes to something else you code should upload.
Logged

Pages: [1]   Go Up
Print
 
Jump to: