How to define macros in Chrysalis?

I was only just now able to build the stock firmware.
Notes of what I tried. What eventually worked (nicely formatted at the above link :slight_smile: ):

Setup prerequisites

  1. Add udev rules for the Model100 per https://community.keyboard.io/t/model-100-firmware-update-to-fix-corruption-issues/5553/9 .
  • chown root:root the new rules file or it won’t be used (ask me how I know! :wink: )
  1. Install the latest dfu-util from source
  1. Confirm that the keyboard is accessible:
  2. Hold prog while plugging in the keyboard
  3. Run ./src/dfu-util -lv and make sure Model 100 (bootloader) appears
  4. Install the latest firmware using Chrysalis per Model 100 firmware update to fix corruption issues

Setup Chrysalis-Firmware-Bundle

  1. Clone GitHub - keyboardio/Chrysalis-Firmware-Bundle: Firmware sketches for boards supported by Chrysalis and cd into the clone dir.
  2. Run ./tools/bootstrap. This will create .arduino/ and .kaleidoscope/ and download lots of files into them.
  3. export KALEIDOSCOPE_DIR="$(realpath .kaleidoscope/)"
  4. export ARDUINO_DIRECTORIES_USER="$(realpath .kaleidoscope/.arduino/user)"
  5. make -C .kaleidoscope setup

Build the firmware

  1. make Keyboardio/Model100 VERBOSE=1. This should leave output in output/Keyboardio/Model100/default.bin.
  2. Unplug the Model100, hold Prog, and plug the Model100 back in. The prog key should light steady red.
  3. Run dfu-util -d 3496:0005 -D ./output/Keyboardio/Model100/default.bin -R — use your locally-built dfu-util. You should see something like the below “Sample dfu-util output”. The first column of keys will cycle green while this is happening.
  4. When the programming is done, the keyboard should reset. If it doesn’t, unplug and replug it.
1 Like