Problem compiling Reuben Quest: Lost Between Times - Please can you help ?

Hello Folks,

OK please forgive me but I am new here and this maybe a simple one to fix.
I have just setup my Arduino IDE 1.8.11 and I have installed the following libraries

Arduino SAMD
Gamebuino Classic
Gamebuino Meta
RTCZero

I have also added the Gamebuino Meta board using the link : -

https://lab.gamebuino.com/arduino/package_gamebuino_index.json

I have cloned the Reuben Quest: Lost Between Times git repo and opened reuben3.ino

Clicked compile/verify button and I get the following error : -

Arduino: 1.8.11 (Linux), Board: “Gamebuino Meta”

/home/user/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/…/lib/gcc/arm-none-eabi/7.2.1/…/…/…/…/arm-none-eabi/bin/ld: reuben3.ino.elf section .text' will not fit in region FLASH’

/home/user/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/…/lib/gcc/arm-none-eabi/7.2.1/…/…/…/…/arm-none-eabi/bin/ld: region `FLASH’ overflowed by 656 bytes

collect2: error: ld returned 1 exit status
exit status 1

Error compiling for board Gamebuino Meta.

This to me looks like it compiled OK but what it created was too big to fit in flash. There must be a way to compile this as the original developer has obviously done so.

As I am just starting out with Gamebuino, I unsure how to fix this. I figured that if I can compile this, then things are working OK fine in my dev environment. Can anyone help or advise me please ?

Thank you

You may have to tweak the compilation options, or revert to a previous version of gcc…

For the compilation options, have a look at C:\Users<User>\AppData\Local\Arduino15\packages\gamebuino\hardware\samd\1.2.1\platform.txt if you are on Windows. Check line “compiler.c.flags”.

By default, it seems that the code is already compiled for size (-Os), but you may try removing the “-g” (debug info) flag for instance (if this is actually taken into account).
You can point to another version of gcc by changing “compiler.path”.

Hope this’ll help…

Hello Alban,

Thank you for your reply, I am using Linux not Windows, but thanks to your post with the path link I was able to find the correct path on my Linux machine.

I tried removing the -g in platform.txt and I can see from verbose compiler output that the change does indeed take effect during compilation, however I am still 600 bytes over.

I thought about -O3 but that can be unstable and doesn’t really make smaller code. I did notice however that you have version 1.2.1 of samd installed where as I have version 1.2.2 installed. I might try going back to an earlier version to see if that helps.

I would like to try and avoid having multiple versions of GCC installed (if I can) but I appreciate that maybe the only way.

Thank you again for your help.

DaMikki

@DaMikki DaMikki, if you can, coul you add [Resolved] in the title of your post if it’s the case ? It’s more clear i think then you visit the messages and read the title.

Hi jicehel,

I have tried Albans helpful suggestions but I am still 480 bytes over (after reverting to earlier libraries), so sadly my problem is not resolved yet.

However thank you for the advice.

Kind Regards

Jay