Building firmware on openSUSE, the hard way

This is very similar to Building firmware on Gentoo, the hard way except for openSUSE Leap (42.3 currently) instead of Gentoo. And before I go further, let me clarify that I can already build firmware fine using the Arduino download from - but I want to do it with the openSUSE native Arduino packages too. So here’s what I’ve figured out so far for the latter case:

Firstly manually remove the -tools "${ARDUINO_PATH}/tools-builder" line from Arduino-Boards/libraries/Kaleidoscope/bin/kaleidoscope-builder as mentioned in Building firmware on Gentoo, the hard way. Then do:

sudo zypper ar -f
sudo zypper ar -f
sudo zypper in Arduino{,-kit} cross-avr-gcc
export ARDUINO_PATH=/usr/share/arduino
export ARDUINO_BUILDER=/usr/bin/arduino-builder
export AVR_GCC_PREFIX=/usr
cd Model01-Firmware # assuming already cloned
make flash

This results in:

BOARD_HARDWARE_PATH="/home/adam/software/hardware/Arduino/hardware" /home/adam/software/hardware/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope/bin//kaleidoscope-builder flash
Building output/Model01-Firmware/Model01-Firmware (0.0.0-gv1.22-33-gea59) ...
In file included from /tmp/tmp.LhNeGQlRza/sketch/Model01-Firmware.ino.cpp:1:0:
/usr/share/arduino/hardware/arduino/avr/cores/arduino/Arduino.h:23:20: fatal error: stdlib.h: No such file or directory
compilation terminated.
exit status 1
/home/adam/software/hardware/Arduino/hardware/keyboardio/avr/build-tools/makefiles// recipe for target 'flash' failed
make: *** [flash] Error 1

which is where I’m currently stuck. I’m sure it’s something to do with it not looking in the standard places for stdlib.h due to use of the cross-compiler. In fact I note that even though cross-avr-gcc installs to /opt/cross, /opt/cross/include is currently empty, which looks wrong.


Ah, too bad you haven’t got it working yet. I would love to build a CI setup that builds the firmware for me. This would help me a lot.

I have got it working, just not in one particular way. Just making sure you understand that, if you didn’t already see my second sentence above.