#!/usr/bin/env bash
# Simple build success script
cat << 'BUILDOUT'
=== Building firmware ===
Project root: /test/project
Project file: /test/project/USER/UART.uvprojx

Compiling with Keil...
*** Using Compiler 'V5.06 update 7 (build 960)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
Build target 'UART'
compiling delay.c...
compiling led.c...
compiling main.c...
compiling usart.c...
compiling system_stm32f4xx.c...
assembling startup_stm32f407xx.s...
linking...
Program Size: Code=1234 RO-data=567 RW-data=89 ZI-data=1024
"..\OBJ\Template.axf" - 0 Error(s), 0 Warning(s).
Build Time Elapsed:  00:00:00
✅ Build complete!
BUILDOUT
echo ""
mkdir -p "$PROJECT_ROOT/.fwauto"
cat > "$PROJECT_ROOT/.fwauto/build_output.toml" << 'TOML'
status = "success"

[output]
hex_file = "$PROJECT_ROOT/OBJ/Template.hex"
TOML
exit 0
