Skip to main content

Build and Development Environment

Clone the Project

git clone --recursive [email protected]:AidenAI-IO/aiden-firmware.git
cd aiden-firmware

The project includes the pico-sdk submodule. It's recommended to use --recursive on the first clone. If you've already cloned but the submodule is missing:

git submodule update --init --recursive

Local CMake Build

Standard out-of-source build:

cmake -S . -B build
cmake --build build

Build artifacts location:

  • build/lib/: Static libraries, e.g., libaiden.a, libaiden_image.a.
  • build/bin/: Executables, e.g., frame_service, audio_service, config_web, example tools, etc.
  • build/CMakeFiles/: CMake intermediate files.

Note: Full hardware targets depend on Rockchip / Luckfox SDK libraries. Local native builds are mainly suitable for code checking, partial tools, and host testing; for device-runnable artifacts, use the cross-compilation workflow.

Luckfox Docker Cross-Compilation

The project provides build.sh, which starts the luckfoxtech/luckfox_pico:1.0 container and executes _build.sh:

./build.sh

This workflow will:

  1. Compile C/C++ programs using cmake/toolchain-arm-rockchip830.cmake;
  2. Generate build/lib/libaiden.a and build/bin/*;
  3. Install/use Go 1.26.0;
  4. Cross-compile the Go Agent and BLE daemon: build/bin/agent and build/bin/ble_service, targeting linux/arm GOARM=7.

macOS Apple Silicon + Colima

On Apple Silicon, it's recommended to use a native aarch64 Colima VM and run the Luckfox image via Docker with --platform linux/amd64:

brew install docker docker-buildx colima
colima start --vm-type vz --vz-rosetta

docker buildx version
docker buildx ls

./build.sh

Do not start a --arch x86_64 Colima VM for this workflow; keep the native VM and let the container run as linux/amd64.

Makefile Shortcuts

make build # cmake -S . -B build && cmake --build build
make clean # Remove build/
make test # Build and run host-native unit tests
make test-clean # Remove build-host/

make test is equivalent to:

cmake -S . -B build-host -DAIDEN_TESTS=ON
cmake --build build-host
cd build-host && ctest --output-on-failure

Main Build Targets

TargetDescription
libaiden.aC++ hardware SDK and service common library
libaiden_image.aImage processing library
frame_service / frame_service_cliHDMI frame capture service and CLI
audio_service / audio_service_cliAudio recording/playback service and CLI
config_webDevice configuration web service
image_processImage processing CLI
example_*Wake word, audio, camera, USB HID examples
agentGo Agent daemon, additionally built by _build.sh
ble_serviceGo BlueZ GATT/ANCS daemon, additionally built by _build.sh