AlpakkaKapybaraMarmota

OverviewManualGalleryComponents

Development in Linux (and MacOS)


Install system dependencies

With apt, pacman, brew, or the equivalent package manager of your system, we have to install:

  • gcc
  • git
  • cmake

Downloading the firmware source code

git clone https://github.com/inputlabs/alpakka_firmware

Install additional libraries

This script will install the Pico C SDK, and the ARM architecture toolchain. It may take a while since the ARM toolchain download is big and slow.

cd alpakka_firmware
make install  # It may take several minutes.

Compile and load into device

To setup the build environment and to compile for first time:

DEVICE=<target-device> make

Other useful commands (check the repo readme for more details).

make rebuild
make load
make reload

Connect via session

For development purposes or just to troubleshot problems, it is possible to establish a bidirectional communication with the controller via the Developer Port (the JST port above the USB) using a TTL serial cable (see Developer Kit), so then the controller can output data into your terminal, and the controller listen to commands sent from the terminal.

Using make session will create a GNU Screen session, with a log similar to this:

ADAPTER=<your-adapter> make session

╔════════════════════════════╗
║ Input Labs Oy.             ║
║ Alpakka - firmware 0.82.10 ║
╚════════════════════════════╝
Config NVM:
  config_version=6
  os_mode=0
  profile=1
  sensitivity=0
  deadzone=0
Config I2C:
  I2C bus
  I2C_IO_0 ack=1
  I2C_IO_1 ack=1
Config SPI
Config thumbstick
Config touch
Config rotary
Config profiles
Config IMU:
  IMU_0: CTRL2_G=0x10100000
  IMU_1: CTRL2_G=0x10100000
Profile: 1
USB: tud_ready TRUE

Now in another terminal we can also use make restart or make bootsel instead of using the Developer Kit reset button (as long as the controller program did not crash). And also some other tooling will automatically use this communication channel if active.