Skip to content

Commit

Permalink
Modified arduino_build_sketch.* scripts to build all examples for A…
Browse files Browse the repository at this point in the history
…RDUINO NANO, ESP8266 and ESP32 boards.
  • Loading branch information
end2endzone committed Aug 5, 2024
1 parent d22b78c commit fe2391f
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 4 deletions.
22 changes: 20 additions & 2 deletions ci/linux/arduino_build_sketch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,27 @@ echo
export ARDUINO_INO_FILE=$PRODUCT_SOURCE_DIR/examples/$1/$1.ino

echo ==========================================================================================================
echo Compiling $ARDUINO_INO_FILE
echo Compiling $ARDUINO_INO_FILE (atmega328)
echo ==========================================================================================================
cd $PRODUCT_SOURCE_DIR/examples/$1
arduino-cli compile -b arduino:avr:nano:cpu=atmega328 $1.ino
arduino-cli compile --fqbn "arduino:avr:nano:cpu=atmega328" "$1.ino"
echo
echo

echo ==========================================================================================================
echo Compiling $ARDUINO_INO_FILE (esp8266)
echo ==========================================================================================================
cd $PRODUCT_SOURCE_DIR/examples/$1
arduino-cli compile --fqbn "esp8266:esp8266:nodemcuv2" "$1.ino"
echo
echo

echo ==========================================================================================================
echo Compiling $ARDUINO_INO_FILE (esp32)
echo ==========================================================================================================
cd $PRODUCT_SOURCE_DIR/examples/$1
arduino-cli compile --fqbn "esp32:esp32:esp32" "$1.ino"
echo
echo

cd "$(dirname "$0")"
24 changes: 22 additions & 2 deletions ci/windows/arduino_build_sketch.bat
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,30 @@ echo.
set ARDUINO_INO_FILE=%PRODUCT_SOURCE_DIR%\examples\%~1\%~1.ino

echo ==========================================================================================================
echo Compiling %ARDUINO_INO_FILE%
echo Compiling %ARDUINO_INO_FILE% (atmega328)
echo ==========================================================================================================
cd /d "%PRODUCT_SOURCE_DIR%\examples\%~1"
arduino-cli compile -b arduino:avr:nano:cpu=atmega328 %~1.ino
arduino-cli compile --fqbn "arduino:avr:nano:cpu=atmega328" %~1.ino
if %errorlevel% neq 0 exit /b %errorlevel%
echo.
echo.

echo ==========================================================================================================
echo Compiling %ARDUINO_INO_FILE% (esp8266)
echo ==========================================================================================================
cd /d "%PRODUCT_SOURCE_DIR%\examples\%~1"
arduino-cli compile --fqbn "esp8266:esp8266:nodemcuv2" %~1.ino
if %errorlevel% neq 0 exit /b %errorlevel%
echo.
echo.

echo ==========================================================================================================
echo Compiling %ARDUINO_INO_FILE% (esp32)
echo ==========================================================================================================
cd /d "%PRODUCT_SOURCE_DIR%\examples\%~1"
arduino-cli compile --fqbn "esp32:esp32:esp32" %~1.ino
if %errorlevel% neq 0 exit /b %errorlevel%
echo.
echo.

cd /d "%~dp0"

0 comments on commit fe2391f

Please sign in to comment.