Trying to compile experimental model01 using cli, got Sketch too big

Hi,

I am trying to follow the instructions from GitHub - keyboardio/Kaleidoscope: Firmware for the Keyboardio Model 01 and other keyboards with AVR or ARM MCUs.

When it comes to compiling a firmware, I am trying to compile the experimental one for the Model01 from Chrysalis-Firmware-Bundle/Keyboardio/Model01/experimental/Model01 at master · keyboardio/Chrysalis-Firmware-Bundle · GitHub but got the following error:

Sketch uses 29956 bytes (104%) of program storage space. Maximum is 28672 bytes.
Global variables use 1480 bytes (57%) of dynamic memory, leaving 1080 bytes for local variables. Maximum is 2560 bytes.
Sketch too big; see https://support.arduino.cc/hc/en-us/articles/360013825179 for tips on reducing it.

Error during build: text section exceeds available space in board
make: *** [compile] Error 1

Any idea why this is happening ?
Thanks in advance.

There’s limited space on the MCU for program memory, and the sketch there is too big. I will look into this when I get a chance; probably we need to trim some unnecessary plugins from it.

Well, jut what the error message says :thinking: :

Once compiled, the firmware is too big to be copied on the keyboard.
Each plugin and option added in the code produce bytes and the final binary grows to the limit…

To resolve this problem, try to remove non necessary things to gain 1284 bytes. Removing unused LED plugins is a quick way,

Let us know if it’s solve the problem !

Happy hacking :hammer_and_wrench:

Hi Merlin,

Thanks for the reply, I assumed something else was at play given Chrysalis is able to flash the experimental firmware for the model01 but I guess it does not use the master branch and currently that branch simply got too big for the model01.

Out of curiosity, could we not have github actions compile the sketch for keyboard.io keyboards to make sure it actually compiles and fit the rom for each ?

Hi Romain,

Yes i get that :slight_smile: I just assumed that there was something else at play given it was the un-edited sketch and I assumed wrongly that it has been tested. Thanks for the pointer on looking into the LED plugins to solve this.

On a side note, Chrysalis refers to the 0.8.4 version of it but there is no such version / tag in git, is there a way to fetch that particular version ?

1 Like