Commit Graph

1408 Commits (jebbatime)

Author SHA1 Message Date
Daniel Thompson 6df2db3f4c k9: Add support for Senbono K9
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-08-09 19:58:40 +01:00
Daniel Thompson 773d3b6d40 nrf: ble_uart: Feed the 'dog when transmitting characters
On systems that cannot feed the watchdog from an ISR (e.g. anything
without a button) then tab completion is risky because the watchdog might
fire before all the options are listed. Fix this by feeding the dog from
the tx routine.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-08-09 19:58:25 +01:00
Daniel Thompson c7cf47a368 nrf: p8: Align with PineTime
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-07-27 22:11:16 +01:00
Daniel Thompson 89f48aca20 nrf: machine: Add mechanism to starve the watchdog
A soft reset doesn't reconfigure the watchdog which means if previous
software on the device has set a bad timeout then we are stuck without
until the battery runs flat or a watchdog reset takes place. Add a
mechanism to stop feeding the dog so that we can wait for it to trigger.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-07-26 20:57:58 +01:00
Daniel Thompson 9d5e23fc71 nrf: ubluepy: Provide visiblity of the BLE UART connect status
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-07-24 17:02:16 +01:00
Daniel Thompson 13f086deeb nrf: mpconfigport: Enable ujson
This is mostly use for BLE comms since it allows us to easily share
data structures with our peers.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-07-19 20:42: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 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 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
iabdalkader 3078a4b2e2 stm32/timer: Add missing TIM 1/15/16/17 IRQ handlers for H7 MCUs. 2019-12-19 17:19:53 +11:00
roland van straten 43b576d88d stm32/boards/NUCLEO_H743ZI: Add extra pins and peripheral definitions.
- Corrected pin assignments and checked with CubeMX.
- Added additional I2C and UARTs.
- Added Ethernet interface definitions with lwIP and SSL support (but
  Ethernet is currently unsupported on H7 MCUs so not fully enabled).
2019-12-19 16:54:33 +11:00
roland van straten 26a78edb49 stm32/boards/NUCLEO_F767ZI: Update pins, peripherals and total flash.
- Removed remarks on DFU/OCD in mpconfigboard.h because deploy-stlink works
  fine too.
- Added more UARTs, I2C, corrected SPI, CAN, etc; verified against CubeMX.
- Adapted pins.csv to remove errors, add omissions, etc. according to
  NUCLEO-144 User Manual.
- Changed linker file stm32f767.ld to reflect correct size of the Flash.
- Tested with LAN and SD card.
2019-12-19 11:43:19 +11:00
roland van straten 8af139e8a4 stm32/boards/NUCLEO_F767ZI: Add pins and config for using an SD card.
The Nucleo board does not have an SD card slot but does have the requisite
pins next to each other and labelled, so provide the configuration for
convenience.
2019-12-19 11:28:47 +11:00
Seon Rozenblum 0d82f5d8c8 esp32/boards/TINYPICO: Add tinypico.py, dotstar.py with custom manifest. 2019-12-19 10:05:01 +11:00
Damien George 1e2f751591 qemu-arm: Let tinytest.o be built by standard build rules.
This makes sure tinytest.o is rebuilt if any of its dependencies change.
2019-12-17 13:32:07 +11:00