Currently readline ignores linefeeds which works well for \r\n (and \r)
data but has problems with linefeed seperations (which, amoung other
things, is used by Gadgetbridge's BangleJS driver.
Add support for executing commands on a linefeed whilst ensuring that
we continue to treat \r\n as a single line.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
This allows us to load .mpy files stored in the filesystem without having
to invoke the compiler (e.g. with a much lower memory overhead).
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Currently pinetime reserves 64k of FLASH for an unused file system. This
is pointless because we have a 4MB SPI flash that we can use as a
filesystem.
It is also pointless on dsd6 and nitrogen because we'd prefer to run
without a filesystem than to have something so stunted!
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
These 32 bytes can be used as pseudo-NVRAM to allow communication between
the payload and the bootloader. The pseudo-NVRAM driver can be written in
pure python (using machine.mem32) so there no code changes beyond reserving
the memory are required.
Currently the nrf port doesn't implement a proper RTC (it exposes
raw RTCounters instead) but it is still useful to implement
localtime() and mktime() (although the argument to localtime becomes
mandatory).
Feeding a watchdog from a periodic interrupt isn't the smartest thing
to do (unless you have setup multi-channels) so we also allow us to
express to the WDT driver whether we've arrived from an ISR or not.
Currently it is difficult to deploy uPy on form factor devices without
a reset pin. Any mistake in the boot code risks the system getting
stuck (at least until the battery goes flat). A watchdog and user
button can be combined to give a long-press reset that gives the user
a better shot at recovering the device before the battery runs down!
Move webrepl support code from ports/esp8266/modules into extmod/webrepl
(to be alongside extmod/modwebrepl.c), and use frozen manifests to include
it in the build on esp8266 and esp32.
A small modification is made to webrepl.py to make it work on non-ESP
ports, i.e. don't call dupterm_notify if not available.
This is an alternative to f4ed2df that adds a newline so that the output of
the test starts on a new line and the result of the test is prefixed with
"result: " to distinguish it from the test output.
Suggested-by: @dpgeorge
This reverts commit f4ed2dfa94.
This lets tinytest work as it was originally designed. An alternate
solution for the reverted commit will be implemented in a future commit.