gillham / logic_analyzer

Implementation of a SUMP compatible logic analyzer for the Arduino
Other
463 stars 99 forks source link

Not enough memory on ATmega168 #25

Closed cubic3d closed 8 years ago

cubic3d commented 9 years ago

I just tried to flash the sketch on my old Arduino NG with ATmega168 MCU. Compiling gives:

Sketch uses 10,776 bytes (75%) of program storage space. Maximum is 14,336 bytes.
Global variables use 1,176 bytes (114%) of dynamic memory, leaving -152 bytes for local variables. Maximum is 1,024 bytes.
processing.app.debug.RunnerException: Not enough memory; see http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing your footprint.
    at processing.app.debug.Compiler.size(Compiler.java:338)
    at processing.app.debug.Compiler.build(Compiler.java:117)
    at processing.app.Sketch.build(Sketch.java:1162)
    at processing.app.Sketch.exportApplet(Sketch.java:1180)
    at processing.app.Sketch.exportApplet(Sketch.java:1166)
    at processing.app.Editor$DefaultExportHandler.run(Editor.java:2487)
    at java.lang.Thread.run(Thread.java:745)
Not enough memory; see http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing your footprint.

Any solution for this?

gillham commented 8 years ago

Sorry for not noticing this issue was open for so long. I haven't been tracking the latest Arduino v1.6.x IDE until recently and it uses more memory. I rearranged the DEBUG sections and added DEBUG_MENU around some of the diagnostic menus items in commit 5fb67c666df048cb8537913dcdaadc52218dd398 and tagged it as branch agla_v0_14 as well. The 'master' branch has the change and if you can test that out I would appreciate it. It shows 282 bytes of RAM free when I compile it with 1.6.6 for the ATmega168 and 814 bytes free for the ATmega328 or ATmega2560.