#!/bin/bash
set -e # exit on failure

# do compile tests for the defined set of embedded boards
# Usage: verify_embedded_compile

# ensure necessary targets are installed
rustup target add thumbv7em-none-eabi
rustup target add thumbv7em-none-eabihf
rustup target add thumbv8m.main-none-eabi
rustup target add thumbv8m.main-none-eabihf
rustup target add riscv32imac-unknown-none-elf

PLATFORMS="heltec-wifi-lora-32-v3, espressif-esp32-s3-devkitc-1, espressif-esp32-c3-devkit-rust-1, espressif-esp32-c6-devkitc-1, bbc-microbit-v2, nrf52840dk, rpi-pico, rpi-pico2"

for BOARD in $PLATFORMS
do
    clear
    #laze build -b $BOARD -C embedded/ariel-os/usage
    clear
    #laze build -b $BOARD -C embedded/ariel-os/benchmark
done
