0. Download the Model 01 firmware:
$ git clone https://github.com/keyboardio/Model01-Firmware.git
$ cd Model01-Firmware
1. Download and install arduino-cli
:
$ wget https://downloads.arduino.cc/arduino-cli/arduino-cli-latest-osx.zip
$ unzip arduino-cli-latest-osx.zip
$ mv arduino-cli-0.3.6-alpha.preview-macosx /usr/local/bin/arduino-cli
$ which arduino-cli
/usr/local/bin/arduino-cli
$ arduino-cli config init
Config file PATH: /Users/ellen/Library/arduino15/arduino-cli.yaml
board_manager:
additional_urls:
- https://raw.githubusercontent.com/keyboardio/boardsmanager/master/package_keyboardio_index.json
$ arduino-cli core update-index
Updating index: package_index.json downloaded
Updating index: package_keyboardio_index.json downloaded
$ arduino-cli core install keyboardio:avr
Downloading arduino:[email protected]...
arduino:[email protected] downloaded
Downloading arduino:[email protected]...
arduino:[email protected] downloaded
Downloading keyboardio:[email protected]...
keyboardio:[email protected] downloaded
Installing arduino:[email protected]...
arduino:[email protected] installed
Installing arduino:[email protected]...
arduino:[email protected] installed
Installing keyboardio:[email protected]...
keyboardio:[email protected] installed
6. Find your Model 01's fully qualified board name (FQBN) and serial port: In this example, the FQBN is keyboardio:avr:model01
:
$ arduino-cli board list
FQBN Port ID Board Name
keyboardio:avr:model01 /dev/cu.usbmodemCkbio01E1 1209:2301 Keyboardio Model 01
In this example, the fully qualified board name (FQBN) is keyboardio:avr:model01
, and the serial port is /dev/cu.usbmodemCkbio01E1
:
$ MODEL01_FQBN="keyboardio:avr:model01"
$ echo $MODEL01_FQBN
keyboardio:avr:model01
$ MODEL01_PORT="/dev/cu.usbmodemCkbio01E1"
$ echo $MODEL01_PORT
/dev/cu.usbmodemCkbio01E1
$ arduino-cli compile --fqbn $MODEL01_FQBN Model01-Firmware.ino
Build options changed, rebuilding all
Error: fork/exec /Users/ellen/Library/arduino15/packages/arduino/tools/avr-gcc/4.8.1-arduino5/bin/avr-g++: bad CPU type in executable
Compilation failed.
$ arduino-cli upload -p $MODEL01_PORT --fqbn $MODEL01_FQBN Model01-Firmware.ino
Error: stat Model01-Firmware.ino/Model01-Firmware.ino.keyboardio.avr.model01.hex: not a directory
Could not open compiled sketch.
The
Compilation failed.
andCould not open compiled sketch.
error messages are because the current macOS release doesn't include a 64-bit AVR keychain, which is necessary to run on macOS 10.15 Catalina.