atmel-samd: Use our own CDC output cache because the internal
cache is only used when the memory isn't aligned even if we're
going to change the memory immediately after.
If a soft reset happens while the gamepad module is scanning for button
presses, there is a moment when the pins get de-initialized, but the
gamepad module is still trying to read them, which ends in a crash.
We can avoid it by disabling scanning on reset.
(cherry picked from commit 470a23d4c9)
Conflicts:
atmel-samd/main.c
The readonly arg to storage.remount() is now a keyword arg that
defaults to False. To maintain backwards compatibility, readonly
can be passed as a positional arg or keyword arg.
* atmel-samd: Add support for internal filesystems.
This allows us to re-enable `os`. `random` is also enabled because
it solely depends on `os`.
Fixes#266. Its also a pre-requisite for #260.
* atmel-samd: Update SAMD51 linker script comments and MICROPY_MAX_STACK_USAGE enabling.
This saves a lot of RAM. Fixes#287.
Also fixed compilation of frozen_mpy.c to use supplied make rule rather than
builtin rule (supplied rule suppresses printing out the gcc command line).
Backport of micro:bit random module.
Plugged into the port as a general random module for all nrf51/nrf52 targets. Works both with and without Bluetooth LE stack enabled.
Behavioral change: seed() method has been removed, as the use of RNG peripheral generates true random sequences and not pseudo-random sequences.
The driver also takes care of calling the Bluetooth LE stack for random values if the stack is enabled. The reason for this is that the Bluetooth LE stack take ownership of the NRF_RNG when enabled. Tolerate to enable/disable on the fly, and will choose to use direct access to the peripheral if Bluetooth LE stack is disabled or not compiled in at all.
Driver has been included in the top Makefile, and will not be compiled in unless nrf51_hal_conf.h/nrf52_hal_conf.h defines HAL_RNG_MODULE_ENABLED (1).
* nrf: Adding Arduino Primo board support
* nrf: Adding arduino_primo to target boards table in readme.md
* nrf/boards: Activating pyb.LED module for arduino_primo board.
* nrf/boards: Removing define not needed for arduino_primo
Updating arduino_primo board mpconfigboard.h. Removing a define
that was wrongly named. Instead of renaming it, it was removed as
it was never used.
Duplicating pattern for detecting location of libm, libc and libgcc
from teensy port. Activating MICROPY_FLOAT_IMPL (FLOAT) for nrf52 targets
and adding libs into the compile. For nrf51 targets it is still set to
NONE as code grows to much (about 30k).
Some numbers on flash use if MICROPY_FLOAT_IMPL is set to
MICROPY_FLOAT_IMPL_FLOAT and math libraries are enabled (lgcc, lc, lm).
nrf51:
======
without float support:
text data bss dec hex filename
144088 260 30020 174368 2a920 build-pca10028/firmware.elf
with float support:
text data bss dec hex filename
176228 1336 30020 207584 32ae0 build-pca10028/firmware.elf
nrf52:
======
without float support:
text data bss dec hex filename
142040 356 36236 178632 2b9c8 build-pca10040/firmware.elf
with float support:
text data bss dec hex filename
165068 1436 36236 202740 317f4 build-pca10040/firmware.elf