-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Experimental : Arduino 3.0.2 + IDF v5.1.4.240629 platform (#31)
* Arduino 3.0, IDF 5.1 changes * Updated to Arduino-3.0.0-rc3 * Removed constexpr due to linker warnings * Fixed compiler warning on format string * Updated watchdog to IDF v5.1 API * Logging : now working with Arduino 3.0 * Tests: fixed logging * Watchdog: fixed failed initialization * Esp32: compatibility with IDF 5.1 * Reduced warnings/errors * Added colored output * Update test_mqtt.cpp * Updated workflows to run if needed * Update sizes.yml * Github actions: added sizes * Updating to latest IDF 5.1.14+Arduino 3.0.0 * Generate unique firmware artifact names * Warnings due to IDF 5.x redefining types from IDF 4.x * Fixing regression * Update build.yml * Update build.yml * Espressif: bugfix MAC address * compilation error * Added PIOENV as build info * Bugfix #32 + Buzzer class and tests * removed conf::machine::BEEP_PERIOD * Wrapped ESP.reset() inside esp32 namespace * LCD: Removed Warning if text is too long * Update Tasks.hpp * Tasks: simplify sorting * Lang: #ifdef instead of #if * MQTT: streaming Arduino String can be done without cstr() * Lcd: removed BaseLCDWrapper, as mockup is not needed * Tests: fix after LCDWrapper refactor * Update conf.hpp * Upgrade to released espressif platform from Jason2866 see https://github.com/Jason2866/platform-espressif32/releases/tag/2024.07.20 * Upgrade to Tasmota Espressif32 platform based on Arduino 3.0.2 * MQTT: bugfix only first IP char is sent in aliveMessage * Tasks: using std::chrono ::steady_clock::time_point instead of millis
- Loading branch information
Showing
28 changed files
with
430 additions
and
210 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
name: Compare firmware sizes (tag) | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
tags: | ||
- '*' # Trigger on all tags | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
size_report: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
variant: | ||
- hardware-rev0-it_IT | ||
- esp32-devboard | ||
steps: | ||
- name: Check out the code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 50 | ||
|
||
- name: Install PlatformIO Core | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.11' | ||
- run: pip install --upgrade platformio | ||
|
||
- name: Use secrets.hpp.example as base for the build | ||
run: cp conf/secrets.hpp.example conf/secrets.hpp | ||
|
||
- name: Build PlatformIO Project (current version) | ||
run: pio run --environment ${{ matrix.variant }} | ||
|
||
- name: Copy latest MAP file | ||
run: cp .pio/build/${{ matrix.variant }}/firmware.map ../firmware.map.latest | ||
|
||
- name: Find previous tag | ||
id: prev_tag | ||
run: | | ||
tags=$(git tag --sort=-creatordate) | ||
for tag in $tags; do | ||
if [ "$tag" != "${GITHUB_REF#refs/tags/}" ]; then | ||
echo "previous_tag=$tag" >> $GITHUB_ENV | ||
break | ||
fi | ||
done | ||
- name: Check out previous tag | ||
run: git checkout ${{ env.previous_tag }} | ||
|
||
- name: Use secrets.hpp.example as base for the build | ||
run: cp conf/secrets.hpp.example conf/secrets.hpp | ||
|
||
- name: Build PlatformIO Project (previous version) | ||
run: pio run --environment ${{ matrix.variant }} | ||
|
||
- name: Copy previous MAP file | ||
run: cp .pio/build/${{ matrix.variant }}/firmware.map ../firmware.map.previous | ||
|
||
- name: Compare MAP files | ||
run: python -m esp_idf_size --format=text --diff=../firmware.map.previous ../firmware.map.latest -o size_report.txt | ||
|
||
- name: Detailed report | ||
run: python -m esp_idf_size --archives --format=text --diff=../firmware.map.previous ../firmware.map.latest -o size_report_details.txt | ||
|
||
- name: Upload size report | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ matrix.variant }}_size_report | ||
path: | | ||
size_report.txt | ||
size_report_details.txt | ||
retention-days: 90 | ||
|
||
- name: Comment size changes on release/tag page | ||
if: startsWith(github.ref, 'refs/tags/') | ||
uses: actions/github-script@v7 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
script: | | ||
const fs = require('fs'); | ||
const report = fs.readFileSync('size_report.txt', 'utf8'); | ||
const previousTag = process.env.previous_tag; | ||
if (report) { | ||
const release = await github.rest.repos.getReleaseByTag({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
tag: context.ref.substring(10) | ||
}); | ||
const truncatedReport = report.length > 63*1024 ? report.substring(0, 63*1024) + '... (truncated)' : report; | ||
await github.rest.repos.updateRelease({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
release_id: release.data.id, | ||
body: release.data.body + '\n\n## Firmware size changes for ${{ matrix.variant }}\n\nCommit CURRENT ' + context.sha + ' vs REFERENCE ' + previousTag + '\n```\n' + truncatedReport + '\n```' | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,5 @@ log.txt | |
rfid-arduino.code-workspace | ||
secrets.hpp | ||
tools/__pycache__/ | ||
build/ | ||
managed_components/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,13 @@ | ||
#ifndef LOGGING_HPP_ | ||
#define LOGGING_HPP_ | ||
|
||
#include "esp_log.h" | ||
#ifndef LOG_LOCAL_LEVEL | ||
#define LOG_LOCAL_LEVEL 5 | ||
#endif | ||
|
||
#undef TAG | ||
[[maybe_unused]] static const char *const TAG = "FAB-O-MATIC"; // Required for ESP32 Logging | ||
|
||
#include "esp_log.h" | ||
|
||
#endif // LOGGING_HPP_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ | |
#include "conf.hpp" | ||
|
||
#include "Logging.hpp" | ||
#include <esp_mac.h> | ||
|
||
namespace fabomatic::card | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.