diff --git a/CHANGELOG.md b/CHANGELOG.md index 5cd519d..735c77e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,51 @@ # Changelog * Unreleased +* 1.7.1 (2023-06-15) + * This is a maintenance release, to update the list of supported boards, + and update the documentation. + * No functional change. + * Add [MemoryBenchmark](examples/MemoryBenchmark) to collect flash and + static memory usage. + * For consistency with my other arduino libraries. + * Also enables an automated script to verify that AUnit compiles under + various microcontrollers. + * Update supported boards and tiers + * Update [Flash.h](src/aunit/Flash.h) to work better with Teensyduino, + Adafruit SAMD, and Seeeduino SAMD boards by hacking around their bugs + and inconsistent APIs + * Add SAMD21 and SAMD51 boards to Tier 1 + * Add 2 SAMD boards from 2 different companies, to test their + Arduino Core software: + * Seeeduino XIAO M0 (SAMD21 48MHz ARM Cortex-M0+) + * Adafruit ItsyBitsy M4 (SAMD51 120MHz ARM Cortex-M4) + * SAMD21 and SAMD51 boards are back in Tier 1, as long as they use + the traditional Arduino API instead of the new + [ArduinoCore-API](https://github.com/arduino/ArduinoCore-api). + * Fortunately most third party SAMD21 and SAMD51 boards continue to + use the traditional Arduino API. + * Move Teensy 3.2 to Tier 2 ("Should work but not tested often") + * This board is entering end-of-life. + * As well, the Teensyduino environment integrates with the Arduino + IDE and CLI in a way that's different than all other third-party + Arduino boards. Some of my automation scripts do not work with + Teensyduino, so it becomes very time consuming to test the Teensy + boards. + * All Teensy boards are now in Tier 2. + * The various tiers are documented in the + [README.md](README.md#Hardware). + * Upgrade tool chain. + * Arduino CLI from 0.19.2 to 0.33.0 + * Arduino AVR Core from 1.8.4 to 1.8.6 + * STM32duino from 2.2.0 to 2.5.0 + * ESP32 Core from 2.0.2 to 2.0.9 + * Teensyduino from 1.56 to 1.57 (unable to install 1.58) * 1.7.0 (2022-12-08) - * **Potentially Breaking** Change format of assertion failure message from: - * "Assertion failed: (expected=3) == (counter=4), file AUnitTest.ino, - line 134.", to - * "AUnitTest.ino:134: Assertion failed: (expected=3) == (counter=4)." + * **Potentially Breaking** Change format of assertion failure message + * from: `Assertion failed: (expected=3) == (counter=4), file + AUnitTest.ino, line 134.` + * to: `AUnitTest.ino:134: Assertion failed: (expected=3) == + (counter=4).` * This format is compatible with various Linux/MacOS/Unix command line tools, in particular, the `vim` editor. * When used with EpoxyDuino, this message format allows the `vim` editor diff --git a/README.md b/README.md index c2a78b7..cba4553 100644 --- a/README.md +++ b/README.md @@ -4,23 +4,25 @@ A unit testing framework for Arduino platforms inspired by by [ArduinoUnit](https://github.com/mmurdoch/arduinounit) and [Google -Test](https://github.com/google/googletest/). The unit tests usually run on the -embedded controller which allows detection of architecture-specific problems. -But for faster development, many unit tests can be compiled and executed -natively on Linux or MacOS using the -[EpoxyDuino](https://github.com/bxparks/EpoxyDuino) companion project. - -AUnit is almost a drop-in replacement of ArduinoUnit with some advantages. AUnit -supports timeouts and test fixtures. It sometimes consumes 50% less flash memory -on the AVR platform, and it has been tested to work on the AVR, SAMD21, STM32, -ESP8266, ESP32 and Teensy platforms. Another companion project -[AUniter](https://github.com/bxparks/AUniter) project provides command line -tools to verify, upload and validate the unit tests to the microcontroller, -instead of having to go through the Arduino IDE. Both the AUniter and -EpoxyDuino tools can be used in a continuous integration system like Jenkins, -or with [GitHub Actions](https://github.com/features/actions). - -**Version**: 1.7.0 (2022-12-08) +Test](https://github.com/google/googletest/). AUnit is almost a drop-in +replacement of ArduinoUnit (v2.2) with some advantages. AUnit supports timeouts +and test fixtures. It sometimes consumes 50% less flash memory on the AVR +platform, and it has been tested to work on the AVR, SAMD21, STM32, ESP8266, +ESP32 and Teensy platforms. The assertion error messages were updated in v1.7 to +provide seamless integration with Unix tools like `vim`. + +Originally, the AUnit tests were designed to run on the embedded controller +itself which allows detection of architecture-specific problems. But the +uploading, flashing, and execution process is often slow and flaky, causing the +iteration cycle to take too much time. It is often more effective to execute the +AUnit tests natively on a host machine (running Linux, MacOS, or FreeBSD) using +the [EpoxyDuino](https://github.com/bxparks/EpoxyDuino) companion project. Once +the unit tests are running on the Linux or MacOS host machine, they can be +incorporated into a continuous integration system like +[Jenkins](https://www.jenkins.io/) system or a cloud-based system like [GitHub +Actions](https://github.com/features/actions). + +**Version**: 1.7.1 (2023-06-15) **Changelog**: [CHANGELOG.md](CHANGELOG.md) @@ -78,6 +80,8 @@ or with [GitHub Actions](https://github.com/features/actions). * [Class Hierarchy](#ClassHierarchy) * [Testing Private Helper Methods](#PrivateHelperMethods) * [Benchmarks](#Benchmarks) + * [Memory Benchmark](#MemoryBenchmark) + * [Compared with ArduinoUnit](#CompareArduinoUnit) * [System Requirements](#SystemRequirements) * [Hardware](#Hardware) * [Tool Chain](#ToolChains) @@ -248,36 +252,66 @@ The source files are organized as follows: The `examples/` directory has a number of examples: -* `advanced` - how to subclass `Test` and `TestOnce` manually -* `basic` - using the `test()` macro -* `continuous` - using the `testing()` macro -* `filter` - how to filter tests using `TestRunner::include()` and - `TestRunner::exclude()` -* `fixture` - how to use the `testF()` macro with test fixtures -* `meta_asserts` - how to use `assertTestXxx()` and `checkTestXxx()` - -In the `tests/` directory: - -* `AUnitTest` - the unit test for core `AUnit` functions, -* `AUnitMetaTest` - the unit test for meta assertions and `extern*()` macros -* `FilterTest` - manual tests for `include()` and `exclude()` filters -* `SetupAndTeardownTest` - tests to verify that `setup()` and `teardown()` are - called properly by the finite state machine - -Perhaps the best way to see AUnit in action through real life examples. All my -libraries use AUnit for testing and for continuous integration through -EpoxyDuino. Here are some examples: +* Basic + * [basic](examples/basic) + * using the `test()` macro + * [fixture](examples/fixture) + * how to use the `testF()` macro with test fixtures +* Intermediate + * [filter](examples/filter) + * how to filter tests using `TestRunner::include()` and + `TestRunner::exclude()` + * [meta_asserts](examples/meta_asserts) + * how to use `assertTestXxx()` and `checkTestXxx()` +* Advanced + * [advanced](examples/advanced/) + * how to subclass `Test` and `TestOnce` manually + * [continuous](examples/continuous) + * using the `testing()` macro +* Benchmarks + * These are internal benchmark programs, not meant as examples (they are in + the `examples/` directory because of the Arduino IDE). + * [MemoryBenchmark](examples/MemoryBenchmark) + * Determines the flash and static memory consumption of AUnit for + various microcontroller + +In the `tests/` directory, there are unit tests to test the AUnit framework +itself: + +* [AUnitTest](tests/AUnitTest) + * the unit test for core `AUnit` functions +* [AUnitMoreTest](tests/AUnitMoreTest) + * more tests +* [AUnitMetaTest](tests/AUnitMetaTest) + * the unit test for meta assertions and `extern*()` macros +* [CompareTest](tests/CompareTest) + * tests for the low-level compare functions +* [FailingTest](tests/FailingTest) + * tests that are expected to fail +* [FilterTest](tests/FilterTest) + * manual tests for `include()` and `exclude()` filters +* [Print64Test](tests/Print64Test) + * manual tests for `include()` and `exclude()` filters +* [SetupAndTeardownTest](tests/SetupAndTeardownTest) + * tests to verify that `setup()` and `teardown()` are called properly by the + finite state machine +* [tests/Makefile](tests/Makefile) + * Runs the tests on a Linux or Mac machine using EpoxyDuino + +Perhaps the best way to see AUnit in action is through real life examples. All +my libraries use AUnit for testing and for continuous integration through +EpoxyDuino. Here are some of my libraries: * [AceButton](https://github.com/bxparks/AceButton) * My first Arduino library, which originally used ArduinoUnit 2.2. * I kept many of the original ArduinoUnit tests for backwards compatibility - testing. But over time, I started to use nore AUnit features. + testing. But over time, I started to use more AUnit features so I'm not + sure if they work with ArduinoUnit anymore. * [AceCRC](https://github.com/bxparks/AceCRC) * [AceCommon](https://github.com/bxparks/AceCommon) * [AceRoutine](https://github.com/bxparks/AceRoutine) * [AceSegment](https://github.com/bxparks/AceSegment) * [AceSorting](https://github.com/bxparks/AceSorting) -* [AceTimeClock](https://github.com/bxparks/AceTimeClock) * [AceTime](https://github.com/bxparks/AceTime) @@ -518,7 +552,7 @@ SampleTest.ino:10: Assertion failed: (2) == (1) The format of the assertion failure messages was changed in v1.7 to the following: ``` -{filName}:{lineNumber}: Assertion failed: {expression} +{fileName}:{lineNumber}: Assertion failed: {expression} ``` This format is a widely used in many other programs, for example, the C compiler @@ -1476,9 +1510,6 @@ copied from the `AUniter/README.md` file: * list the available serial ports and devices * `$ auniter verify nano Blink.ino` * verify (compile) `Blink.ino` using the `env:nano` environment -* `$ auniter verify nano,esp8266,esp32 Blink.ino` - * verify `Blink.ino` on 3 target environments (`env:nano`, `env:esp8266`, - `env:esp32`) * `$ auniter upload nano:/dev/ttyUSB0 Blink.ino` * upload `Blink.ino` to the `env:nano` target environment connected to `/dev/ttyUSB0` @@ -1486,11 +1517,9 @@ copied from the `AUniter/README.md` file: * compile and upload `BlinkTest.ino` using the `env:nano` environment, upload it to the board at `/dev/ttyUSB0`, then validate the output of the [AUnit](https://github.com/bxparks/AUnit) unit test -* `$ auniter test nano:USB0,esp8266:USB1,esp32:USB2 BlinkTest/ ClockTest/` +* `$ auniter test nano:USB0 BlinkTest/ ClockTest/` * upload and verify the 2 unit tests (`BlinkTest/BlinkTest.ino`, - `ClockTest/ClockTest.ino`) on 3 target environments (`env:nano`, - `env:esp8266`, `env:esp32`) located at the 3 respective ports - (`/dev/ttyUSB0`, `/dev/ttyUSB1`, `/dev/ttyUSB2`) + `ClockTest/ClockTest.ino`) on the target environment (`env:nano`) * `$ auniter upmon nano:USB0 Blink.ino` * upload the `Blink.ino` sketch and monitor the serial port using a user-configurable terminal program (e.g. `picocom`) on `/dev/ttyUSB0` @@ -1528,10 +1557,22 @@ For real Arduino boards, you get more reliable unit tests if you add a necessary, so I recommend calling this only on real Arduino boards, like this: ```C++ void setup() { -#ifdef ARDUINO +#if ! defined(EPOXY_DUINO) delay(1000); // Wait for stability on some boards, otherwise garage on Serial #endif + + Serial.begin(115200); + while (! Serial); // Wait until Serial is ready - Leonardo/Micro + +#if defined(EPOXY_DUINO) + Serial.setLineModeUnix(); // use Unix line terminator instead of DOS +#endif ... +} + +void loop() { + aunit::TestRunner::run(); +} ``` **Exit() Status Code** @@ -1881,13 +1922,50 @@ testF(TargetTest, helper) { ``` The tricky part is that `Target.h` must have forward declarations of the various -auto-generated AUnit test classes. And within the `Target` class itsef, the +auto-generated AUnit test classes. And within the `Target` class itself, the `friend` declarations need to have a global scope `::` specifier before the name of the test class. ## Benchmarks + +### MemoryBenchmark + +The [MemoryBenchmark](examples/MemoryBenchmark/) directory collects the flash +and static RAM usage of the AUnit library on various microcontroller boards, and +renders the results as tables embedded in the README.md file. Here are 2 +highlights: + +**Arduino Nano (8-bit)** + +``` ++---------------------------------------------------------------------+ +| Functionality | flash/ ram | delta | +|----------------------------------------+--------------+-------------| +| Baseline | 1586/ 185 | 0/ 0 | +|----------------------------------------+--------------+-------------| +| AUnit Single Test | 4456/ 366 | 2870/ 181 | +| AUnit Single Test Verbose | 4500/ 366 | 2914/ 181 | ++---------------------------------------------------------------------+ +``` + +**ESP8266 (32-bit)** + +``` ++---------------------------------------------------------------------+ +| Functionality | flash/ ram | delta | +|----------------------------------------+--------------+-------------| +| Baseline | 264949/27984 | 0/ 0 | +|----------------------------------------+--------------+-------------| +| AUnit Single Test | 268021/28148 | 3072/ 164 | +| AUnit Single Test Verbose | 268081/28148 | 3132/ 164 | ++---------------------------------------------------------------------+ +``` + + +### Compared to ArduinoUnit 2.2 + AUnit consumes as much as 65% less flash memory than ArduinoUnit 2.2 on an AVR platform (e.g. Arduino UNO, Nano), and 30% less flash on the Teensy-ARM platform (e.g. Teensy LC ). (ArduinoUnit 2.3 reduces the flash memory by 30% or so, which @@ -1929,34 +2007,52 @@ AUnit, but a savings of 30-50% seems to be common. ### Hardware -The library is tested on the following boards: +**Tier 1: Fully supported** + +These boards are tested on each release: * Arduino Nano clone (16 MHz ATmega328P) * SparkFun Pro Micro clone (16 MHz ATmega32U4) -* SAMD21 M0 Mini board (Arduino Zero compatible, 48 MHz ARM Cortex-M0+) +* Seeeduino XIAO M0 (SAMD21, 48 MHz ARM Cortex-M0+) * STM32 Blue Pill (STM32F103C8, 72 MHz ARM Cortex-M3) +* Adafruit ItsyBitsy M4 (SAMD51, 120 MHz ARM Cortext-M4) * NodeMCU 1.0 (ESP-12E module, 80 MHz ESP8266) * WeMos D1 Mini (ESP-12E module, 80 MHz ESP8266) * ESP32 dev board (ESP-WROOM-32 module, 240 MHz dual core Tensilica LX6) -* Teensy 3.2 (96 MHz ARM Cortex-M4) -I will occasionally test on the following hardware as a sanity check: +**Tier 2: Should work** + +These boards should work but I don't test them as often: * Arduino Pro Mini (16 MHz ATmega328P) * Mini Mega 2560 (Arduino Mega 2560 compatible, 16 MHz ATmega2560) * Teensy LC (48 MHz ARM Cortex-M0+) +* Teensy 3.2 (96 MHz ARM Cortex-M4) + +**Tier 3: May work, but not supported** -The following boards are **not** supported: +* Other 3rd party SAMD21 and SAMD51 boards *may* work if their board software + uses the traditional Arduino API, instead of the + [ArduinoCore-API](https://github.com/arduino/ArduinoCore-api) -* Any platform using the ArduinoCore-API - (https://github.com/arduino/ArduinoCore-api), such as: - * megaAVR (e.g. Nano Every) using ArduinoCore-megaavr - (https://github.com/arduino/ArduinoCore-megaavr/) - * SAMD21 boards (e.g. MKRZero) using ArduinoCore-samd - (https://github.com/arduino/ArduinoCore-samd) starting with - `arduino:samd` version >= 1.8.10 - * Raspberry Pi Pico (RP2040) using Arduino-Pico - (https://github.com/earlephilhower/arduino-pico) +**Tier Blacklisted** + +The following boards are *not* supported and are explicitly blacklisted to allow +the compiler to print useful error messages instead of hundreds of lines of +compiler errors: + +* Any platform using the + [ArduinoCore-API](https://github.com/arduino/ArduinoCore-api), such as: + * Arduino-branded megaAVR using + [ArduinoCore-megaavr](https://github.com/arduino/ArduinoCore-megaavr/) + * Nano Every + * Arduino-branded SAMD21 or SAMD51 boards using + [ArduinoCore-samd](https://github.com/arduino/ArduinoCore-samd) after + version >= 1.8.10 + * MKRZero + * Nano 33 IoT + * Raspberry Pi Pico (RP2040) using + [Arduino-Pico](https://github.com/earlephilhower/arduino-pico) ### Tool Chain @@ -1964,15 +2060,16 @@ The following boards are **not** supported: This library was validated using: * [Arduino IDE 1.8.19](https://www.arduino.cc/en/Main/Software) -* [Arduino CLI 0.19.2](https://arduino.github.io/arduino-cli) -* [Arduino AVR Boards 1.8.4](https://github.com/arduino/ArduinoCore-avr) +* [Arduino CLI 0.33.0](https://arduino.github.io/arduino-cli) +* [Arduino AVR Boards 1.8.6](https://github.com/arduino/ArduinoCore-avr) * [Arduino SAMD Boards 1.8.9](https://github.com/arduino/ArduinoCore-samd) + (versions >= 1.8.10 not supported) * [SparkFun AVR Boards 1.1.13](https://github.com/sparkfun/Arduino_Boards) * [SparkFun SAMD Boards 1.8.6](https://github.com/sparkfun/Arduino_Boards) -* [STM32duino 2.2.0](https://github.com/stm32duino/Arduino_Core_STM32) +* [STM32duino 2.5.0](https://github.com/stm32duino/Arduino_Core_STM32) * [ESP8266 Arduino 3.0.2](https://github.com/esp8266/Arduino) -* [ESP32 Arduino 2.0.2](https://github.com/espressif/arduino-esp32) -* [Teensyduino 1.56](https://www.pjrc.com/teensy/td_download.html) +* [ESP32 Arduino 2.0.9](https://github.com/espressif/arduino-esp32) +* [Teensyduino 1.57](https://www.pjrc.com/teensy/td_download.html) This library is *not* compatible with: diff --git a/docs/doxygen.cfg b/docs/doxygen.cfg index aeaddbb..1f0cb58 100644 --- a/docs/doxygen.cfg +++ b/docs/doxygen.cfg @@ -1,4 +1,4 @@ -# Doxyfile 1.8.17 +# Doxyfile 1.9.1 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. @@ -32,13 +32,13 @@ DOXYFILE_ENCODING = UTF-8 # title of most generated pages and in a few other places. # The default value is: My Project. -PROJECT_NAME = "AUnit" +PROJECT_NAME = AUnit # The PROJECT_NUMBER tag can be used to enter a project or revision number. This # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 1.7.0 +PROJECT_NUMBER = 1.7.1 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a @@ -227,6 +227,14 @@ QT_AUTOBRIEF = NO MULTILINE_CPP_IS_BRIEF = NO +# By default Python docstrings are displayed as preformatted text and doxygen's +# special commands cannot be used. By setting PYTHON_DOCSTRING to NO the +# doxygen's special commands can be used and the contents of the docstring +# documentation blocks is shown as doxygen documentation. +# The default value is: YES. + +PYTHON_DOCSTRING = YES + # If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the # documentation from any documented member that it re-implements. # The default value is: YES. @@ -263,12 +271,6 @@ TAB_SIZE = 4 ALIASES = -# This tag can be used to specify a number of word-keyword mappings (TCL only). -# A mapping has the form "name=value". For example adding "class=itcl::class" -# will allow you to use the command class in the itcl::class meaning. - -TCL_SUBST = - # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources # only. Doxygen will then generate output that is more tailored for C. For # instance, some of the names that are used will be different. The list of all @@ -310,18 +312,21 @@ OPTIMIZE_OUTPUT_SLICE = NO # extension. Doxygen has a built-in mapping, but you can override or extend it # using this tag. The format is ext=language, where ext is a file extension, and # language is one of the parsers supported by doxygen: IDL, Java, JavaScript, -# Csharp (C#), C, C++, D, PHP, md (Markdown), Objective-C, Python, Slice, +# Csharp (C#), C, C++, D, PHP, md (Markdown), Objective-C, Python, Slice, VHDL, # Fortran (fixed format Fortran: FortranFixed, free formatted Fortran: # FortranFree, unknown formatted Fortran: Fortran. In the later case the parser # tries to guess whether the code is fixed or free formatted code, this is the -# default for Fortran type files), VHDL, tcl. For instance to make doxygen treat -# .inc files as Fortran files (default is PHP), and .f files as C (default is -# Fortran), use: inc=Fortran f=C. +# default for Fortran type files). For instance to make doxygen treat .inc files +# as Fortran files (default is PHP), and .f files as C (default is Fortran), +# use: inc=Fortran f=C. # # Note: For files without extension you can use no_extension as a placeholder. # # Note that for custom extensions you also need to set FILE_PATTERNS otherwise -# the files are not read by doxygen. +# the files are not read by doxygen. When specifying no_extension you should add +# * to the FILE_PATTERNS. +# +# Note see also the list of default file extension mappings. EXTENSION_MAPPING = @@ -455,6 +460,19 @@ TYPEDEF_HIDES_STRUCT = NO LOOKUP_CACHE_SIZE = 0 +# The NUM_PROC_THREADS specifies the number threads doxygen is allowed to use +# during processing. When set to 0 doxygen will based this on the number of +# cores available in the system. You can set it explicitly to a value larger +# than 0 to get more control over the balance between CPU load and processing +# speed. At this moment only the input processing can be done using multiple +# threads. Since this is still an experimental feature the default is set to 1, +# which efficively disables parallel processing. Please report any issues you +# encounter. Generating dot graphs in parallel is controlled by the +# DOT_NUM_THREADS setting. +# Minimum value: 0, maximum value: 32, default value: 1. + +NUM_PROC_THREADS = 1 + #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- @@ -518,6 +536,13 @@ EXTRACT_LOCAL_METHODS = NO EXTRACT_ANON_NSPACES = NO +# If this flag is set to YES, the name of an unnamed parameter in a declaration +# will be determined by the corresponding definition. By default unnamed +# parameters remain unnamed in the output. +# The default value is: YES. + +RESOLVE_UNNAMED_PARAMS = YES + # If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all # undocumented members inside documented classes or files. If set to NO these # members will be included in the various overviews, but no documentation @@ -555,11 +580,18 @@ HIDE_IN_BODY_DOCS = NO INTERNAL_DOCS = NO -# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file -# names in lower-case letters. If set to YES, upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# (including Cygwin) ands Mac users are advised to set this option to NO. +# With the correct setting of option CASE_SENSE_NAMES doxygen will better be +# able to match the capabilities of the underlying filesystem. In case the +# filesystem is case sensitive (i.e. it supports files in the same directory +# whose names only differ in casing), the option must be set to YES to properly +# deal with such files in case they appear in the input. For filesystems that +# are not case sensitive the option should be be set to NO to properly deal with +# output files written for symbols that only differ in casing, such as for two +# classes, one named CLASS and the other named Class, and to also support +# references to files without having to specify the exact matching casing. On +# Windows (including Cygwin) and MacOS, users should typically set this option +# to NO, whereas on Linux or other Unix flavors it should typically be set to +# YES. # The default value is: system dependent. CASE_SENSE_NAMES = YES @@ -798,7 +830,10 @@ WARN_IF_DOC_ERROR = YES WARN_NO_PARAMDOC = NO # If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when -# a warning is encountered. +# a warning is encountered. If the WARN_AS_ERROR tag is set to FAIL_ON_WARNINGS +# then doxygen will continue running as if WARN_AS_ERROR tag is set to NO, but +# at the end of the doxygen process doxygen will return with a non-zero status. +# Possible values are: NO, YES and FAIL_ON_WARNINGS. # The default value is: NO. WARN_AS_ERROR = NO @@ -834,8 +869,8 @@ INPUT = ../src # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses # libiconv (or the iconv built into libc) for the transcoding. See the libiconv -# documentation (see: https://www.gnu.org/software/libiconv/) for the list of -# possible encodings. +# documentation (see: +# https://www.gnu.org/software/libiconv/) for the list of possible encodings. # The default value is: UTF-8. INPUT_ENCODING = UTF-8 @@ -848,13 +883,15 @@ INPUT_ENCODING = UTF-8 # need to set EXTENSION_MAPPING for the extension otherwise the files are not # read by doxygen. # +# Note the list of default checked file patterns might differ from the list of +# default file extension mappings. +# # If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, # *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, # *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, # *.m, *.markdown, *.md, *.mm, *.dox (to be provided as doxygen C comment), -# *.doc (to be provided as doxygen C comment), *.txt (to be provided as doxygen -# C comment), *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f, *.for, *.tcl, *.vhd, -# *.vhdl, *.ucf, *.qsf and *.ice. +# *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f18, *.f, *.for, *.vhd, *.vhdl, +# *.ucf, *.qsf and *.ice. FILE_PATTERNS = *.c \ *.cc \ @@ -1112,16 +1149,22 @@ USE_HTAGS = NO VERBATIM_HEADERS = YES # If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the -# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the -# cost of reduced performance. This can be particularly helpful with template -# rich C++ code for which doxygen's built-in parser lacks the necessary type -# information. +# clang parser (see: +# http://clang.llvm.org/) for more accurate parsing at the cost of reduced +# performance. This can be particularly helpful with template rich C++ code for +# which doxygen's built-in parser lacks the necessary type information. # Note: The availability of this option depends on whether or not doxygen was # generated with the -Duse_libclang=ON option for CMake. # The default value is: NO. CLANG_ASSISTED_PARSING = NO +# If clang assisted parsing is enabled and the CLANG_ADD_INC_PATHS tag is set to +# YES then doxygen will add the directory of each input to the include path. +# The default value is: YES. + +CLANG_ADD_INC_PATHS = YES + # If clang assisted parsing is enabled you can provide the compiler with command # line options that you would normally use when invoking the compiler. Note that # the include paths will already be set by doxygen for the files and directories @@ -1131,10 +1174,13 @@ CLANG_ASSISTED_PARSING = NO CLANG_OPTIONS = # If clang assisted parsing is enabled you can provide the clang parser with the -# path to the compilation database (see: -# http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html) used when the files -# were built. This is equivalent to specifying the "-p" option to a clang tool, -# such as clang-check. These options will then be passed to the parser. +# path to the directory containing a file called compile_commands.json. This +# file is the compilation database (see: +# http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html) containing the +# options used when the source files were built. This is equivalent to +# specifying the -p option to a clang tool, such as clang-check. These options +# will then be passed to the parser. Any options specified with CLANG_OPTIONS +# will be added as well. # Note: The availability of this option depends on whether or not doxygen was # generated with the -Duse_libclang=ON option for CMake. @@ -1151,13 +1197,6 @@ CLANG_DATABASE_PATH = ALPHABETICAL_INDEX = YES -# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in -# which the alphabetical index list will be split. -# Minimum value: 1, maximum value: 20, default value: 5. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -COLS_IN_ALPHA_INDEX = 5 - # In case all classes in a project start with a common prefix, all classes will # be put under the same header in the alphabetical index. The IGNORE_PREFIX tag # can be used to specify a prefix (or a list of prefixes) that should be ignored @@ -1328,10 +1367,11 @@ HTML_INDEX_NUM_ENTRIES = 100 # If the GENERATE_DOCSET tag is set to YES, additional index files will be # generated that can be used as input for Apple's Xcode 3 integrated development -# environment (see: https://developer.apple.com/xcode/), introduced with OSX -# 10.5 (Leopard). To create a documentation set, doxygen will generate a -# Makefile in the HTML output directory. Running make will produce the docset in -# that directory and running make install will install the docset in +# environment (see: +# https://developer.apple.com/xcode/), introduced with OSX 10.5 (Leopard). To +# create a documentation set, doxygen will generate a Makefile in the HTML +# output directory. Running make will produce the docset in that directory and +# running make install will install the docset in # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at # startup. See https://developer.apple.com/library/archive/featuredarticles/Doxy # genXcode/_index.html for more information. @@ -1373,8 +1413,8 @@ DOCSET_PUBLISHER_NAME = Publisher # If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three # additional HTML index files: index.hhp, index.hhc, and index.hhk. The # index.hhp is a project file that can be read by Microsoft's HTML Help Workshop -# (see: https://www.microsoft.com/en-us/download/details.aspx?id=21138) on -# Windows. +# (see: +# https://www.microsoft.com/en-us/download/details.aspx?id=21138) on Windows. # # The HTML Help Workshop contains a compiler that can convert all HTML output # generated by doxygen into a single compiled HTML file (.chm). Compiled HTML @@ -1404,7 +1444,7 @@ CHM_FILE = HHC_LOCATION = # The GENERATE_CHI flag controls if a separate .chi index file is generated -# (YES) or that it should be included in the master .chm file (NO). +# (YES) or that it should be included in the main .chm file (NO). # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. @@ -1449,7 +1489,8 @@ QCH_FILE = # The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help # Project output. For more information please see Qt Help Project / Namespace -# (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace). +# (see: +# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace). # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_QHP is set to YES. @@ -1457,8 +1498,8 @@ QHP_NAMESPACE = org.doxygen.Project # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt # Help Project output. For more information please see Qt Help Project / Virtual -# Folders (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual- -# folders). +# Folders (see: +# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual-folders). # The default value is: doc. # This tag requires that the tag GENERATE_QHP is set to YES. @@ -1466,16 +1507,16 @@ QHP_VIRTUAL_FOLDER = doc # If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom # filter to add. For more information please see Qt Help Project / Custom -# Filters (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom- -# filters). +# Filters (see: +# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_CUST_FILTER_NAME = # The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the # custom filter to add. For more information please see Qt Help Project / Custom -# Filters (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom- -# filters). +# Filters (see: +# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_CUST_FILTER_ATTRS = @@ -1487,9 +1528,9 @@ QHP_CUST_FILTER_ATTRS = QHP_SECT_FILTER_ATTRS = -# The QHG_LOCATION tag can be used to specify the location of Qt's -# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the -# generated .qhp file. +# The QHG_LOCATION tag can be used to specify the location (absolute path +# including file name) of Qt's qhelpgenerator. If non-empty doxygen will try to +# run qhelpgenerator on the generated .qhp file. # This tag requires that the tag GENERATE_QHP is set to YES. QHG_LOCATION = @@ -1566,6 +1607,17 @@ TREEVIEW_WIDTH = 250 EXT_LINKS_IN_WINDOW = NO +# If the HTML_FORMULA_FORMAT option is set to svg, doxygen will use the pdf2svg +# tool (see https://github.com/dawbarton/pdf2svg) or inkscape (see +# https://inkscape.org) to generate formulas as SVG images instead of PNGs for +# the HTML output. These images will generally look nicer at scaled resolutions. +# Possible values are: png (the default) and svg (looks nicer but requires the +# pdf2svg or inkscape tool). +# The default value is: png. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FORMULA_FORMAT = png + # Use this tag to change the font size of LaTeX formulas included as images in # the HTML documentation. When you change the font size after a successful # doxygen run you need to manually remove any form_*.png images from the HTML @@ -1605,7 +1657,7 @@ USE_MATHJAX = NO # When MathJax is enabled you can set the default output format to be used for # the MathJax output. See the MathJax site (see: -# http://docs.mathjax.org/en/latest/output.html) for more details. +# http://docs.mathjax.org/en/v2.7-latest/output.html) for more details. # Possible values are: HTML-CSS (which is slower, but has the best # compatibility), NativeMML (i.e. MathML) and SVG. # The default value is: HTML-CSS. @@ -1621,7 +1673,7 @@ MATHJAX_FORMAT = HTML-CSS # Content Delivery Network so you can quickly see the result without installing # MathJax. However, it is strongly recommended to install a local copy of # MathJax from https://www.mathjax.org before deployment. -# The default value is: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/. +# The default value is: https://cdn.jsdelivr.net/npm/mathjax@2. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest @@ -1635,7 +1687,8 @@ MATHJAX_EXTENSIONS = # The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces # of code that will be used on startup of the MathJax code. See the MathJax site -# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an +# (see: +# http://docs.mathjax.org/en/v2.7-latest/output.html) for more details. For an # example see the documentation. # This tag requires that the tag USE_MATHJAX is set to YES. @@ -1682,7 +1735,8 @@ SERVER_BASED_SEARCH = NO # # Doxygen ships with an example indexer (doxyindexer) and search engine # (doxysearch.cgi) which are based on the open source search engine library -# Xapian (see: https://xapian.org/). +# Xapian (see: +# https://xapian.org/). # # See the section "External Indexing and Searching" for details. # The default value is: NO. @@ -1695,8 +1749,9 @@ EXTERNAL_SEARCH = NO # # Doxygen ships with an example indexer (doxyindexer) and search engine # (doxysearch.cgi) which are based on the open source search engine library -# Xapian (see: https://xapian.org/). See the section "External Indexing and -# Searching" for details. +# Xapian (see: +# https://xapian.org/). See the section "External Indexing and Searching" for +# details. # This tag requires that the tag SEARCHENGINE is set to YES. SEARCHENGINE_URL = @@ -1860,9 +1915,11 @@ LATEX_EXTRA_FILES = PDF_HYPERLINKS = YES -# If the USE_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate -# the PDF file directly from the LaTeX files. Set this option to YES, to get a -# higher quality PDF documentation. +# If the USE_PDFLATEX tag is set to YES, doxygen will use the engine as +# specified with LATEX_CMD_NAME to generate the PDF file directly from the LaTeX +# files. Set this option to YES, to get a higher quality PDF documentation. +# +# See also section LATEX_CMD_NAME for selecting the engine. # The default value is: YES. # This tag requires that the tag GENERATE_LATEX is set to YES. @@ -2373,10 +2430,32 @@ UML_LOOK = NO # but if the number exceeds 15, the total amount of fields shown is limited to # 10. # Minimum value: 0, maximum value: 100, default value: 10. -# This tag requires that the tag HAVE_DOT is set to YES. +# This tag requires that the tag UML_LOOK is set to YES. UML_LIMIT_NUM_FIELDS = 10 +# If the DOT_UML_DETAILS tag is set to NO, doxygen will show attributes and +# methods without types and arguments in the UML graphs. If the DOT_UML_DETAILS +# tag is set to YES, doxygen will add type and arguments for attributes and +# methods in the UML graphs. If the DOT_UML_DETAILS tag is set to NONE, doxygen +# will not generate fields with class member information in the UML graphs. The +# class diagrams will look similar to the default class diagrams but using UML +# notation for the relationships. +# Possible values are: NO, YES and NONE. +# The default value is: NO. +# This tag requires that the tag UML_LOOK is set to YES. + +DOT_UML_DETAILS = NO + +# The DOT_WRAP_THRESHOLD tag can be used to set the maximum number of characters +# to display on a single line. If the actual line length exceeds this threshold +# significantly it will wrapped across multiple lines. Some heuristics are apply +# to avoid ugly line breaks. +# Minimum value: 0, maximum value: 1000, default value: 17. +# This tag requires that the tag HAVE_DOT is set to YES. + +DOT_WRAP_THRESHOLD = 17 + # If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and # collaboration graphs will show the relations between templates and their # instances. @@ -2568,9 +2647,11 @@ DOT_MULTI_TARGETS = NO GENERATE_LEGEND = YES -# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate dot +# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate # files that are used to generate the various graphs. +# +# Note: This setting is not only used for dot files but also for msc and +# plantuml temporary files. # The default value is: YES. -# This tag requires that the tag HAVE_DOT is set to YES. DOT_CLEANUP = YES diff --git a/docs/html/AUnitVerbose_8h.html b/docs/html/AUnitVerbose_8h.html index db5752b..d24e1de 100644 --- a/docs/html/AUnitVerbose_8h.html +++ b/docs/html/AUnitVerbose_8h.html @@ -22,7 +22,7 @@
AUnit -  1.7.0 +  1.7.1
Unit testing framework for Arduino platforms inspired by ArduinoUnit and Google Test.
@@ -123,10 +123,10 @@

Macros

-#define AUNIT_VERSION   10700 +#define AUNIT_VERSION   10701   -#define AUNIT_VERSION_STRING   "1.7.0" +#define AUNIT_VERSION_STRING   "1.7.1"  

Detailed Description

diff --git a/docs/html/AUnitVerbose_8h_source.html b/docs/html/AUnitVerbose_8h_source.html index 3724202..1e3b5d7 100644 --- a/docs/html/AUnitVerbose_8h_source.html +++ b/docs/html/AUnitVerbose_8h_source.html @@ -22,7 +22,7 @@
AUnit -  1.7.0 +  1.7.1
Unit testing framework for Arduino platforms inspired by ArduinoUnit and Google Test.
@@ -118,8 +118,8 @@
55 #include "aunit/TestMacros.h"
56 
57 // Version format: xxyyzz == "xx.yy.zz"
-
58 #define AUNIT_VERSION 10700
-
59 #define AUNIT_VERSION_STRING "1.7.0"
+
58 #define AUNIT_VERSION 10701
+
59 #define AUNIT_VERSION_STRING "1.7.1"
60 
61 #endif
AssertVerboseMacros.h
Verbose versions of the macros in AssertMacros.h.
diff --git a/docs/html/AUnit_8h.html b/docs/html/AUnit_8h.html index ccb306a..640ebdd 100644 --- a/docs/html/AUnit_8h.html +++ b/docs/html/AUnit_8h.html @@ -22,7 +22,7 @@
AUnit -  1.7.0 +  1.7.1
Unit testing framework for Arduino platforms inspired by ArduinoUnit and Google Test.
@@ -123,10 +123,10 @@

Macros

-#define AUNIT_VERSION   10700 +#define AUNIT_VERSION   10701   -#define AUNIT_VERSION_STRING   "1.7.0" +#define AUNIT_VERSION_STRING   "1.7.1"  

Detailed Description

diff --git a/docs/html/AUnit_8h_source.html b/docs/html/AUnit_8h_source.html index 3531dc4..e7d2a1a 100644 --- a/docs/html/AUnit_8h_source.html +++ b/docs/html/AUnit_8h_source.html @@ -22,7 +22,7 @@
AUnit -  1.7.0 +  1.7.1
Unit testing framework for Arduino platforms inspired by ArduinoUnit and Google Test.
@@ -118,8 +118,8 @@
65 #include "aunit/TestMacros.h"
66 
67 // Version format: xxyyzz == "xx.yy.zz"
-
68 #define AUNIT_VERSION 10700
-
69 #define AUNIT_VERSION_STRING "1.7.0"
+
68 #define AUNIT_VERSION 10701
+
69 #define AUNIT_VERSION_STRING "1.7.1"
70 
71 #endif
AssertMacros.h
Various assertion macros (assertXxx()) are defined in this header.
diff --git a/docs/html/AssertMacros_8h.html b/docs/html/AssertMacros_8h.html index 79620da..ec39b3f 100644 --- a/docs/html/AssertMacros_8h.html +++ b/docs/html/AssertMacros_8h.html @@ -22,7 +22,7 @@
AUnit -  1.7.0 +  1.7.1
Unit testing framework for Arduino platforms inspired by ArduinoUnit and Google Test.
diff --git a/docs/html/AssertMacros_8h_source.html b/docs/html/AssertMacros_8h_source.html index aa2cedd..d355aaa 100644 --- a/docs/html/AssertMacros_8h_source.html +++ b/docs/html/AssertMacros_8h_source.html @@ -22,7 +22,7 @@
AUnit -  1.7.0 +  1.7.1
Unit testing framework for Arduino platforms inspired by ArduinoUnit and Google Test.
diff --git a/docs/html/AssertVerboseMacros_8h.html b/docs/html/AssertVerboseMacros_8h.html index 896161a..1d583cc 100644 --- a/docs/html/AssertVerboseMacros_8h.html +++ b/docs/html/AssertVerboseMacros_8h.html @@ -22,7 +22,7 @@
AUnit -  1.7.0 +  1.7.1
Unit testing framework for Arduino platforms inspired by ArduinoUnit and Google Test.
diff --git a/docs/html/AssertVerboseMacros_8h_source.html b/docs/html/AssertVerboseMacros_8h_source.html index 1ee906a..b536800 100644 --- a/docs/html/AssertVerboseMacros_8h_source.html +++ b/docs/html/AssertVerboseMacros_8h_source.html @@ -22,7 +22,7 @@
AUnit -  1.7.0 +  1.7.1
Unit testing framework for Arduino platforms inspired by ArduinoUnit and Google Test.
diff --git a/docs/html/Assertion_8cpp_source.html b/docs/html/Assertion_8cpp_source.html index fd206da..31e6b04 100644 --- a/docs/html/Assertion_8cpp_source.html +++ b/docs/html/Assertion_8cpp_source.html @@ -22,7 +22,7 @@
AUnit -  1.7.0 +  1.7.1
Unit testing framework for Arduino platforms inspired by ArduinoUnit and Google Test.
diff --git a/docs/html/Assertion_8h_source.html b/docs/html/Assertion_8h_source.html index 986cecf..e4a5e0d 100644 --- a/docs/html/Assertion_8h_source.html +++ b/docs/html/Assertion_8h_source.html @@ -22,7 +22,7 @@
AUnit -  1.7.0 +  1.7.1
Unit testing framework for Arduino platforms inspired by ArduinoUnit and Google Test.
diff --git a/docs/html/Compare_8cpp_source.html b/docs/html/Compare_8cpp_source.html index bf3def3..ff799c5 100644 --- a/docs/html/Compare_8cpp_source.html +++ b/docs/html/Compare_8cpp_source.html @@ -22,7 +22,7 @@
AUnit -  1.7.0 +  1.7.1
Unit testing framework for Arduino platforms inspired by ArduinoUnit and Google Test.
diff --git a/docs/html/Compare_8h.html b/docs/html/Compare_8h.html index 078142b..2b983e3 100644 --- a/docs/html/Compare_8h.html +++ b/docs/html/Compare_8h.html @@ -22,7 +22,7 @@
AUnit -  1.7.0 +  1.7.1
Unit testing framework for Arduino platforms inspired by ArduinoUnit and Google Test.
diff --git a/docs/html/Compare_8h_source.html b/docs/html/Compare_8h_source.html index 57fedb0..9000219 100644 --- a/docs/html/Compare_8h_source.html +++ b/docs/html/Compare_8h_source.html @@ -22,7 +22,7 @@
AUnit -  1.7.0 +  1.7.1
Unit testing framework for Arduino platforms inspired by ArduinoUnit and Google Test.
diff --git a/docs/html/FCString_8cpp_source.html b/docs/html/FCString_8cpp_source.html index 09a5979..877a840 100644 --- a/docs/html/FCString_8cpp_source.html +++ b/docs/html/FCString_8cpp_source.html @@ -22,7 +22,7 @@
AUnit -  1.7.0 +  1.7.1
Unit testing framework for Arduino platforms inspired by ArduinoUnit and Google Test.
diff --git a/docs/html/FCString_8h_source.html b/docs/html/FCString_8h_source.html index 89362c1..2f33ba4 100644 --- a/docs/html/FCString_8h_source.html +++ b/docs/html/FCString_8h_source.html @@ -22,7 +22,7 @@
AUnit -  1.7.0 +  1.7.1
Unit testing framework for Arduino platforms inspired by ArduinoUnit and Google Test.
diff --git a/docs/html/FakePrint_8h_source.html b/docs/html/FakePrint_8h_source.html index fbcda20..391560d 100644 --- a/docs/html/FakePrint_8h_source.html +++ b/docs/html/FakePrint_8h_source.html @@ -22,7 +22,7 @@
AUnit -  1.7.0 +  1.7.1
Unit testing framework for Arduino platforms inspired by ArduinoUnit and Google Test.
diff --git a/docs/html/Flash_8h.html b/docs/html/Flash_8h.html index 0b612eb..eefefd6 100644 --- a/docs/html/Flash_8h.html +++ b/docs/html/Flash_8h.html @@ -22,7 +22,7 @@
AUnit -  1.7.0 +  1.7.1
Unit testing framework for Arduino platforms inspired by ArduinoUnit and Google Test.
@@ -127,12 +127,14 @@

Detailed Description

Various macros to smooth over the differences among the various platforms with regards to their support for flash strings and the various macros used to create and access them.

On AVR, flash strings are fully supported through the F() and PSTR() macros, and the (const __FlashStringHelper*) pointer. However, the useful FPSTR() macro is not defined.

-

On Teensy-ARM, flash strings are not supported, but F(), PSTR() and (const __FlashStringHelper*) are defined. The useful FPSTR() macro is not defined.

+

Seeeduino SAMD core has a broken implementation of FPSTR(). This file clobbers that implementation.

+

Adafruit's SAMD core fixes the broken FPSTR(), so we don't have to do anything.

+

Arduino's SAMD core breaks backwards compatibility after version >= 1.8.10. AUnit does not support the ArduinoCore-API, so Arduino-branded SAMD boards are explicitly blacklisted.

STM32duino seems to have forked from Teensyduino, so it too has F() and PSTR(), but no FPSTR() macro.

-

On the ESP8266 platform, flash strings are implemented, and the F(), PSTR() and __FlashStringHelper are defined, but the implementation used to be brittle and fail with obscure errors messages. For a single compilation unit, a flash string could not be defined in both an inline and non-inline contexts (see https://github.com/esp8266/Arduino/issues/3369). This bug was fixed in Dec 2018, so we can use normal F(), PSTR(), and FPSTR() macros on the ESP8266.

-

On the ESP32, flash strings are not implemented, but the various F(), PSTR() and __FlashStringHelper symbols are defined for compatibility, similar to Teensy-ARM. Unfortunately, the implementation of FPSTR() was incorrectly defined (https://github.com/espressif/arduino-esp32/issues/1371), but the bug was fixed in ESP32 Core 1.0.3 around Sept 2019. Therefore, ESP32 can now use normal F(), PSTR() and FPSTR() macros.

-

On megaAVR, the F() does not return a (const __FlashStringHelper*), but returns a (const char*). Unfortunately, this breaks AUnit (https://github.com/bxparks/AUnit/issues/56) because a lot of code is generated through macros, which assume that the F() macro returns the correct type.

-

Previously, AUnit used the F() only for the AVR platforms. But with the various fixes, I think it can be activated for ESP8266 and other platforms. Except for megaAVR whose F() returns the wrong type.

+

The ESP8266 platform used to have flash strings which were buggy and brittle, and often failed with obscure errors messages, see for example, https://github.com/esp8266/Arduino/issues/3369. This bug was fixed in Dec 2018, so the ESP8266 is fully supported.

+

The ESP32 had a broken implementation of FPSTR() (https://github.com/espressif/arduino-esp32/issues/1371), but the bug was fixed in ESP32 Core 1.0.3 around Sept 2019. ESP32 is fully supported.

+

On Teensy-ARM, flash strings are not supported, but F(), PSTR() and (const __FlashStringHelper*) are defined. The useful FPSTR() macro is not defined.

+

The megaAVR had a broken implementation of the F() macro (does not return a const __FlashStringHelper*), but returns a (const char*)). But more importantly, megaAVR uses the ArrduinoCore-api which is blacklisted by AUnit, so the megaAVR (e.g. Nano Every) is not supported.

Definition in file Flash.h.

Macro Definition Documentation

@@ -155,7 +157,7 @@

Definition at line 78 of file Flash.h.

+

Definition at line 77 of file Flash.h.

diff --git a/docs/html/Flash_8h_source.html b/docs/html/Flash_8h_source.html index 10629fa..1c7dfe7 100644 --- a/docs/html/Flash_8h_source.html +++ b/docs/html/Flash_8h_source.html @@ -22,7 +22,7 @@
AUnit -  1.7.0 +  1.7.1
Unit testing framework for Arduino platforms inspired by ArduinoUnit and Google Test.
@@ -95,86 +95,92 @@
22 SOFTWARE.
23 */
24 
-
68 #ifndef AUNIT_FLASH_H
-
69 #define AUNIT_FLASH_H
-
70 
-
71 class __FlashStringHelper;
-
72 
-
78 #define AUNIT_FPSTR(pstr) reinterpret_cast<const __FlashStringHelper *>(pstr)
-
79 
-
80 #if defined(ARDUINO_ARCH_AVR)
-
81 
-
82  #include <avr/pgmspace.h>
-
83  #define AUNIT_F(x) F(x)
-
84 
-
85 #elif defined(ARDUINO_ARCH_SAMD)
-
86 
-
87  #include <avr/pgmspace.h>
-
88  #define AUNIT_F(x) F(x)
-
89 
-
90 #elif defined(ESP8266)
-
91 
-
92  #include <pgmspace.h>
-
93  #define AUNIT_F(x) F(x)
-
94 
-
95 #elif defined(ESP32)
+
67 #ifndef AUNIT_FLASH_H
+
68 #define AUNIT_FLASH_H
+
69 
+
70 class __FlashStringHelper;
+
71 
+
77 #define AUNIT_FPSTR(pstr) reinterpret_cast<const __FlashStringHelper *>(pstr)
+
78 
+
79 #if defined(ARDUINO_ARCH_AVR)
+
80 
+
81  #include <avr/pgmspace.h>
+
82  #define AUNIT_F(x) F(x)
+
83 
+
84 // Seeeduino SAMD21 Core is buggy, so we have to hack around it. Unfortunately,
+
85 // the Seeeduino core does not define an identifier for the following boards, so
+
86 // they are not supported:
+
87 // * Wio lite MG126
+
88 // * Wio GPS Board
+
89 // * Wio LTE CAT.1
+
90 #elif defined(SEEED_XIAO_M0) \
+
91  || defined(SEEEDUINO_ZERO) \
+
92  || defined(SEEED_FEMTO_M0) \
+
93  || defined(SEEEDUINO_LORAWAN) \
+
94  || defined(SEEED_WIO_TERMINAL) \
+
95  || defined(SEEED_GROVE_UI_WIRELESS)
96 
-
97  #include <pgmspace.h>
-
98  #define AUNIT_F(x) F(x)
-
99 
-
100  // ESP32 cores don't seem to define SERIAL_PORT_MONITOR
-
101  #if ! defined(SERIAL_PORT_MONITOR)
-
102  #define SERIAL_PORT_MONITOR Serial
-
103  #endif
+
97  #include <avr/pgmspace.h>
+
98 
+
99  // Seeeduino (as of 1.8.4) provides an incorrect definition of FPSTR()
+
100  // so we have to clobber it.
+
101  #undef FPSTR
+
102  #define FPSTR(p) (reinterpret_cast<const __FlashStringHelper *>(p))
+
103  #define AUNIT_F(x) F(x)
104 
-
105 #elif defined(ARDUINO_ARCH_STM32)
-
106 
-
107  #include <avr/pgmspace.h>
-
108  #define AUNIT_F(x) F(x)
-
109 
-
110 #elif defined(EPOXY_DUINO)
-
111 
-
112  #include <pgmspace.h>
-
113  #define AUNIT_F(x) F(x)
-
114 
-
115 #elif defined(ARDUINO_ARCH_MEGAAVR)
-
116 
-
117  #error MegaAVR not supported, https://github.com/bxparks/AUnit/issues/56
+
105 // The following should work for Adafruit SAMD core, and other third party SAMD
+
106 // (SparkFun?) cores which are less buggy. The Arduino SAMD Core breaks
+
107 // backwards compatibility for versions >= 1.8.10. It is blacklisted by the time
+
108 // we get here.
+
109 #elif defined(ARDUINO_ARCH_SAMD)
+
110 
+
111  #include <avr/pgmspace.h>
+
112  #define AUNIT_F(x) F(x)
+
113 
+
114 #elif defined(ESP8266)
+
115 
+
116  #include <pgmspace.h>
+
117  #define AUNIT_F(x) F(x)
118 
-
119 #else
+
119 #elif defined(ESP32)
120 
-
121  #warning Untested platform, AUnit may still work...
-
122 
-
123  #include <avr/pgmspace.h>
-
124  #define AUNIT_F(x) F(x)
-
125 
-
126  #if ! defined(SERIAL_PORT_MONITOR)
-
127  #define SERIAL_PORT_MONITOR Serial
-
128  #endif
-
129 
-
130 #endif
-
131 
-
132 // Define SERIAL_PORT_MONITOR consistently. We should also rename this file to
-
133 // something like "compat.h".
-
134 #if defined(ARDUINO_SAMD_ZERO)
-
135  // If have a real Arduino Zero and using the "Arduino/Genuino Zero (Native
-
136  // USB Port)" configuration on the Arduino IDE, you may need to uncomment
-
137  // the following to clobber SERIAL_PORT_MONITOR to point to the correct
-
138  // SerialUSB.
-
139  //
-
140  // On the other hand, if you are using a SparkFun breakout board, or one of
-
141  // the "SAMD21 M0 Mini" clones, you should be using the SparkFun SAMD Boards,
-
142  // and selecting the "SparkFun SAMD21 Dev Breakout" or the "SparkFun SAMD21
-
143  // Mini Breakout" settings, which will set the SERIAL_PORT_MONITOR macro
-
144  // correctly to SerialUSB.
-
145  #if 0
-
146  #undef SERIAL_PORT_MONITOR
-
147  #define SERIAL_PORT_MONITOR SerialUSB
-
148  #endif
-
149 
-
150 #endif // ARDUINO_SAMD_ZERO
-
151 
-
152 #endif // AUNIT_FLASH_H
+
121  #include <pgmspace.h>
+
122  #define AUNIT_F(x) F(x)
+
123 
+
124  // ESP32 cores don't seem to define SERIAL_PORT_MONITOR
+
125  #if ! defined(SERIAL_PORT_MONITOR)
+
126  #define SERIAL_PORT_MONITOR Serial
+
127  #endif
+
128 
+
129 #elif defined(ARDUINO_ARCH_STM32)
+
130 
+
131  #include <avr/pgmspace.h>
+
132  #define AUNIT_F(x) F(x)
+
133 
+
134 #elif defined(EPOXY_DUINO)
+
135 
+
136  #include <pgmspace.h>
+
137  #define AUNIT_F(x) F(x)
+
138 
+
139 #elif defined(TEENSYDUINO)
+
140 
+
141  #include <pgmspace.h>
+
142  #define AUNIT_F(x) F(x)
+
143 
+
144 #else
+
145 
+
146  #warning Untested platform, AUnit may still work...
+
147 
+
148  #include <avr/pgmspace.h>
+
149  #define AUNIT_F(x) F(x)
+
150 
+
151  #if ! defined(SERIAL_PORT_MONITOR)
+
152  #define SERIAL_PORT_MONITOR Serial
+
153  #endif
+
154 
+
155 #endif
+
156 
+
157 #endif // AUNIT_FLASH_H