diff --git a/.github/workflows/check-arduino.yml b/.github/workflows/check-arduino.yml index 3e0d26c..e818685 100644 --- a/.github/workflows/check-arduino.yml +++ b/.github/workflows/check-arduino.yml @@ -16,10 +16,10 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Arduino Lint - uses: arduino/arduino-lint-action@v1 + uses: arduino/arduino-lint-action@v2 with: compliance: specification library-manager: update diff --git a/.github/workflows/compile-examples.yml b/.github/workflows/compile-examples.yml index 0023a34..ac696fc 100644 --- a/.github/workflows/compile-examples.yml +++ b/.github/workflows/compile-examples.yml @@ -35,66 +35,82 @@ jobs: platforms: | - name: arduino:avr softwareserial: true + artifact-name-suffix: arduino-avr-uno - fqbn: arduino:avr:mega platforms: | - name: arduino:avr softwareserial: true + artifact-name-suffix: arduino-avr-mega - fqbn: arduino:avr:leonardo platforms: | - name: arduino:avr softwareserial: true + artifact-name-suffix: arduino-avr-leonardo - fqbn: arduino:megaavr:nona4809 platforms: | - name: arduino:megaavr softwareserial: true + artifact-name-suffix: arduino-megaavr-nona4809 - fqbn: arduino:sam:arduino_due_x_dbg platforms: | - name: arduino:sam softwareserial: false + artifact-name-suffix: arduino-sam-arduino_due_x_dbg - fqbn: arduino:samd:mkrzero platforms: | - name: arduino:samd softwareserial: false + artifact-name-suffix: arduino-samd-mkrzero - fqbn: arduino:mbed_portenta:envie_m7:target_core=cm4 platforms: | - name: arduino:mbed_portenta softwareserial: false + artifact-name-suffix: arduino-mbed_portenta-envie_m7-target_core-cm4 - fqbn: arduino:mbed_portenta:envie_m7 platforms: | - name: arduino:mbed_portenta softwareserial: false + artifact-name-suffix: arduino-mbed_portenta-envie_m7 - fqbn: arduino:mbed_nano:nano33ble platforms: | - name: arduino:mbed_nano softwareserial: false + artifact-name-suffix: arduino-mbed_nano-nano33ble - fqbn: arduino:mbed_nano:nanorp2040connect platforms: | - name: arduino:mbed_nano softwareserial: false + artifact-name-suffix: arduino-mbed_nano-nanorp2040connect - fqbn: arduino:mbed_nicla:nicla_vision platforms: | - name: arduino:mbed_nicla softwareserial: false + artifact-name-suffix: arduino-mbed_nicla-nicla_vision - fqbn: arduino:mbed_opta:opta platforms: | - name: arduino:mbed_opta softwareserial: false + artifact-name-suffix: arduino-mbed_opta-opta - fqbn: arduino:mbed_giga:giga platforms: | - name: arduino:mbed_giga softwareserial: false + artifact-name-suffix: arduino-mbed_giga-giga - fqbn: arduino:renesas_portenta:portenta_c33 platforms: | - name: arduino:renesas_portenta softwareserial: false + artifact-name-suffix: arduino-renesas_portenta-portenta_c33 - fqbn: arduino:renesas_uno:unor4wifi platforms: | - name: arduino:renesas_uno softwareserial: false + artifact-name-suffix: arduino-renesas_uno-unor4wifi - fqbn: arduino:esp32:nano_nora platforms: | - name: arduino:esp32 softwareserial: false + artifact-name-suffix: arduino-esp32-nano_nora # Make board type-specific customizations to the matrix jobs include: @@ -110,7 +126,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Compile examples uses: arduino/compile-sketches@v1 @@ -130,8 +146,8 @@ jobs: sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }} - name: Save sketches report as workflow artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: if-no-files-found: error path: ${{ env.SKETCHES_REPORTS_PATH }} - name: ${{ env.SKETCHES_REPORTS_PATH }} + name: sketches-report-${{ matrix.board.artifact-name-suffix }} diff --git a/.github/workflows/report-size-deltas.yml b/.github/workflows/report-size-deltas.yml index 652be5d..39e2a0a 100644 --- a/.github/workflows/report-size-deltas.yml +++ b/.github/workflows/report-size-deltas.yml @@ -20,5 +20,5 @@ jobs: - name: Comment size deltas reports to PRs uses: arduino/report-size-deltas@v1 with: - # The name of the workflow artifact created by the sketch compilation workflow - sketches-reports-source: sketches-reports + # Regex matching the names of the workflow artifacts created by the "Compile Examples" workflow + sketches-reports-source: ^sketches-report-.+ diff --git a/.github/workflows/spell-check.yml b/.github/workflows/spell-check.yml index 3f6b03f..ef7d894 100644 --- a/.github/workflows/spell-check.yml +++ b/.github/workflows/spell-check.yml @@ -16,7 +16,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Spell check uses: codespell-project/actions-codespell@master diff --git a/.github/workflows/sync-labels.yml b/.github/workflows/sync-labels.yml index 94938f3..53a9f54 100644 --- a/.github/workflows/sync-labels.yml +++ b/.github/workflows/sync-labels.yml @@ -27,7 +27,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Download JSON schema for labels configuration file id: download-schema @@ -70,7 +70,7 @@ jobs: file-url: https://raw.githubusercontent.com/arduino/tooling-project-assets/main/workflow-templates/assets/sync-labels/${{ matrix.filename }} - name: Pass configuration files to next job via workflow artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: path: | *.yaml @@ -105,16 +105,16 @@ jobs: echo "::set-output name=flag::--dry-run" - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Download configuration files artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: ${{ env.CONFIGURATIONS_ARTIFACT }} path: ${{ env.CONFIGURATIONS_FOLDER }} - name: Remove unneeded artifact - uses: geekyeggo/delete-artifact@v2 + uses: geekyeggo/delete-artifact@v5 with: name: ${{ env.CONFIGURATIONS_ARTIFACT }} diff --git a/LICENSE b/LICENSE index cd4defc..f288702 100644 --- a/LICENSE +++ b/LICENSE @@ -1,17 +1,3 @@ -This file includes licensing information for Arduino_DebugUtils. - -Copyright (c) 2018 ARDUINO SA (www.arduino.cc) - -The software is released under the GNU General Public License, which covers the main body -of the Arduino_DebugUtils code. The terms of this license can be found at: -https://www.gnu.org/licenses/gpl-3.0.en.html - -You can be released from the requirements of the above licenses by purchasing -a commercial license. Buying such a license is mandatory if you want to modify or -otherwise use the software for commercial activities involving the Arduino -software without disclosing the source code of your own applications. To purchase -a commercial license, send an email to license@arduino.cc - GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 @@ -645,8 +631,8 @@ to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. - Arduino_DebugUtils encapsulates functionality useful for debugging code via printf statements. - Copyright (C) Arduino SA, 2019, Author: Alexander Entinger + + Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -666,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: - Arduino_DebugUtils Copyright (C) 2019, Arduino SA + Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. diff --git a/README.md b/README.md index 23ea200..c59b804 100644 --- a/README.md +++ b/README.md @@ -111,3 +111,9 @@ Debug.setDebugLevel(DBG_VERBOSE); int i = 0; DEBUG_VERBOSE("DBG_VERBOSE i = %d", i); ``` + +# License + +Arduino_DebugUtils is licensed under the GNU General Public License v3.0. + +You can be released from the requirements of the above license by purchasing a commercial license. Buying such a license is mandatory if you want to modify or otherwise use the software for commercial activities involving the Arduino software without disclosing the source code of your own applications. To purchase a commercial license, send an email to license@arduino.cc diff --git a/src/Arduino_DebugUtils.cpp b/src/Arduino_DebugUtils.cpp index 3ffde7b..270927b 100644 --- a/src/Arduino_DebugUtils.cpp +++ b/src/Arduino_DebugUtils.cpp @@ -130,6 +130,10 @@ void Arduino_DebugUtils::print(int const debug_level, const __FlashStringHelper ******************************************************************************/ void Arduino_DebugUtils::vPrint(char const * fmt, va_list args) { + + va_list args_copy; + va_copy(args_copy, args); + // calculate required buffer length int msg_buf_size = vsnprintf(nullptr, 0, fmt, args) + 1; // add one for null terminator #if __STDC_NO_VLA__ == 1 @@ -139,7 +143,8 @@ void Arduino_DebugUtils::vPrint(char const * fmt, va_list args) { char msg_buf[msg_buf_size]; #endif - vsnprintf(msg_buf, msg_buf_size, fmt, args); + vsnprintf(msg_buf, msg_buf_size, fmt, args_copy); + va_end(args_copy); if (_newline_on) { _debug_output_stream->println(msg_buf);