summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-10-11esp32: Add 4.x version of IDLE WDT config.Jim Mussared
2019-10-11docs/library/bluetooth: Add initial BLE documentation.Jim Mussared
2019-10-11extmod/modbluetooth: Use us instead of ms for advertising interval.Jim Mussared
This is to more accurately match the BLE spec, where intervals are configured in units of channel hop time (625us). When it was specified in ms, not all "valid" intervals were able to be specified. Now that we're also allowing configuration of scan interval, this commit updates advertising to match.
2019-10-11extmod/modbluetooth: Allow config of scan interval/window.Jim Mussared
This adds two additional optional kwargs to `gap_scan()`: - `interval_us`: How long between scans. - `window_us`: How long to scan for during a scan. The default with NimBLE is a 11.25ms window with a 1.28s interval. Changing these parameters is important for detecting low-frequency advertisements (e.g. beacons). Note: these params are in microseconds, not milliseconds in order to allow the 625us granularity offered by the spec.
2019-10-11stm32/boards: Add new board ADAFRUIT_F405_EXPRESS.ladyada
2019-10-10nrf/boards: Add nrf9160 pca10090 board.Glenn Ruben Bakke
2019-10-10nrf: Add nrf9160 base support.Glenn Ruben Bakke
This patch add basic building blocks for nrf9P60. It also includes a secure bootloader which forwards all possible peripherals that are user selectable to become non-secure. After configuring Flash, RAM and peripherals the secure bootloader will jump to the non-secure domain where MicroPython is placed. The minimum size of a secure boot has to be a flash block of 32Kb, hence why the linker scripts are offsetting the main application this much. The RAM offset is set to 128K, to allow for later integration of Nordic Semiconductor's BSD socket library which reserves the range 0x20010000 - 0x2001FFFF.
2019-10-10nrf/boards: Add support for pca10059.Glenn Ruben Bakke
Add support for pca10059 with REPL over tinyusb USB CDC. The board also includes a board specific module that will recover UICR->REGOUT0 in case this has been erased. This initial support does not preserve any existing bootloader on the pca10090 in case this was present, and expects to use all available flash on the device.
2019-10-10nrf: Add tinyusb support for nrf52840.Glenn Ruben Bakke
Add nrf-port finyusb driver files. USB CDC can be activated by board configuration files using the MICROPY_HW_USB_CDC. Updating BLE driver, Makefile, nrfx-glue and main.c to plug in the tinyusb stack.
2019-10-10nrf/device: Correct SPIM3 IRQ handler entry for nrf52840.Glenn Ruben Bakke
2019-10-10esp8266/modules/ntptime.py: Always close socket, and set day-of-week.Damien George
Fixes issue #5189.
2019-10-10stm32: Use hardware double sqrt on F7/H7 MCUs.Jim Mussared
Identical to cd527bb324ade952d11a134859d38bf5272c165e but for doubles. This gives a -2.754% improvement on bm_float.py, and -35% improvement on calling sqrt in a loop.
2019-10-10stm32/sdcard: Support boards with no SD card detect pin.Andrey Belykh
If MICROPY_HW_SDCARD_DETECT_PIN is not defined then the SD card will always be detected as present.
2019-10-10travis: Add esp8266 GENERIC_512K build to CI.Mike Causer
2019-10-10esp8266: Add per-board configs, following other ports.Mike Causer
The specific board can be selected with the BOARD makefile variable. This defaults (if not specified) to BOARD=GENERIC, which is the original default firmware build. For the 512k target use BOARD=GENERIC_512K.
2019-10-08nrf: Add support to activate MICROPY_PY_SYS_STDFILES.Damien George
Fixes issue #5162.
2019-10-08stm32/mboot: Add option to automatically reset when USB is disconnected.Andrew Leech
Enable in board config with: #define MBOOT_USB_RESET_ON_DISCONNECT (1)
2019-10-08travis: Add BLE submodules to ESP32 IDF4 build.Jim Mussared
2019-10-08esp32/boards: Enable BLE by default when building with IDF 4.x.Jim Mussared
2019-10-08esp32: Implement BLE using Nimble from IDF 4.x.Jim Mussared
2019-10-08stm32: Extract port-specific Nimble implementation.Jim Mussared
On other ports (e.g. ESP32) they provide a complete Nimble implementation (i.e. we don't need to use the code in extmod/nimble). This change extracts out the bits that we don't need to use in other ports: - malloc/free/realloc for Nimble memory. - pendsv poll handler - depowering the cywbt Also cleans up the root pointer management.
2019-10-05stm32/boards/PYBD_SF2: Put nimble library in external QSPI XIP flash.Damien George
The BLE stack is not performance critical, so put it in external memory-mapped flash to save internal flash for other things (like frozen bytecode).
2019-10-05stm32/usbdev: Fix compile error if MICROPY_HW_USB_CDC_NUM is set to 2.Martin Fischer
Fixes regression introduced by 6705767da1f7dba7a04e1d16c380a650f1f1074f
2019-10-05travis: Build unix nanbox with PYTHON=python2.Damien George
To test build support with Python 2.7.
2019-10-05mpy-cross: Enable Xtensa-Windowed native emitter.Damien George
Selectable via the command line: -march=xtensawin.
2019-10-05esp32: Enable native emitter.Damien George
2019-10-05py: Add new Xtensa-Windowed arch for native emitter.Damien George
Enabled via the configuration MICROPY_EMIT_XTENSAWIN.
2019-10-05py/asmxtensa: Add support for Xtensa with windowed registers.Damien George
Window-specific asm emit functions are added, along with a new macro option GENERIC_ASM_API_WIN.
2019-10-05py/emitnative: Add support for archs that cannot read executable data.Damien George
In which case place the native function prelude in a bytes object, linked from the const_table of that function. An architecture should define N_PRELUDE_AS_BYTES_OBJ to 1 before including py/emitnative.c to emit correct machine code, then enable MICROPY_EMIT_NATIVE_PRELUDE_AS_BYTES_OBJ so the runtime can correctly handle the prelude being in a bytes object.
2019-10-05py/emitnative: Add support for using setjmp with native emitter.Damien George
To enable this feature the N_NLR_SETJMP macro should be set to 1 before including py/emitnative.c.
2019-10-05py/emitnative: Add support for archs with windowed registers.Damien George
Such that args/return regs for the parent are different to args/return regs for child calls. For an architecture to use this feature it should define the REG_PARENT_xxx macros before including py/emitnative.c.
2019-10-04tests/basics: Add test for throw into yield-from with normal return.Damien George
This test was found by missing coverage of a branch in py/nativeglue.c.
2019-10-04py/runtime: Fix PEP479 behaviour throwing StopIteration into yield from.Damien George
Commit 3f6ffe059f64b3ebc44dc0bbc63452cb8850702b implemented PEP479 but did not catch the case fixed in this commit. Found by coverage analysis, that the VM had uncovered code.
2019-10-04py/vm: Fix handling of unwind jump out of active finally.Damien George
Prior to this commit, when unwinding through an active finally the stack was not being correctly popped/folded, which resulting in the VM crashing for complicated unwinding of nested finallys. This should be fixed with this commit, and more tests for return/break/ continue within a finally have been added to exercise this.
2019-10-04stm32/{adc,machine_adc}: Change ADC clock and sampling time for F0 MCUs.Chris Mason
STM32F0 has PCLK=48MHz and maximum ADC clock is 14MHz so use PCLK/4=12MHz to stay within spec of the ADC peripheral. In pyb.ADC set common sampling time to approx 4uS for internal and external sources. In machine.ADC reduce sample time to approx 1uS for external source, leave internal at maximum sampling time.
2019-10-04py/makeqstrdefs.py: Remove unused blacklist.Jim Mussared
As of 7d58a197cffa7c0dd3686402d2e381812bb8ddeb, `NULL` should no longer be here because it's allowed (MP_QSTRnull took its place). This entry was preventing the use of MP_QSTR_NULL to mean "NULL" (although this is not currently used). A blacklist should not be needed because it should be possible to intern all strings. Fixes issue #5140.
2019-10-04docs/develop/qstr.rst: Add documentation for string interning.Jim Mussared
2019-10-04py/compile: Disallow 'import *' outside module level.Petr Viktorin
This check follows CPython's behaviour, because 'import *' always populates the globals with the imported names, not locals. Since it's safe to do this (doesn't lead to a crash or undefined behaviour) the check is only enabled for MICROPY_CPYTHON_COMPAT. Fixes issue #5121.
2019-10-04stm32/boards: Enable MICROPY_HW_RTC_USE_LSE on L4 boards.Damien George
The previous commit changed the default configuration on L4 MCUs to use LSI, so configure these boards to use LSE again.
2019-10-04stm32/system_stm32: Support selection of HSE and LSI on L4 MCUs.hahmadi
This commit adds the option to use HSE or MSI system clock, and LSE or LSI RTC clock, on L4 MCUs. Note that prior to this commit the default clocks on an L4 part were MSI and LSE. The defaults are now MSI and LSI. In mpconfigboard.h select the clock source via: #define MICROPY_HW_RTC_USE_LSE (0) or (1) #define MICROPY_HW_CLK_USE_HSE (0) or (1) and the PLLSAI1 N,P,Q,R settings: #define MICROPY_HW_CLK_PLLSAIN (12) #define MICROPY_HW_CLK_PLLSAIP (RCC_PLLP_DIV7) #define MICROPY_HW_CLK_PLLSAIQ (RCC_PLLQ_DIV2) #define MICROPY_HW_CLK_PLLSAIR (RCC_PLLR_DIV2)
2019-10-02nrf/main: Update the way the LED is used on startup.roland van straten
In case of LED1 being present, do a short blink during startup instead of turning it on and leave it on.
2019-10-02nrf/led: Expose public API for LED manipulation.roland van straten
Aligned implementation with the STM32 port. Added empty functions to be used when no LED is available.
2019-10-02nrf/flash: Update flash driver to use nrfx_nvmc driver.Glenn Ruben Bakke
The the nrfx driver is aware of chip specific registers, while the raw HAL abstraction is not. This driver enables use of NVMC in non-secure domain for nrf9160.
2019-10-02nrf/uart: Add support for UARTE (EasyDMA).Glenn Ruben Bakke
2019-10-02nrf/temp: Move module configuration guard.Glenn Ruben Bakke
This patch moves the check for MICROPY_PY_MACHINE_TEMP to come before the inclusion of nrf_temp.h. The nrf_temp.h depends on the NRF_TEMP_Type which might not be defined for all nRF devices.
2019-10-02nrf/i2c: Add support for TWIM (EasyDMA).Glenn Ruben Bakke
2019-10-01tests/basics: Add test for getting name of func with closed over locals.Damien George
Tests correct decoding of the prelude to get the function name.
2019-10-01py/bc: Don't include mp_decode_uint funcs when not needed.Damien George
These are now only needed when persistent code is disabled.
2019-10-01minimal/frozentest.mpy: Update due to change in bytecode.Damien George
2019-10-01py: Rework and compress second part of bytecode prelude.Damien George
This patch compresses the second part of the bytecode prelude which contains the source file name, function name, source-line-number mapping and cell closure information. This part of the prelude now begins with a single varible length unsigned integer which encodes 2 numbers, being the byte-size of the following 2 sections in the header: the "source info section" and the "closure section". After decoding this variable unsigned integer it's possible to skip over one or both of these sections very easily. This scheme saves about 2 bytes for most functions compared to the original format: one in the case that there are no closure cells, and one because padding was eliminated.