Files
OpenParcelBox/tools/bootstrap/bootstrap-zephyr.cmd
T

64 lines
1.3 KiB
Batchfile

@echo off
setlocal
echo ==========================================
echo OpenParcelBox - Zephyr Bootstrap
echo ==========================================
echo.
set DEV=%USERPROFILE%\Dev
set VENV=%DEV%\.venv
set ZEPHYR=%DEV%\zephyrproject
echo [1/8] Creation du dossier Dev...
if not exist "%DEV%" mkdir "%DEV%"
echo.
echo [2/8] Creation du Virtual Environment...
if not exist "%VENV%" (
python -m venv "%VENV%"
)
call "%VENV%\Scripts\activate.bat"
echo.
echo [3/8] Mise a jour de pip...
python -m pip install --upgrade pip
echo.
echo [4/8] Installation de west...
python -m pip install west
echo.
echo [5/8] Initialisation du workspace Zephyr...
if not exist "%ZEPHYR%" (
west init --mr v4.4.0 "%ZEPHYR%"
)
cd /d "%ZEPHYR%"
echo.
echo [6/8] Telechargement des modules...
west update
echo.
echo [7/8] Installation des dependances Python...
west packages pip --install
echo.
echo [8/8] Verification de la toolchain...
west zephyr-export
echo.
echo ==========================================
echo Bootstrap termine.
echo ==========================================
echo.
echo Compilation de verification...
west build -p always -b xiao_ble/nrf52840 zephyr\samples\hello_world
echo.
echo Si la compilation s'est terminee sans erreur,
echo votre environnement est pret.
pause