Commit Graph

10982 Commits (33252220c733dfe02ac3b2de89963315a31aedb1)

Author SHA1 Message Date
Daniel Thompson 33252220c7 readline: Allow linefeeds to be used to end lines
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>
2020-07-19 20:41:39 +01:00
Daniel Thompson df61f43d56 Merge branch 'wasp-os' of github.com:daniel-thompson/micropython into wasp-os 2020-06-30 23:00:34 +01:00
Daniel Thompson d8c3988cf1 nrf: ble_uart: Add scheduler and power management support
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-06-30 22:58:25 +01:00
Daniel Thompson 9840d3c596 nrf: Enable the scheduler by default
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-06-30 22:57:49 +01:00
Daniel Thompson 1dcf4bae0f
Merge pull request #1 from pebri86/p8-devel
Add support for p8-watch
2020-06-25 11:04:06 +01:00
Fuji Pebri 266822fd33 add support for p8-watch
Signed-off-by: Fuji Pebri <pebri86@gmail.com>
2020-06-18 16:02:26 +07:00
Daniel Thompson d11200432c nrf: Enable persistant code loading
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>
2020-06-17 21:33:18 +01:00
Daniel Thompson 0abaa09f89 nrf: dsd6,pinetime,nitrogen: Disable micro:bit filesystem
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>
2020-06-17 21:32:22 +01:00
Daniel Thompson 8ea3211068 nrf: linker scripts: Reserve the first 32 bytes of RAM
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.
2020-05-09 14:13:47 +01:00
Daniel Thompson 5424de70d7 nrf: modmachine: Enable direct memory access from python 2020-04-26 14:56:03 +01:00
Daniel Thompson 7f8eda310d nrf: config: Enable uio and sys.stdio files 2020-04-11 20:10:41 +01:00
Daniel Thompson 2e5cb3eb32 nrf: utime: Add localtime and mktime calls
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).
2020-02-19 19:29:17 +00:00
Daniel Thompson a982035fdf nrf: uos: Add support for LFS1 and LFS1 2020-02-09 19:45:47 +00:00
Daniel Thompson 1bd0c08a76 nrf: pinetime: Enable VFS
LFS2 will be handled by the Makefile...
2020-02-09 19:45:20 +00:00
Daniel Thompson 99d8d1b8da nrf: Enable input() and array slice assignment 2020-02-09 19:44:51 +00:00
Daniel Thompson b2273b5d22 nrf: Feed the watchdog from the RTC interrupt
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.
2020-02-01 13:10:23 +00:00
Daniel Thompson 5f5b7bdb25 Revert "nrf: spi: Feed the watchdog from machine.SPI.write()"
This reverts commit 1d1cd68713.
2020-02-01 13:06:20 +00:00
Daniel Thompson 035ece788f nrf: Hide RTCounter(0) when Softdevice is enabled
On systems with a Softdevice then RTC0 is reserved and cannot
be used by the application.
2020-02-01 13:03:04 +00:00
Daniel Thompson 3886bb16d1 nrf: Fix build BLE NUS and LTO=0 2020-02-01 13:01:54 +00:00
Daniel Thompson e668ed3ed3 nrf: pinetime: Improve pin descriptions 2020-01-29 17:26:11 +00:00
Daniel Thompson b6f0dee43e nrf: dsd6/nitrogen/pinetime: Enable native code gen 2020-01-28 18:18:58 +00:00
Daniel Thompson cb4ea0b35e nrf: Fix (frozen) native code generation 2020-01-28 18:14:40 +00:00
Daniel Thompson 1f96fb052f nrf: Add support for FROZEN_MANIFEST 2020-01-28 18:13:33 +00:00
Daniel Thompson 1d1cd68713 nrf: spi: Feed the watchdog from machine.SPI.write()
This is a temporary hack to prevent the WDT triggering during display
update loops (e.g. no return to REPL... which is currently when the dog
is fed).
2020-01-23 22:03:26 +00:00
Daniel Thompson ee1899688b nrf: Enable time.sleep() 2020-01-21 21:30:44 +00:00
Daniel Thompson 5457f42e7e nrf: pinetime: Enable WDT for this board 2020-01-20 08:01:24 +00:00
Daniel Thompson 09bebddc74 nrf: dsd6: Enable WDT for this board 2020-01-20 08:01:24 +00:00
Daniel Thompson a1584bb653 nrf: nitrogen: Enable the WDT for this port
Nitrogen *does* have a reset button... but it is good to have a platform
to test with.
2020-01-20 08:01:24 +00:00
Daniel Thompson ec24f8b6e2 nrf: Initial WDT-in-C implementation
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!
2020-01-20 08:01:24 +00:00
Daniel Thompson 9f819ce2fb nrf: pinetime: Add support for Pine64 PineTime 2020-01-20 08:01:24 +00:00
fanoush 1925b4f9fe nrf: dsd6: Add support for DS-D6 fitness tracker
From c4579ff251/micropython/micropython/DS-D6-micropython.diff

[daniel@redfelineninja.org.uk: Split out feature patches, minor clean ups]
2020-01-18 11:51:40 +00:00
Daniel Thompson 8020af26ed nrf: nitrogen: Add support for 96Boards BLE Nitrogen 2020-01-18 11:51:40 +00:00
Daniel Thompson 43a67b9f57 nrf: ble_uart: Allow boards to choose the advertised name 2020-01-18 11:51:40 +00:00
Daniel Thompson 98eb8b19d7 nrf: Enable NUS by default 2020-01-18 11:51:40 +00:00
fanoush 5a607e23bd nrf: Add support for DFU bootloader
From https://github.com/fanoush/ds-d6/blob/c4579ff25166722566c1b9251a20f99027972
588/micropython/micropython/DS-D6-micropython.diff

[daniel@redfelineninja.org.uk: Seperated out from the rest of the DS-D6
support]
2020-01-17 19:20:48 +00:00
Damien George 1f37194730 all: Bump version to 1.12. 2019-12-20 16:58:17 +11:00
Damien George 39bc430e44 tests/pyb: Adjust UART and Timer tests to work on PYBD_SF6. 2019-12-20 16:42:38 +11:00
Damien George 073c5f3a40 py/profile: Fix debug opcode decoding of MP_BC_RAISE_xxx opcodes. 2019-12-20 14:57:44 +11:00
Damien George 95473980ef py/vm: Fix comment to refer to MP_BC_RAISE_OBJ instead of RAISE_VARARGS. 2019-12-20 14:57:06 +11:00
Damien George 7ac326c424 stm32/boards/PYBD: Include webrepl helper scripts in frozen manifest. 2019-12-20 13:20:20 +11:00
Jim Mussared 7ce1e0b1dc extmod/webrepl: Move webrepl scripts to common place and use manifest.
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.
2019-12-20 12:59:13 +11:00
Matt Trentini 7f235cbee9 docs/esp32: Add quickref and full docs for esp32.RMT class. 2019-12-20 12:25:38 +11:00
Matt Trentini 0e0e6132fd esp32/esp32_rmt: Add initial support for RMT peripheral.
This is an ESP32-specific peripheral so lives in the esp32 module.
2019-12-20 12:24:51 +11:00
David Lechner 882533ad92 qemu-arm/Makefile: Allow overriding CROSS_COMPILE from another makefile. 2019-12-19 17:59:32 +11:00
David Lechner fd0ba7be07 tools/tinytest-codegen.py: Add extra newline and result message.
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
2019-12-19 17:55:50 +11:00
David Lechner 1605c7e584 Revert "lib/tinytest: Clean up test reporting in the presence of std..."
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.
2019-12-19 17:53:46 +11:00
iabdalkader 3078a4b2e2 stm32/timer: Add missing TIM 1/15/16/17 IRQ handlers for H7 MCUs. 2019-12-19 17:19:53 +11:00
Damien George 8449e41818 docs/develop: Add documentation on how to build native .mpy modules. 2019-12-19 17:07:53 +11:00
Damien George e58c7ce3d6 docs/reference: Add documentation describing use of .mpy files.
Including information about .mpy versioning and how to debug failed imports
of .mpy files.
2019-12-19 17:06:27 +11:00
Damien George a3df152fef examples/natmod: Add very simple features0 example to compute factorial. 2019-12-19 17:06:27 +11:00