build truncated

Hi,

I’m creating a sketch.
Until four hours ago the result size was 22KB.
Then I went to eat and when I got back I added some more code (new functions etc), so the sketch (the sourcecode) got larger.
When I compiled it, the resulting image suddenly became 2.4KB, that is almost 10 times smaller than it was before dinner. It also does not work: it uploads but the arduino sits idle, not doing anything at all (first line of setup() is a serial.println()).
I then checked in the log-file of apt (debian package system) to verify that during my dinner no (system- or any other) updates had been done. In fact the last one was of days ago (the laptop has been rebooted since then).
So I retrieved the version of my program from just before dinner (I store everything in svn) and still the result is 2,4KB!
Slightly puzzled I de-installed arduino, arduino-core, avr-libc avrdude binutils-avr gcc-avr, I even rebooted and then re-installed the arduino package again: no change, still 2.4KB.
Versions:
arduino 2:1.0.5+dfsg2-4
arduino-core 2:1.0.5+dfsg2-4
avr-libc 1:1.8.0+Atmel3.4.4-1
avrdude 6.1-2
binutils-avr 2.24+Atmel3.4.4-1
gcc-avr 1:4.8.1+Atmel3.4.4-2

Anyone got any idea what on earth is going on here and how to resolve it?

gcopeland_recv_nrf24l01.ino (20.2 KB)

Perhaps if you post this troubling code. You can attach it to the forum message.

How to use this forum

ok, code added as attachment to original posting note that the rtclib code is this one: https://github.com/adafruit/RTClib that gcopeland library is: https://github.com/gcopeland/RF24

oh and an other thing: I checked it and other sketches suddenly also become like somewhere in the 2-3KB (previously +/- 10KB)

Sounds like you commented out most of your code.

Mark

What board do you have select in the Tools menu?

After a bit of mucking around I got your sketch to compile.

In particular I had to rename a couple of include files:

#include <nRF24L01.h>
#include <RF24.h>

And fixed the line marked fixme:

const unsigned long long me = 0x737630;  // FIXME 'LL'

Results:

Binary sketch size: 24,892 bytes (of a 32,256 byte maximum)

This is on Ubuntu using IDE 1.0.6 as downloaded from this site.

Mark: definately not the case

Nick: ok thanks! So it is not the source but more something in my system. The plot thickens.

Half an hour ago I removed all the components (avrdude, libc, etc) and installed the older versions from debian-stable: same problem.

Further more I tried it on a different pc: same problem but with the difference that the result is here 9KB! Still not the 22/24KB expected. Then I noticed that on that other pc I was building the version-from-before-dinnner so to say. After svn update I recompiled and then it became 23,332 bytes! (this is a debian-testing system)

The compilation output is by the way: http://pastebin.com/2Qejp7k0

I compared the compilation output of both systems and don't see any obvious differences.

You didn't answer my question about what board you are using.

Also please turn on verbose compiling and capture a compile (copy and paste, not screenshot).

Nick,

This was with a nano.

But I "solved" it by replacing the ide by a makefile (arduino-mk package). Works perfectly.