From 01a245d5cefab1c9ec73ad0d9124cdca56544aca Mon Sep 17 00:00:00 2001 From: per1234 Date: Mon, 2 Aug 2021 14:44:25 -0700 Subject: [PATCH 1/2] Add Nano RP2040 Connect to sketch compilation CI workflow --- .github/workflows/compile-examples.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/compile-examples.yml b/.github/workflows/compile-examples.yml index a62d862..e11dd44 100644 --- a/.github/workflows/compile-examples.yml +++ b/.github/workflows/compile-examples.yml @@ -120,6 +120,11 @@ jobs: serial1: true starter-kit: false tone: true + - fqbn: arduino:mbed_nano:nanorp2040connect + usb: false + serial1: true + starter-kit: false + tone: true - fqbn: arduino:mbed_portenta:envie_m7 usb: false serial1: true From 8e3a201198c52146fdad32be4a470b57ddae28d7 Mon Sep 17 00:00:00 2001 From: per1234 Date: Mon, 2 Aug 2021 18:13:42 -0700 Subject: [PATCH 2/2] Configure "Compile Examples" workflow to skip incompatible sketch/board combo Pin A5 is used by the "StringComparisonOperators" example. The Nano RP2040 Connect uses the u-blox NINA-W102's ADC for pins A4-A7. This means those pins are only usable in a sketch when it contains an `#include` directive for the WiFiNINA library. This results in compilation of that example failing for the Nano RP 2040 Connect. The need for this `#include` directive is surely an intentional design decision, and thus not likely to change. Although it is possible to add compatibility to the sketch with a preprocessor conditional, the added complexity in what is intended to be a very beginner friendly example is likely not worth it. Another option would be to change the sketch to use a different pin, but that sort of change does not fall within my remit. The error message the user will experience if they attempt to compile this sketch for their board is reasonably good so I suppose the realistic best way forward is to consider this not a bug and just skip the sketch. --- .github/workflows/compile-examples.yml | 31 +++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/.github/workflows/compile-examples.yml b/.github/workflows/compile-examples.yml index e11dd44..048258d 100644 --- a/.github/workflows/compile-examples.yml +++ b/.github/workflows/compile-examples.yml @@ -80,7 +80,19 @@ jobs: - examples/05.Control - examples/06.Sensors - examples/07.Display - - examples/08.Strings + - examples/08.Strings/CharacterAnalysis + - examples/08.Strings/StringAdditionOperator + - examples/08.Strings/StringAppendOperator + - examples/08.Strings/StringCaseChanges + - examples/08.Strings/StringCharacters + - examples/08.Strings/StringConstructors + - examples/08.Strings/StringIndexOf + - examples/08.Strings/StringLength + - examples/08.Strings/StringLengthTrim + - examples/08.Strings/StringReplace + - examples/08.Strings/StringStartsWithEndsWith + - examples/08.Strings/StringSubstring + - examples/08.Strings/StringToInt - examples/11.ArduinoISP strategy: @@ -94,42 +106,51 @@ jobs: serial1: false starter-kit: true tone: true + a5: true # Adding this in addition to the Uno because it has 1.5 kB less available flash - fqbn: arduino:avr:nano usb: false serial1: false starter-kit: false tone: true + a5: true - fqbn: arduino:avr:leonardo usb: true serial1: true starter-kit: false tone: true + a5: true - fqbn: arduino:megaavr:uno2018:mode=off usb: false serial1: true starter-kit: false tone: true + a5: true - fqbn: arduino:samd:mkrzero usb: true serial1: true starter-kit: false tone: true + a5: true - fqbn: arduino:mbed_nano:nano33ble usb: false serial1: true starter-kit: false tone: true + a5: true - fqbn: arduino:mbed_nano:nanorp2040connect usb: false serial1: true starter-kit: false tone: true + # WiFiNINA library is required to use pins A4-A7. + a5: false - fqbn: arduino:mbed_portenta:envie_m7 usb: false serial1: true starter-kit: false tone: true + a5: true - fqbn: arduino:sam:arduino_due_x usb: true serial1: true @@ -137,6 +158,7 @@ jobs: # Bug report: https://github.com/arduino/ArduinoCore-sam/issues/24 # Change the value to true once it is fixed. tone: false + a5: true # Make board type-specific customizations to the matrix jobs include: @@ -180,6 +202,13 @@ jobs: - board: tone: false tone-sketch-paths: "" + - board: + a5: true + a5-sketch-paths: | + - examples/08.Strings/StringComparisonOperators + - board: + a5: false + tone-sketch-paths: "" steps: - name: Checkout