ArduinoCore-mbed

Stars
305
Committers
72

Bot releases are hidden (Show)

ArduinoCore-mbed - Release 2.1.0

Published by facchinm over 3 years ago

Core

RP2040: improve the overall user experience
RP2040: fix some relevant bugs (complete list here https://github.com/ARMmbed/mbed-os/pull/14488/commits)
USBSerial: speedup operations and tackle corner cases

Libraries

PDM: rationalize gain() and buffer size
Ethernet: fix library discovery on case insensitive platforms
Wire: fix I2C scan

Extra

Update openocd to its latest release (fixes a bug with nRF52)

ArduinoCore-mbed - Release 2.0.0

Published by facchinm over 3 years ago

New targets!

Arduino Nano RP2040 Connect
Raspberry Pi Pico

RP2040 support to be mainlined as https://github.com/ARMmbed/mbed-os/pull/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
  • 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!

ArduinoCore-mbed - Release 1.3.2

Published by facchinm over 3 years ago

Bugfixes and improvements since 1.3.1

PluggableUSB: fix drivers issues on Windows when changing USB device type
Fix and improve Portenta_Camera driver
WiFi: support download() on both HTTP and HTTPS schemes

ArduinoCore-mbed - Release 1.3.1

Published by facchinm almost 4 years ago

Bugfixes and improvements since 1.3.0

Generic

  • analogWrite: delete pwm object if duty < 0 (useful on nRF52 since PWMs are limited)
  • USBSerial: fix sending more than CDC_MAX_PACKET_SIZE in a single shot
  • Tone: allow pitches higher than 500Hz

Portenta

  • Port PluggableUSBMSD (allows exposing any mass storage medium over USB)
  • WiFi: fix AccessPoint functionlity
  • CM4: route Serial object to UART1
ArduinoCore-mbed - Release 1.3.0

Published by facchinm about 4 years ago

Bugfixes and improvements since 1.2.2

  • Various fixes on WiFi library

    • WiFi firmware is now stored in external QSPI flash
    • SSL certificates are stored in external QSPI flash too
    • Please run PortentaWiFiFirmwareUpdater sketch once to setup your board
  • Allow a second USBSerial port

    • This port can be used to redirect ThreadDebug calls while keeping Serial functional
      #include <ThreadDebug.h>
      
      USBSerial SerialUSB1(false, "DebugPort");
      UsbDebugCommInterface  debugComm(&SerialUSB1);
      ThreadDebug            threadDebug(&debugComm, DEBUG_BREAK_IN_SETUP);
      
  • Fix and improve Portenta Camera library

  • Bootloader:

    • Fix frequent upload failures on various USB configurations
    • Handle double tap more consistently
    • Use full 96 bit UID as iSerial field
    • Improve getBootloaderInfo and updateBootloader sketches to contain more reliable information
  • RPC:

    • Introduce SerialRPC library (experimental)
    • Optimize the library for speed and to use less resources
  • Fix interrupts not being fired on Portenta_H7_M4

Related Projects