-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·47 lines (40 loc) · 1.13 KB
/
build.sh
File metadata and controls
executable file
·47 lines (40 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash
# Script de compilación rápida para PicoMSX
set -e
echo "=========================================="
echo " PicoMSX para Raspberry Pi Pico 2"
echo "=========================================="
echo ""
# Crear directorio build si no existe
if [ ! -d "build" ]; then
echo "Creando directorio build..."
mkdir build
fi
cd build
# Configurar con CMake si no está configurado
if [ ! -f "build.ninja" ] && [ ! -f "Makefile" ]; then
echo "Configurando proyecto con CMake..."
cmake -G Ninja ..
fi
echo "Compilando..."
ninja
if [ $? -eq 0 ]; then
echo ""
echo "=========================================="
echo " ✓ Compilación exitosa"
echo "=========================================="
echo ""
echo "Archivo generado: build/picomsx.uf2"
ls -lh picomsx.uf2
echo ""
echo "Para flashear:"
echo " 1. Mantén BOOTSEL y conecta el Pico 2"
echo " 2. Copia picomsx.uf2 a la unidad RPI-RP2"
echo ""
else
echo ""
echo "=========================================="
echo " ✗ Error en la compilación"
echo "=========================================="
exit 1
fi