Skip to content

Commit 34b99dc

Browse files
authored
Merge pull request #47 from bxparks/develop
merge v1.4.1 into master
2 parents b42183f + b3502a6 commit 34b99dc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+551
-532
lines changed

.github/workflows/aunit_tests.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on: [push]
55
jobs:
66
build:
77

8-
runs-on: ubuntu-18.04
8+
runs-on: ubuntu-20.04
99

1010
steps:
1111
- uses: actions/checkout@v2
@@ -20,6 +20,7 @@ jobs:
2020
- name: Verify examples
2121
run: |
2222
make -C examples
23+
make -C examples/MemoryBenchmark epoxy
2324
2425
- name: Run tests
2526
run: |

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,23 @@
11
# Changelog
22

33
* Unreleased
4+
* 1.4.1 (2022-02-02)
5+
* Update `examples/SoundManager` to demonstrate coroutines defined in
6+
separate files (see
7+
[Discussion#40](https://github.com/bxparks/AceRoutine/discussions/40)).
8+
* Update various unit tests to conform to EpoxyDuino v1.2.0 which
9+
reverts `Print::println()` to print `\r\n` instead of just `\n`.
10+
* Remove SAMD21 boards into new "Tier 3: May work but unsupported" tier
11+
because the SAMD21 tool chain no longer works for me, and Arduino SAMD21
12+
boards use the ArduinoCore-api which is incompatible.
13+
* Upgrade tool chain
14+
* Arduino IDE from 1.8.13 to 1.8.19
15+
* Arduino CLI from 0.14.0 to 0.19.2
16+
* Arduino AVR Core from 1.8.3 to 1.8.4
17+
* STM32duino from 2.0.0 to 2.2.0
18+
* ESP8266 Core from 2.7.4 to 3.0.2
19+
* ESP32 Core from 1.0.6 to 2.0.2
20+
* Teensyduino from 1.54 to 1.56
421
* 1.4.0 (2021-07-29)
522
* Upgrade STM32duino Core from 1.9.0 to 2.0.0.
623
* MemoryBenchmark: Flash usage increases by 2.3kB across the board, but

README.md

Lines changed: 76 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ This library is an implementation of the
1313
[ProtoThreads](http://dunkels.com/adam/pt) library for the
1414
Arduino platform. It emulates a stackless coroutine that can suspend execution
1515
using a `yield()` or `delay()` functionality to allow other coroutines to
16-
execute. When the scheduler makes it way back to the original coroutine, the
16+
execute. When the scheduler makes its way back to the original coroutine, the
1717
execution continues right after the `yield()` or `delay()`.
1818

1919
There are only 3 classes in this library:
@@ -104,7 +104,7 @@ AceRoutine is a self-contained library that works on any platform supporting the
104104
Arduino API (AVR, Teensy, ESP8266, ESP32, etc), and it provides a handful of
105105
additional macros that can reduce boilerplate code.
106106

107-
**Version**: 1.4.0 (2021-07-29)
107+
**Version**: 1.4.1 (2022-02-02)
108108

109109
**Changelog**: [CHANGELOG.md](CHANGELOG.md)
110110

@@ -542,37 +542,37 @@ etc) for a handful of AceRoutine features. Here are some highlights:
542542
+--------------------------------------------------------------------+
543543
| functionality | flash/ ram | delta |
544544
|---------------------------------------+--------------+-------------|
545-
| Baseline | 256924/26800 | 0/ 0 |
545+
| Baseline | 260329/27916 | 0/ 0 |
546546
|---------------------------------------+--------------+-------------|
547-
| One Delay Function | 256988/26808 | 64/ 8 |
548-
| Two Delay Functions | 257052/26808 | 128/ 8 |
547+
| One Delay Function | 260377/27916 | 48/ 0 |
548+
| Two Delay Functions | 260441/27916 | 112/ 0 |
549549
|---------------------------------------+--------------+-------------|
550-
| One Coroutine | 257120/26820 | 196/ 20 |
551-
| Two Coroutines | 257280/26844 | 356/ 44 |
550+
| One Coroutine | 260525/27944 | 196/ 28 |
551+
| Two Coroutines | 260669/27960 | 340/ 44 |
552552
|---------------------------------------+--------------+-------------|
553-
| One Coroutine (micros) | 257136/26820 | 212/ 20 |
554-
| Two Coroutines (micros) | 257296/26844 | 372/ 44 |
553+
| One Coroutine (micros) | 260541/27944 | 212/ 28 |
554+
| Two Coroutines (micros) | 260701/27960 | 372/ 44 |
555555
|---------------------------------------+--------------+-------------|
556-
| One Coroutine (seconds) | 257136/26820 | 212/ 20 |
557-
| Two Coroutines (seconds) | 257312/26844 | 388/ 44 |
556+
| One Coroutine (seconds) | 260541/27944 | 212/ 28 |
557+
| Two Coroutines (seconds) | 260717/27960 | 388/ 44 |
558558
|---------------------------------------+--------------+-------------|
559-
| Scheduler, One Coroutine | 257168/26828 | 244/ 28 |
560-
| Scheduler, Two Coroutines | 257312/26844 | 388/ 44 |
559+
| Scheduler, One Coroutine | 260573/27944 | 244/ 28 |
560+
| Scheduler, Two Coroutines | 260701/27968 | 372/ 52 |
561561
|---------------------------------------+--------------+-------------|
562-
| Scheduler, One Coroutine (micros) | 257184/26828 | 260/ 28 |
563-
| Scheduler, Two Coroutines (micros) | 257328/26844 | 404/ 44 |
562+
| Scheduler, One Coroutine (micros) | 260589/27944 | 260/ 28 |
563+
| Scheduler, Two Coroutines (micros) | 260733/27968 | 404/ 52 |
564564
|---------------------------------------+--------------+-------------|
565-
| Scheduler, One Coroutine (seconds) | 257184/26828 | 260/ 28 |
566-
| Scheduler, Two Coroutines (seconds) | 257344/26844 | 420/ 44 |
565+
| Scheduler, One Coroutine (seconds) | 260589/27944 | 260/ 28 |
566+
| Scheduler, Two Coroutines (seconds) | 260749/27968 | 420/ 52 |
567567
|---------------------------------------+--------------+-------------|
568-
| Scheduler, One Coroutine (setup) | 257200/26828 | 276/ 28 |
569-
| Scheduler, Two Coroutines (setup) | 257376/26844 | 452/ 44 |
568+
| Scheduler, One Coroutine (setup) | 260605/27944 | 276/ 28 |
569+
| Scheduler, Two Coroutines (setup) | 260765/27968 | 436/ 52 |
570570
|---------------------------------------+--------------+-------------|
571-
| Scheduler, One Coroutine (man setup) | 257184/26828 | 260/ 28 |
572-
| Scheduler, Two Coroutines (man setup) | 257360/26844 | 436/ 44 |
571+
| Scheduler, One Coroutine (man setup) | 260589/27944 | 260/ 28 |
572+
| Scheduler, Two Coroutines (man setup) | 260749/27968 | 420/ 52 |
573573
|---------------------------------------+--------------+-------------|
574-
| Blink Function | 257424/26816 | 500/ 16 |
575-
| Blink Coroutine | 257572/26836 | 648/ 36 |
574+
| Blink Function | 261001/27988 | 672/ 72 |
575+
| Blink Coroutine | 261133/28008 | 804/ 92 |
576576
+--------------------------------------------------------------------+
577577
```
578578
@@ -586,7 +586,7 @@ internal `prevMillis` static variable. The `Blink Coroutine` implements the
586586
same logic using a `Coroutine`. The `Coroutine` version is far more readable and
587587
maintainable, with only about 220 additional bytes of flash on AVR, and 130
588588
bytes on an ESP8266. In many situations, the increase in flash memory size may
589-
be worth ease of code maintenance.
589+
be worth paying to get easier code maintenance.
590590
591591
<a name="CPU"></a>
592592
### CPU
@@ -611,9 +611,9 @@ ESP8266:
611611
+---------------------+--------+-------------+--------+
612612
| Functionality | iters | micros/iter | diff |
613613
|---------------------+--------+-------------+--------|
614-
| EmptyLoop | 10000 | 0.200 | 0.000 |
615-
| DirectScheduling | 10000 | 0.500 | 0.300 |
616-
| CoroutineScheduling | 10000 | 0.800 | 0.600 |
614+
| EmptyLoop | 10000 | 0.100 | 0.000 |
615+
| DirectScheduling | 10000 | 0.500 | 0.400 |
616+
| CoroutineScheduling | 10000 | 0.900 | 0.800 |
617617
+---------------------+--------+-------------+--------+
618618
```
619619
@@ -623,26 +623,43 @@ ESP8266:
623623
<a name="Hardware"></a>
624624
### Hardware
625625
626-
The library has Tier 1 support on the following boards:
626+
**Tier 1: Fully Supported**
627+
628+
These boards are tested on each release:
627629
628630
* Arduino Nano (16 MHz ATmega328P)
629631
* SparkFun Pro Micro (16 MHz ATmega32U4)
630-
* SAMD21 M0 Mini (48 MHz ARM Cortex-M0+)
631632
* STM32 Blue Pill (STM32F103C8, 72 MHz ARM Cortex-M3)
632633
* NodeMCU 1.0 (ESP-12E module, 80 MHz ESP8266)
633634
* WeMos D1 Mini (ESP-12E module, 80 MHz ESP8266)
634635
* ESP32 dev board (ESP-WROOM-32 module, 240 MHz dual core Tensilica LX6)
635636
* Teensy 3.2 (96 MHz ARM Cortex-M4)
636637
637-
Tier 2 support can be expected on the following boards, mostly because I don't
638-
test these as often:
638+
**Tier 2: Should work**
639+
640+
These boards should work but I don't test them as often:
639641
640642
* ATtiny85 (8 MHz ATtiny85)
641643
* Arduino Pro Mini (16 MHz ATmega328P)
642644
* Mini Mega 2560 (Arduino Mega 2560 compatible, 16 MHz ATmega2560)
643645
* Teensy LC (48 MHz ARM Cortex-M0+)
644646
645-
The following boards are **not** supported:
647+
**Tier 3: May work, but not supported**
648+
649+
* SAMD21 M0 Mini (48 MHz ARM Cortex-M0+)
650+
* Arduino-branded SAMD21 boards use the ArduinoCore-API, so are explicitly
651+
blacklisted. See below.
652+
* Other 3rd party SAMD21 boards *may* work using the SparkFun SAMD core.
653+
* However, as of SparkFun SAMD Core v1.8.6 and Arduino IDE 1.8.19, I can no
654+
longer upload binaries to these 3rd party boards due to errors.
655+
* Therefore, third party SAMD21 boards are now in this new Tier 3 category.
656+
* This library may work on these boards, but I can no longer support them.
657+
658+
**Tier Blacklisted**
659+
660+
The following boards are *not* supported and are explicitly blacklisted to allow
661+
the compiler to print useful error messages instead of hundreds of lines of
662+
compiler errors:
646663
647664
* Any platform using the ArduinoCore-API
648665
(https://github.com/arduino/ArduinoCore-api). For example:
@@ -654,16 +671,24 @@ The following boards are **not** supported:
654671
### Tool Chain
655672
656673
This library was developed and tested using:
657-
* [Arduino IDE 1.8.13](https://www.arduino.cc/en/Main/Software)
658-
* [Arduino CLI 0.14.0](https://arduino.github.io/arduino-cli)
659-
* [Arduino AVR Boards 1.8.3](https://github.com/arduino/ArduinoCore-avr)
674+
* [Arduino IDE 1.8.19](https://www.arduino.cc/en/Main/Software)
675+
* [Arduino CLI 0.19.2](https://arduino.github.io/arduino-cli)
676+
* [Arduino AVR Boards 1.8.4](https://github.com/arduino/ArduinoCore-avr)
660677
* [Arduino SAMD Boards 1.8.9](https://github.com/arduino/ArduinoCore-samd)
661678
* [SparkFun AVR Boards 1.1.13](https://github.com/sparkfun/Arduino_Boards)
662-
* [SparkFun SAMD Boards 1.8.3](https://github.com/sparkfun/Arduino_Boards)
663-
* [STM32duino 2.0.0](https://github.com/stm32duino/Arduino_Core_STM32)
664-
* [ESP8266 Arduino 2.7.4](https://github.com/esp8266/Arduino)
665-
* [ESP32 Arduino 1.0.6](https://github.com/espressif/arduino-esp32)
666-
* [Teensydino 1.53](https://www.pjrc.com/teensy/td_download.html)
679+
* [SparkFun SAMD Boards 1.8.6](https://github.com/sparkfun/Arduino_Boards)
680+
* [STM32duino 2.2.0](https://github.com/stm32duino/Arduino_Core_STM32)
681+
* [ESP8266 Arduino 3.0.2](https://github.com/esp8266/Arduino)
682+
* [ESP32 Arduino 2.0.2](https://github.com/espressif/arduino-esp32)
683+
* [Teensyduino 1.56](https://www.pjrc.com/teensy/td_download.html)
684+
685+
This library is *not* compatible with:
686+
687+
* Any platform using the
688+
[ArduinoCore-API](https://github.com/arduino/ArduinoCore-api), for example:
689+
* [Arduino megaAVR](https://github.com/arduino/ArduinoCore-megaavr/)
690+
* [MegaCoreX](https://github.com/MCUdude/MegaCoreX)
691+
* [Arduino SAMD Boards >=1.8.10](https://github.com/arduino/ArduinoCore-samd)
667692
668693
It should work with [PlatformIO](https://platformio.org/) but I have
669694
not tested it.
@@ -674,8 +699,9 @@ the [EpoxyDuino](https://github.com/bxparks/EpoxyDuino) emulation layer.
674699
<a name="OperatingSystem"></a>
675700
### Operating System
676701
677-
I use Ubuntu 18.04 and 20.04 for most of my development and sometimes do sanity
678-
checks on MacOS 10.14.5.
702+
I use Ubuntu 20.04 for the vast majority of my development. I expect that the
703+
library will work fine under MacOS and Windows, but I have not explicitly tested
704+
them.
679705
680706
<a name="License"></a>
681707
## License
@@ -685,14 +711,14 @@ checks on MacOS 10.14.5.
685711
<a name="FeedbackAndSupport"></a>
686712
## Feedback and Support
687713
688-
If you have any questions, comments and other support questions about how to
689-
use this library, please use the
690-
[GitHub Discussions](https://github.com/bxparks/AceRoutine/discussions)
691-
for this project. If you have bug reports or feature requests, please file a
692-
ticket in [GitHub Issues](https://github.com/bxparks/AceRoutine/issues).
693-
I'd love to hear about how this software and its documentation can be improved.
694-
I can't promise that I will incorporate everything, but I will give your ideas
695-
serious consideration.
714+
If you have any questions, comments, or feature requests for this library,
715+
please use the [GitHub
716+
Discussions](https://github.com/bxparks/AceRoutine/discussions) for this
717+
project. If you have bug reports, please file a ticket in [GitHub
718+
Issues](https://github.com/bxparks/AceRoutine/issues). Feature requests should
719+
go into Discussions first because they often have alternative solutions which
720+
are useful to remain visible, instead of disappearing from the default view of
721+
the Issue tracker after the ticket is closed.
696722
697723
Please refrain from emailing me directly unless the content is sensitive. The
698724
problem with email is that I cannot reference the email conversation when other

USER_GUIDE.md

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ See the [README.md](README.md) for installation instructions and other
44
background information. This document describes how to use the library once it
55
is installed.
66

7-
**Version**: 1.4.0 (2021-07-29)
7+
**Version**: 1.4.1 (2022-02-02)
88

99
## Table of Contents
1010

@@ -199,21 +199,22 @@ COROUTINE(doSomething) {
199199
```
200200
there is a globally-scoped object named `doSomething` which is an instance of a
201201
subclass of `Coroutine`. The name of this subclass is autogenerated to be
202-
`Coroutine_doSomething` but it is unlikely that you will need know the exact
202+
`Coroutine_doSomething` but it is unlikely that you will need to know the exact
203203
name of this generated class.
204204
205205
If you expand the `COROUTINE()` macro from `Coroutine.h`, the above code is
206206
equivalent to writing out the following by hand:
207207
208208
```C++
209-
struct Coroutine_doSomething: Coroutine {
210-
Coroutine_doSomething() {}
209+
class Coroutine_doSomething : public Coroutine {
210+
public:
211+
Coroutine_doSomething() {}
211212
212-
int runCoroutine() override {
213-
COROUTINE_BEGIN();
214-
...
215-
COROUTINE_END();
216-
}
213+
int runCoroutine() override {
214+
COROUTINE_BEGIN();
215+
...
216+
COROUTINE_END();
217+
}
217218
};
218219
219220
Coroutine_doSomething doSomething;
@@ -227,11 +228,12 @@ relatively straightforward to see how we can create our own subclasses of
227228

228229
```C++
229230
class MyCoroutine : public Coroutine {
230-
int runCoroutine() override {
231-
COROUTINE_BEGIN();
232-
...
233-
COROUTINE_END();
234-
}
231+
public:
232+
int runCoroutine() override {
233+
COROUTINE_BEGIN();
234+
...
235+
COROUTINE_END();
236+
}
235237
};
236238

237239

docs/doxygen.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ PROJECT_NAME = "AceRoutine"
3838
# could be handy for archiving the generated documentation or if some version
3939
# control system is used.
4040

41-
PROJECT_NUMBER = 1.4.0
41+
PROJECT_NUMBER = 1.4.1
4242

4343
# Using the PROJECT_BRIEF tag one can provide an optional one line description
4444
# for a project that appears at the top of each page and should give viewer a

docs/html/AceRoutine_8h_source.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<tr style="height: 56px;">
2323
<td id="projectalign" style="padding-left: 0.5em;">
2424
<div id="projectname">AceRoutine
25-
&#160;<span id="projectnumber">1.4.0</span>
25+
&#160;<span id="projectnumber">1.4.1</span>
2626
</div>
2727
<div id="projectbrief">A low-memory, fast-switching, cooperative multitasking library using stackless coroutines on Arduino platforms.</div>
2828
</td>
@@ -105,8 +105,8 @@
105105
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160;<span class="preprocessor">#endif</span></div>
106106
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160; </div>
107107
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160;<span class="comment">// Version format: xxyyzz == &quot;xx.yy.zz&quot;</span></div>
108-
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160;<span class="preprocessor">#define ACE_ROUTINE_VERSION 10400</span></div>
109-
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160;<span class="preprocessor">#define ACE_ROUTINE_VERSION_STRING &quot;1.4.0&quot;</span></div>
108+
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160;<span class="preprocessor">#define ACE_ROUTINE_VERSION 10401</span></div>
109+
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160;<span class="preprocessor">#define ACE_ROUTINE_VERSION_STRING &quot;1.4.1&quot;</span></div>
110110
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160; </div>
111111
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="Coroutine_8h.html">ace_routine/Coroutine.h</a>&quot;</span></div>
112112
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160;<span class="preprocessor">#include &quot;ace_routine/CoroutineScheduler.h&quot;</span></div>

docs/html/Channel_8h_source.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<tr style="height: 56px;">
2323
<td id="projectalign" style="padding-left: 0.5em;">
2424
<div id="projectname">AceRoutine
25-
&#160;<span id="projectnumber">1.4.0</span>
25+
&#160;<span id="projectnumber">1.4.1</span>
2626
</div>
2727
<div id="projectbrief">A low-memory, fast-switching, cooperative multitasking library using stackless coroutines on Arduino platforms.</div>
2828
</td>

docs/html/ClockInterface_8h_source.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<tr style="height: 56px;">
2323
<td id="projectalign" style="padding-left: 0.5em;">
2424
<div id="projectname">AceRoutine
25-
&#160;<span id="projectnumber">1.4.0</span>
25+
&#160;<span id="projectnumber">1.4.1</span>
2626
</div>
2727
<div id="projectbrief">A low-memory, fast-switching, cooperative multitasking library using stackless coroutines on Arduino platforms.</div>
2828
</td>

docs/html/CoroutineScheduler_8h_source.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<tr style="height: 56px;">
2323
<td id="projectalign" style="padding-left: 0.5em;">
2424
<div id="projectname">AceRoutine
25-
&#160;<span id="projectnumber">1.4.0</span>
25+
&#160;<span id="projectnumber">1.4.1</span>
2626
</div>
2727
<div id="projectbrief">A low-memory, fast-switching, cooperative multitasking library using stackless coroutines on Arduino platforms.</div>
2828
</td>

docs/html/Coroutine_8cpp_source.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<tr style="height: 56px;">
2323
<td id="projectalign" style="padding-left: 0.5em;">
2424
<div id="projectname">AceRoutine
25-
&#160;<span id="projectnumber">1.4.0</span>
25+
&#160;<span id="projectnumber">1.4.1</span>
2626
</div>
2727
<div id="projectbrief">A low-memory, fast-switching, cooperative multitasking library using stackless coroutines on Arduino platforms.</div>
2828
</td>

0 commit comments

Comments
 (0)