-
-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compiler warnings #64
Comments
Analysisdata[length] is used as a buffer to verify / compare. Possible solutionMaybe a _verifyBlock(addr, data, length) that verifies while reading. Could work per byte, uses less memory and fails faster? |
@thijstriemstra
Can you check if the warnings still exist (or are replaced with others)? |
I'll give it a try. Might be a good idea to setup a platformio builder and make it fail on warnings like this. |
That is a good idea, |
See https://docs.platformio.org/en/latest/integration/ci/github-actions.html so something like:
|
And to make it fail on warnings add
So:
(untested) |
Created an issue for this in a smaller library to investigate and get it to work |
Cool! The only disadvantage i can see is compiler warnings in third party libraries/frameworks, that'll fail the build as well (I think). Narrowing warnings down to lib only code might also be possible but not sure/tested. |
OK, I will try to find out coming days/weeks (quite busy with other projects) how to get the platformIO build running. |
Got something building with green results 😎 yaml file is not portable or engineered (yet) but there is a starting point. |
The -Werror fails upon the Arduino core libs like HWSerial, so that switch will not be used...
|
compiling all examples by coding a hard list works to be continued later. |
Notes to me: name: PlatformIO CI
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
# added timeout
timeout-minutes: 20
strategy:
matrix:
os: [ubuntu-latest]
example: [
examples/A1301_autoMidPoint/A1301_autoMidPoint.ino,
examples/A1301_demo/A1301_demo.ino,
examples/A1301_determineNoise/A1301_determineNoise.ino,
examples/A1301_performance/A1301_performance.ino,
examples/A1301_plotter/A1301_plotter.ino,
examples/A1301_test/A1301_test.ino,
examples/A1301_test_saturation/A1301_test_saturation.ino
]
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v3
with:
path: |
~/.cache/pip
~/.platformio/.cache
key: ${{ runner.os }}-pio
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install PlatformIO Core
run: pip install --upgrade platformio
- name: Download library
run: |
wget https://github.com/RobTillaart/A1301/archive/master.zip -O /tmp/master.zip
unzip /tmp/master.zip -d /tmp
- name: Build PlatformIO examples
run: pio ci --lib "." --lib="/tmp/A1301-master" --board=uno
env:
PLATFORMIO_CI_SRC: ${{ matrix.example }}
# PLATFORMIO_BUILD_FLAGS: -D -Wall # too much errors in core Arduino. hardcoded are
These should ideally be created / derived from the branch pushed.
|
After reading I could fix the repository and correct branch (first it was hardcoded master while it had to be a develop branch). - name: Download library
run: |
wget https://github.com/${{github.repository}}/archive/${{github.ref_name}}.zip -O /tmp/${{github.ref_name}}.zip
unzip /tmp/${{github.ref_name}}.zip -d /tmp/${{github.actor}}
- name: Build PlatformIO examples
run: pio ci --lib "." --lib="/tmp/${{github.repository}}-${{github.ref_name}}" --board=uno
env:
PLATFORMIO_CI_SRC: ${{ matrix.example }}
# PLATFORMIO_BUILD_FLAGS: -D -Wall # too much Only the list of examples files need to be generated,. Note: strategy of matrix job is set up before the download and build starts. (need to read more) |
Did a test with ESP32DEV instead of UNO, also warnings in the ESP32 specific files.
This bug is already reported at - espressif/arduino-esp32#8641 |
Did you have time to try the develop branch? |
After switching to:
the compile errors seem to be gone, and since I'll be using
|
OK, I will merge the develop branch today
|
- Fix #64, compiler warning. - add **verifyBlock(memoryAddress, buffer, length)** - add example **I2C_eeprom_verifyBlock.ino** - update GitHub actions - update keywords.txt - update examples - update readme.md
Using platformio:
seeing some warnings while compiling my project:
The text was updated successfully, but these errors were encountered: