Release 2.0.0
New targets!
Arduino Nano RP2040 Connect
Raspberry Pi Pico
RP2040 support to be mainlined as ARMmbed/mbed-os#14488
Libraries
SDCard: Fix reliability on Portenta H7 when used with WiFi
PDM: improve library for Portenta (Vision Shield): now it handles stereo, mono and a lot of sample rates
Portenta Camera (Vision Shield): implement motion detection, faster crop, better examples
Portenta Video: implement HDMI cable detect (hotplug)
Ethernet: port Arduino APIs to Portenta PHY
WiFi: improve compatibility with WiFiNINA examples
Wire: fix slave operations
ThreadDebug: add support for Nano 33 BLE
Core
Use a timer with microsecond resolution for micros()
Allow deepest sleep if USB is unused
USB: support runtime speed detection for Portenta
[BREAKING] Speedup compilation by making singletons opaque [1]
Add all the available pins for Portenta H7 (Breakout Carrier)
SerialUSB: fix race condition on rx_buffer
SerialUSB: support line coding APIs
Update underlying mbed-os to 6.9.0
Extra
Improve packaging scripts by splitting the core into families [1]
Update openocd and dfu-util to their latest releases
[1] Breaking changes:
Following a broad community request, we targeted two pain point of existing core:
- installation speed
- compilation speed
They are both very noticeable on Windows platforms, where file access is much slower and the antivirus can potentially check every file being compiled.
To fix the first, we removed debugging information from libmbed.a (to make the final library much smaller) and we split the core into different packages. This only happens at release time, if you are developing nothing changes.
Debugging information are being added back when compiling the user sketch, so IDE 2.0 users will be able to debug proficiently.
If you are interested in debugging the mbed internals, just run
./mbed-os -a TARGET_BOARD:TARGET_BOARD
after removing 0001-PACKAGING-remove-gdb-exta-information-to-slim-librar.patch
from patches
folder and this will recreated a debuggable (and bigger) libmbed.a
To fix the slow compilation, we invested some time in profiling what was going on when g++ was called. It turns out that most of the time was spent parsing and resolving Callback.h
from mbed-os. Since most of the drivers are including it, Arduino.h
was "tainted". The solution we applied involves not including directly the headers, but only "stubs", and provide the object definition in a cpp file. This way, only that file will be compiled slowly and not the whole core.
This creates, however, a bunch of incompatibilities with older code, notably:
- SerialUSB does not inherit from mbed::FileHandle anymore
- you can't call printf or redirect stdout to it directly
FIX: use REDIRECT_STDOUT_TO(Serial) macro as usual
- you can't call printf or redirect stdout to it directly
- Using mbed internal APIs may result in compile time errors
FIX: always explicitely include mbed headers when using an mbed class
As always, feel free to report any bug you may find!