Expanded Memory Problem

Hello all,

I expanded the memory on one of my Yuns with a 32GB sdcard and when I ssh into the Yun and df -h, I see

Filesystem Size Used Available Use% Mounted on
rootfs 28.3G 2.1G 24.8G 8% /
/dev/root 7.5M 7.5M 0 100% /rom
tmpfs 29.8M 136.0K 29.7M 0% /tmp
tmpfs 512.0K 0 512.0K 0% /dev
/dev/sda2 28.3G 2.1G 24.8G 8% /overlay
overlayfs:/overlay 28.3G 2.1G 24.8G 8% /
/dev/sda1 698.6M 12.0K 698.6M 0% /mnt/sda1

Now when I try to upload a 30,056 byte sketch I get the "Sketch too big" message.

Anybody know why I can not upload a relatively small sketch?

Thanks in advance,
Murrah Boswell

otrcomm:
Anybody know why I can not upload a relatively small sketch?

Yes.

It's because that's not a relatively small sketch, it's a very large sketch.

The ATMega32U4 processor which runs the sketch has a total of 32k of program memory space, some of which is used up by the bootloader. The maximum size that a sketch can be is only 28k. And you only have 2.5k of RAM for data storage.

Plain and simple: your sketch is too big.

It's nice that you have a 32 GB card, but by running the YunDiskExpander sketch, what you have done is expand the DISK space available for the Linux system disk. This is not the same thing as program memory space in the '32U4 processor that runs the sketches, it is only the disk storage space for the AR9331 processor that runs Linux. It's a different type of memory, and on a different processor.

I'm sorry to say that there is nothing that can be done to expand the program memory available for sketches. 28k is it. Your only option is to make the sketch smaller, perhaps by off-loading some of the processing to the Linux side of the board. The only other option is to move to a board that has a larger ATMega processor, like the Arduino Mega 2650 or an ARM core processor like the Arduino Due - but then you will be giving up the networking, SD card, and Linux processor that makes the Yun so appealing.

@ShapeShifter -

Thank you for responding!

"I'm sorry to say that there is nothing that can be done to expand the program memory available for sketches. 28k is it."

Oh well, so much for those plans!

Now I have another question that I will ask in a new thread!

Thanks again,
Murrah Boswell