Commit Graph

1369 Commits (5a607e23bd667b2240b06cdbcba0c9e7a700d393)

Author SHA1 Message Date
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
Damien George fb01415599 stm32/boards/PYBD_SF2: Configure LEDs as inverted, for LED.intensity(). 2019-12-13 17:28:24 +11:00
Damien George 71c6bfd08a stm32/modusocket: Handle case of NULL NIC in socket ioctl. 2019-12-13 14:45:21 +11:00
Damien George c2eaf56634 stm32/Makefile: Enable max buffer size on W5200 NIC when used with lwIP.
Because in network_wiznet5k the TX/RX buffers are set to 16k each when in
MACRAW mode, which is used with lwIP.
2019-12-13 12:36:12 +11:00
Damien George b47e155bd0 py/persistentcode: Add ability to relocate loaded native code.
Implements text, rodata and bss generalised relocations, as well as generic
qstr-object linking.  This allows importing dynamic native modules on all
supported architectures in a unified way.
2019-12-12 20:15:28 +11:00
Jim Mussared b76f0a73bc stm32/main: Fix SKIPSD file detection so SD card is mounted by default.
The condition for skipping was accidentally inverted in
7723dac337

Fixes issue #5400.
2019-12-09 17:01:30 +11:00
Daniel Mizyrycki 2df6a0436d nrf/boards/particle_xenon: Enable USB CDC on Particle Xenon board. 2019-12-09 14:10:24 +11:00
Damiano Mazzella cc634b9e92 stm32/boards/xxx_WB55: Enable littlefs2 on WB55 boards. 2019-12-09 14:07:29 +11:00
Andrej Krejcir 210d053286 nrf/main: Execute boot.py/main.py frozen modules without a file system.
When the file system is not enabled, the boot.py and main.py modules will
still be executed, if they are frozen.
2019-12-05 23:11:12 +11:00
Chris Mason d61e7a6d8a stm32/uart: Add support for UART4/5 on L0 MCUs. 2019-12-05 15:31:41 +11:00
Andrew Leech 9ca8a503ed esp32/boards: Enable ULP in base sdk configuration.
Fixes issue #5159.
2019-12-05 15:28:56 +11:00
Damien George 40cc7ec677 stm32/mpconfigport.h: Use IRQ_PRI_PENDSV to protect bluetooth ringbuf.
The default protection for the BLE ringbuf is to use
MICROPY_BEGIN_ATOMIC_SECTION, which disables all interrupts. On stm32 it
only needs to disable the lowest priority IRQ, pendsv, because that's the
IRQ level at which the BLE stack is driven.
2019-12-04 13:39:22 +11:00
Damien George ba5e4841ec stm32/main: Fix auto creation of pyb.Flash on boot with kw-only args. 2019-11-27 22:47:05 +11:00
Damien George 11c22430d4 stm32/boards/NUCLEO_L073RZ: Skip board-pin names for CPU only pins.
This board doesn't have much flash and removing these unneeded names saves
about 900 bytes of code size.
2019-11-27 21:59:47 +11:00
Damien George 77b8f86a5e stm32/qstrdefsport.h: Remove unused qstrs and make USB ones conditional.
qstrs in this file are always included in all builds, even if not used
anywhere.  So remove those that are never needed, and make USB names
conditional on having USB enabled.
2019-11-27 21:59:47 +11:00
Damien George 797c2e8fc2 stm32/storage: Make start/len args of pyb.Flash keyword only.
To allow the future possibility of initial positional args, like flash id.
2019-11-26 21:35:00 +11:00
Damien George d8057c325a stm32/storage: Change storage_read/write_blocks to return int type.
And return -MP_EIO if calling storage_read_block/storage_write_block fails.
This lines up with the return type and value (negative for error) of the
calls to MICROPY_HW_BDEV_READBLOCKS (and WRITEBLOCKS, and BDEV2 versions).
2019-11-26 00:08:57 +11:00
Damien George 120368ba1a stm32/boards: Enable LFS2 on PYBv1.x and PYBD boards. 2019-11-26 00:08:57 +11:00
Damien George 715e4fc25f stm32/moduos: Add VfsLfs1 and VfsLfs2 to uos module, if enabled. 2019-11-26 00:07:09 +11:00
Damien George 7897f5d9be stm32/main: Auto detect block device used for main filesystem. 2019-11-26 00:07:09 +11:00
Damien George c169094f61 stm32/storage: Make pyb.Flash configurable, and support ext block proto.
The pyb.Flash() class can now be used to construct objects which reference
sections of the flash storage, starting at a certain offset and going for a
certain length.  Such objects also support the extended block protocol.
The signature for the constructor is: pyb.Flash(start=-1, len=-1).
2019-11-26 00:07:09 +11:00
Damien George 7723dac337 stm32: Generalise flash mounting code so it supports arbitrary FS.
This commit refactors and generalises the boot-mount routine on stm32 so
that it can mount filesystems of arbitrary type.  That is, it no longer
assumes that the filesystem is FAT.  It does this by using mp_vfs_mount()
which does auto-detection of the filesystem type.
2019-11-25 18:10:58 +11:00
Jim Mussared fbb7646e3b stm32/nimble_hci_uart.c: Prevent scheduler running during CYW-BT wakeup.
Using mp_hal_delay_ms allows the scheduler to run, which might result in
another transmit operation happening, which would bypass the sleep (and
fail).  Use mp_hal_delay_us instead.
2019-11-25 17:32:10 +11:00
Josh Lloyd 1530fda9cf esp32/machine_rtc: Reduce memory footprint of user mem functionality. 2019-11-21 16:55:12 +11:00
Josh Lloyd ed2314f35a esp32/machine_rtc: Make RTC.memory size and availability configurable.
The compile-time configuration value MICROPY_HW_RTC_USER_MEM_MAX can now be
used to define the amount of memory set aside for RTC.memory().  If this
value is configured to zero then the RTC.memory functionality is not
included in the build.
2019-11-21 16:55:12 +11:00
Laurens Valk 2679c9e116 unix/modtermios: Fix output speed setter in tcsetattr.
The input speed was being set twice and the output speed was not set.
2019-11-21 12:10:32 +11:00
Yonatan Goldschmidt 973f68780d qemu-arm: Add ldscript dependency in the final firmware.elf target.
So that the target is rebuilt if the linker script changes.
2019-11-15 10:25:48 +11:00
Josh Lloyd 82d358510b esp32/rtc: Set system microseconds when setting time via RTC.datetime(). 2019-11-13 13:46:33 +11:00
Mike Causer 258b147830 stm32/boards/stm32f405_af.csv: Fix typo in ETH_RMII_REF_CLK on PA1. 2019-11-11 12:02:14 +11:00
Jim Mussared 71299d3224 esp32/boards/sdkconfig.base: Resize SSL output buffer from 16 to 4kiB.
The IDF heap is more fragmented with IDF 4 and mbedtls cannot allocate
enough RAM with 16+16kiB for both in and out buffers, so reduce output
buffer size.

Fixes issue #5303.
2019-11-11 11:55:58 +11:00
Damien George 799b6d1e0c extmod: Consolidate FAT FS config to MICROPY_VFS_FAT across all ports.
This commit removes the Makefile-level MICROPY_FATFS config and moves the
MICROPY_VFS_FAT config to the Makefile level to replace it.  It also moves
the include of the oofatfs source files in the build from each port to a
central place in extmod/extmod.mk.

For a port to enabled VFS FAT support it should now set MICROPY_VFS_FAT=1
at the level of the Makefile.  This will include the relevant oofatfs files
in the build and set MICROPY_VFS_FAT=1 at the C (preprocessor) level.
2019-11-11 11:37:38 +11:00
Damien George cea9209e0f esp8266/moduos: Add optional support for VfsLfs1 and VfsLfs2.
With this commit an esp8266-based board can now be built with littlefs
support via, eg "make MICROPY_VFS_LFS2=1".
2019-11-07 18:44:16 +11:00
Damien George 6eee5413ff esp8266/modules/flashbdev.py: Support extended block protocol. 2019-11-07 18:43:37 +11:00
Damien George 4be316fb07 esp32/moduos: Enable uos.VfsLfs2 for littlefs filesystems.
This commit adds support for littlefs (v2) on all esp32 boards.

The original FAT filesystem still works and any board with a preexisting
FAT filesystem will still work as normal.  It's possible to switch to
littlefs by reformatting the block device using:

    import uos, flashbdev
    uos.VfsLfs2.mkfs(flashbdev.bdev)

Then when the board reboots (soft or hard) the new littlefs filesystem will
be mounted.  It's possible to switch back to a FAT filesystem by formatting
with uos.VfsFat.mkfs(flashbdev.bdev).
2019-11-06 12:16:00 +11:00
Damien George d01ca7888b esp32/esp32_partition: Support extended block protocol. 2019-11-06 12:15:34 +11:00
Andreas Motl d209f9ebe7 esp32: Remove unused "esponewire.c" in favour of extmod/modonewire. 2019-11-05 14:57:05 +11:00
Damien George cddb2dd0c3 stm32/mpthreadport: Include runtime.h to get defn of mp_raise_msg. 2019-11-05 13:20:25 +11:00
Damien George c13f9f209d all: Convert nlr_raise(mp_obj_new_exception_msg(x)) to mp_raise_msg(x).
This helper function was added a while ago and these are the remaining
cases to convert, to save a bit of code size.
2019-11-05 11:35:45 +11:00
Damien George 742030945c esp32/Makefile: Add correct arch to MPY_CROSS_FLAGS for native code. 2019-11-04 15:32:20 +11:00
Damien George 32eae53fbc stm32/boards: Enable support for bluetooth on WB55 boards. 2019-11-01 14:58:24 +11:00