Problems getting started reflashing model 01 on Arch Linux

OK, so here’s a summary of how I was able to successfully get things working on Arch Linux:

pacaur -S arduino arduino-builder arduino-avr-core arduino-ctags avrdude
sudo usermod -a -G uucp $USER
# re-login
sudo ln -s /usr/share/arduino /usr/local/arduino
cd /usr/share/arduino/hardware
sudo ln -s archlinux-arduino arduino
sudo ln -s archlinux-arduino tools
sudo mkdir -p /usr/share/arduino/tools/avr/bin
sudo ln -s /usr/bin/avrdude /usr/share/arduino/tools/avr/bin/
sudo mkdir -p /usr/share/arduino/tools/avr/etc
sudo ln -s /usr/share/arduino/hardware/archlinux-arduino/avr/bootloaders/gemma/avrdude.conf /usr/share/arduino/tools/avr/etc/

I made a custom make.sh just to make life a bit easier in the Model01-Firmware that just packages the recommendations made together (I use fish so that just makes life easier)

#!/bin/bash

make ARDUINO_BUILDER_PATH="/usr/bin/arduino-builder" \
     ARDUINO_PATH="/usr/share/arduino" \
     ARDUINO_LOCAL_LIB_PATH="../arduino-local" \
     AVR_GCC_PREFIX="/usr" \
     ARDUINO_TOOLS_PATH="/usr/share/arduino/tools" \
     AVR_SIZE_PATH="avr-size" \
flash

Here’s my results (hitting PROG-ENTER)

lhl@ono4 ~/A/Model01-Firmware> ./make.sh
ls: cannot access '/home/lhl/.arduino15/packages/keyboardio/hardware/avr/*': No such file or directory
BOARD_HARDWARE_PATH="/home/lhl/Arduino/hardware" /home/lhl/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope/bin//kaleidoscope-builder flash
Building output/Model01-Firmware/Model01-Firmware (0.0.0-gv1.13-57-ge6f5) ...
/home/lhl/Arduino/hardware/keyboardio/avr/libraries/KeyboardioScanner/twi.c: In function '__vector_36':
/home/lhl/Arduino/hardware/keyboardio/avr/libraries/KeyboardioScanner/twi.c:446:47: warning: this statement may fall through [-Wimplicit-fallthrough=]
     twi_masterBuffer[twi_masterBufferIndex++] = TWDR;
                                               ^
/home/lhl/Arduino/hardware/keyboardio/avr/libraries/KeyboardioScanner/twi.c:447:3: note: here
   case TW_MR_SLA_ACK:  // address sent, ack received
   ^~~~
Press ENTER when ready...

Connecting to programmer: .
Found programmer: Id = "CATERIN"; type = S
    Software Version = 1.0; No Hardware Version given.
Programmer supports auto addr increment.
Programmer supports buffered memory access with buffersize=128 bytes.

Programmer supports the following devices:
    Device code: 0x44

I get an error using the Arduino IDE (it complains about finding avr-g++) but I’ve confirmed that I can just edit the Model01-Firmware.ino file directly and the make fwill push the code over. Sweet.

You can check out my fork to see what changes I’ve made: https://github.com/lhl/Model01-Firmware/commits/master

5 Likes