Skip to content

Commit

Permalink
Add STM32duino support
Browse files Browse the repository at this point in the history
Updated build.yml to include STM32duino board manager URL.
Modified arduino-cli commands to install STM32duino core.
Added steps to compile STM32F1 sketches.
Updated Arduino-STM32F1-excludes to exclude ESP8266/ESP32
examples.
  • Loading branch information
virtual-maker committed Jan 2, 2025
1 parent b7e63ec commit deff807
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 10 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/.ci_scripts/Arduino-STM32F1-excludes
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
./examples/GatewayESP8266/GatewayESP8266.ino
./examples/GatewayESP8266MQTTClient/GatewayESP8266MQTTClient.ino
./examples/GatewayESP8266SecureMQTTClient/GatewayESP8266SecureMQTTClient.ino
./examples/GatewayESP8266OTA/GatewayESP8266OTA.ino
./examples/GatewayESP32/GatewayESP32.ino
./examples/GatewayESP32OTA/GatewayESP32OTA.ino
./examples/GatewayESP32MQTTClient/GatewayESP32MQTTClient.ino
./examples/SensebenderGatewaySerial/SensebenderGatewaySerial.ino

#
./examples/BatteryPoweredSensor/BatteryPoweredSensor.ino
./examples/MotionSensorRS485/MotionSensorRS485.ino

#
./examples/GatewayGSMMQTTClient/GatewayGSMMQTTClient.ino
./examples/GatewaySerialRS485/GatewaySerialRS485.ino
./examples/GatewayW5100/GatewayW5100.ino
./examples/GatewayW5100MQTTClient/GatewayW5100MQTTClient.ino
42 changes: 32 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ jobs:
needs: get_commits

steps:
#### ToDo: Check if the output is correct
- name: Debug commits output
run: |
echo "Commits: ${{ matrix.commit }}"
Expand Down Expand Up @@ -130,9 +129,10 @@ jobs:
echo "::error::C++ Code with errors detected. See detailed report in Artifacts section below."
exit 1
# Build Arduino AVR
build-arduino-AVR:
needs: static-code-tests
#if: false # This will deactivate the job
if: false # This will deactivate the job
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -195,6 +195,7 @@ jobs:
EXCLUDES="./.github/workflows/.ci_scripts/Arduino-AVR-excludes"
./.github/workflows/.ci_scripts/compile-arduino-sketches.sh $FQBN $SKETCHES $EXCLUDES
# Build Arduino ESP32
build-arduino-ESP32:
needs: static-code-tests
#if: false # This will deactivate the job
Expand Down Expand Up @@ -237,9 +238,10 @@ jobs:
EXCLUDES="./.github/workflows/.ci_scripts/Arduino-ESP32-excludes"
./.github/workflows/.ci_scripts/compile-arduino-sketches.sh $FQBN $SKETCHES $EXCLUDES
# Build Arduino MySensors Boards (AVR, SAMD)
build-arduino-MySensors:
needs: static-code-tests
#if: false # This will deactivate the job
if: false # This will deactivate the job
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -302,9 +304,10 @@ jobs:
EXCLUDES="./.github/workflows/.ci_scripts/MySensors-SAMD-excludes"
./.github/workflows/.ci_scripts/compile-arduino-sketches.sh $FQBN $SKETCHES $EXCLUDES
# Build Arduino STM32F1
build-arduino-STM32F1:
needs: static-code-tests
if: false # This will deactivate the job
#if: false # This will deactivate the job
runs-on: ubuntu-latest

steps:
Expand All @@ -324,15 +327,33 @@ jobs:
- name: Install dependencies
run: |
arduino-cli config add board_manager.additional_urls https://sandeepmistry.github.io/arduino-nRF5/package_nRF5_boards_index.json
arduino-cli config add board_manager.additional_urls http://dan.drown.org/stm32duino/package_STM32duino_index.json
arduino-cli core update-index
arduino-cli core install sandeepmistry:nRF5
#arduino-cli lib install "Ethernet"
#arduino-cli lib install "SD"
arduino-cli core install stm32duino:STM32F1
arduino-cli lib install "Ethernet"
#arduino-cli lib install "SoftwareSerial" # Library not available
# stm32duino STM32F1 generic
- name: Compile STM32F1 (tests)
#if: false # This will deactivate the step
run: |
FQBN="stm32duino:STM32F1:genericSTM32F103C:device_variant=STM32F103C8,upload_method=DFUUploadMethod,cpu_speed=speed_72mhz,opt=osstd"
SKETCHES="./tests"
EXCLUDES="./.github/workflows/.ci_scripts/Arduino-STM32F1-excludes"
./.github/workflows/.ci_scripts/compile-arduino-sketches.sh $FQBN $SKETCHES $EXCLUDES
- name: Compile STM32F1 (examples)
#if: false # This will deactivate the step
run: |
FQBN="stm32duino:STM32F1:genericSTM32F103C:device_variant=STM32F103C8,upload_method=DFUUploadMethod,cpu_speed=speed_72mhz,opt=osstd"
SKETCHES="./examples"
EXCLUDES="./.github/workflows/.ci_scripts/Arduino-STM32F1-excludes"
./.github/workflows/.ci_scripts/compile-arduino-sketches.sh $FQBN $SKETCHES $EXCLUDES
# Build Arduino ESP8266
build-arduino-ESP8266:
needs: static-code-tests
#if: false # This will deactivate the job
if: false # This will deactivate the job
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -375,9 +396,10 @@ jobs:
EXCLUDES="./.github/workflows/.ci_scripts/Arduino-ESP8266-excludes"
./.github/workflows/.ci_scripts/compile-arduino-sketches.sh $FQBN $SKETCHES $EXCLUDES
# Build Arduino nRF5
build-arduino-nRF5:
needs: static-code-tests
#if: false # This will deactivate the job
if: false # This will deactivate the job
runs-on: ubuntu-latest

steps:
Expand Down

0 comments on commit deff807

Please sign in to comment.