This project now includes a comprehensive development environment using VS Code devcontainers that supports building AASDK for multiple architectures: x64, ARM64, and ARMHF.
- Docker Desktop installed and running
- VS Code with Dev Containers extension
-
Open VS Code in the project directory
-
Choose your target architecture:
Architecture Use Case Command x64 (Default) Native development, fastest builds Ctrl+Shift+P→ "Dev Containers: Reopen in Container"ARM64 Raspberry Pi 4, Apple Silicon targets Ctrl+Shift+P→ "Dev Containers: Reopen in Container" → Select "devcontainer-arm64.json"ARMHF Raspberry Pi 3, older ARM devices Ctrl+Shift+P→ "Dev Containers: Reopen in Container" → Select "devcontainer-armhf.json" -
Wait for container setup (first time takes ~5-10 minutes)
-
Start building!
📝 Note: This setup is compatible with both Docker and Podman. If using Podman, ensure it's running with
podman machine start.
# Build debug version
./build.sh debug
# Build release version
./build.sh release
# Clean and rebuild
./build.sh debug clean- Press
Ctrl+Shift+P→ "Tasks: Run Task" - Choose from:
DevContainer: Build Debug (Quick)DevContainer: Build Release (Quick)DevContainer: Clean & BuildDevContainer: Create Packages
- Use the CMake extension's Build button in the status bar
- Configure with
Ctrl+Shift+P→ "CMake: Configure" - Build with
Ctrl+Shift+P→ "CMake: Build"
# Create release packages (after building)
./package.sh release
# Create debug packages
./package.sh debugPackages will be created in the packages/ directory.
- Set breakpoints in your code
- Press F5 or use the Debug panel
- Choose from available configurations:
Debug AASDK ApplicationDebug Unit TestsAttach to Process
cd build-debug
gdb ./your-executable| Architecture | Platform | Compiler | Cross-Compilation |
|---|---|---|---|
| x64 | linux/amd64 |
GCC/G++ (native) | ❌ Native build |
| ARM64 | linux/arm64 |
GCC/G++ (native) | ❌ Native build (emulated on x64) |
| ARMHF | linux/arm/v7 |
arm-linux-gnueabihf-gcc |
✅ Cross-compilation |
Each container automatically sets:
TARGET_ARCH: Architecture identifier (amd64,arm64,armhf)CC/CXX: Appropriate compilers for cross-compilation
build-debug/ # Debug builds
build-release/ # Release builds
packages/ # Generated packages
protobuf/build/ # Protobuf library builds
.devcontainer/
├── devcontainer.json # Default x64 configuration
├── devcontainer-arm64.json # ARM64 configuration
├── devcontainer-armhf.json # ARMHF configuration
├── docker-compose.yml # Multi-service container setup
├── Dockerfile.x64 # x64 container definition
├── Dockerfile.arm64 # ARM64 container definition
├── Dockerfile.armhf # ARMHF container definition
├── post-create.sh # Setup script
└── README.md # Detailed documentation
.vscode/
├── tasks.json # Enhanced build tasks
├── launch.json # Debug configurations
└── settings.json # Project settings
CMakePresets.json # CMake presets for all architectures
- C/C++ Extension Pack: IntelliSense, debugging, formatting
- CMake Tools: Integrated CMake support
- Additional tools: JSON/YAML support, hex editor
- CMake 3.14+
- GCC/G++ toolchains (including cross-compilers)
- Protocol Buffers compiler & libraries
- Boost libraries (system, filesystem, thread, log, etc.)
- libusb & OpenSSL development libraries
- Git & GitHub CLI
| Architecture | Build Speed | Notes |
|---|---|---|
| x64 | ⚡ Fastest | Native execution |
| ARM64 | 🔶 Good | Native on Apple Silicon, emulated on x64 |
| ARMHF | 🐌 Slower | Always emulated/cross-compiled |
# Start specific architecture container
docker-compose -f .devcontainer/docker-compose.yml up aasdk-dev # x64
docker-compose -f .devcontainer/docker-compose.yml up aasdk-dev-arm64 # ARM64
docker-compose -f .devcontainer/docker-compose.yml up aasdk-dev-armhf # ARMHF# Manual CMake build with specific architecture
mkdir -p build-custom
cd build-custom
cmake -DCMAKE_BUILD_TYPE=Release -DTARGET_ARCH=arm64 ..
make -j$(nproc)Edit the appropriate Dockerfile.* to add additional dependencies or tools for your specific architecture.
# Check Docker status
docker --version
docker info
# For ARM containers on x64, ensure buildx is enabled
docker buildx ls# Check environment variables
echo $TARGET_ARCH
# Verify protobuf is built
ls -la protobuf/build/
# Check compiler availability
which gcc g++ # For x64
which arm-linux-gnueabihf-gcc # For ARMHF
which aarch64-linux-gnu-gcc # For ARM64 cross-compilation- Use x64 container for fastest development iteration
- Build ARM64/ARMHF only when targeting specific devices
- Enable Docker's experimental features for better emulation
- Start with x64 for rapid development and testing
- Switch to target architecture for final builds and testing
- Use integrated debugging for troubleshooting
- Create packages for deployment
The devcontainer environment provides a consistent, reproducible development experience across all supported architectures while maintaining the flexibility to target specific embedded platforms.