summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-06-12stm32/boards/STM32F769DISC: Use macro instead of const for flash size.Damien George
So that the flash size can be changed in just one place. Also remove the duplicate cache entry.
2020-06-12zephyr: Use cmake find_package to locate zephyr.Maureen Helm
Updates the zephyr port to use the ZEPHYR_BASE environment variable only to locate the zephyr cmake package, allowing cmake to cache the variable.
2020-06-12zephyr: Increase minimum required cmake version to 3.13.1.Maureen Helm
The minimum required cmake version has been 3.13.1 since zephyr 1.14.0.
2020-06-12zephyr: Convert DT_FLASH_AREA usages to new dts macros.Maureen Helm
Converts DT_FLASH_AREA usages in the zephyr port to new device tree macros introduced in zephyr 2.3. Tested with littlefs on the reel_board.
2020-06-12zephyr: Update to new zephyr timeout API.Maureen Helm
Updates the zephyr port to use the new timeout api introduced in zephyr 2.3.
2020-06-12zephyr: Update for refactored zephyr device structures.Maureen Helm
Updates the zephyr port to use refactored device structures introduced in zephyr 2.3.
2020-06-12zephyr: Fix floating point configuration.Maureen Helm
Zephyr renamed CONFIG_FLOAT to CONFIG_FPU to better reflect its semantics of enabling the hardware floating point unit (FPU) rather than enabling toolchain-level floating point support (i.e., software floating point for FPU-less socs).
2020-06-12zephyr: Fix and rename stacks_analyze function in zephyr module.Maureen Helm
Zephyr deprecated and then removed its stack_analyze function because it was unsafe. Use the new zephyr thread analyzer instead and rename the MicroPython function to zephyr.thread_analyze() to be more consistent with the implementation. Tested on mimxrt1050_evk. The output now looks like this: >>> zephyr.thread_analyze() Thread analyze: 80004ff4 : unused 400 usage 112 / 512 (21 %) rx_workq : unused 1320 usage 180 / 1500 (12 %) tx_workq : unused 992 usage 208 / 1200 (17 %) net_mgmt : unused 656 usage 112 / 768 (14 %) sysworkq : unused 564 usage 460 / 1024 (44 %) idle : unused 256 usage 64 / 320 (20 %) main : unused 2952 usage 1784 / 4736 (37 %)
2020-06-10mimxrt/boards: Set __heap_size__ to 0 in MIMXRT1011.ld.Albort Xue
Do not use the traditional C heap in order to save memory, because the traditional C heap is unused in MicroPython.
2020-06-10docs/esp8266: Add quickref documentation for UART on esp8266.Nick Crabtree
This patch adds quickref documentation for the change in commit afd0701bf7a9dcb50c5ab46b0ae88b303fec6ed3. This commit added the ability to disable the REPL and hence use UART0 for serial communication on the esp8266, but was not previously documented anywhere. The text is largely taken from the commit message, with generic information on using the UART duplicated from the Wipy quickref document.
2020-06-10tests/run-multitests.py: Allow passing unique env vars to each instance.Jim Mussared
For example, to run the BLE multitests entirely with the unix port: env MICROPY_MICROPYTHON=../ports/unix/micropython-dev ./run-multitests.py \ -i micropython,MICROPYBTUSB=01 \ -i micropython,MICROPYBTUSB=02:02 \ multi_bluetooth/ble_*.py
2020-06-10unix/btstack_usb: Allow choosing adaptor via environment variable.Jim Mussared
This allows running (for example): env MICROPYBTUSB=2-2 ./micropython-dev ../../examples/bluetooth/ble_temperature_central.py
2020-06-10examples/bluetooth: Fix event code in ble_temperature_central.py.Jim Mussared
2020-06-10extmod/modbluetooth: Register default GATT service and fix esp32 init.jp-96
This is for the NimBLE bindings, to make sure the default GATT service appears and that the esp32 initialises NimBLE correctly (it now matches stm32).
2020-06-10extmod/uasyncio: Add asyncio.wait_for_ms function.Damien George
Fixes issue #6107.
2020-06-10py/obj.h: Clarify comments about mp_map_t is_fixed and is_ordered.Damien George
Long ago, prior to 0ef01d0a75b8b2f48a72f0041e048a390b9e75b6, fixed and ordered maps were the same setting with the "table_is_fixed_array" member of mp_map_t. But these settings are actually independent, and it is possible to have is_fixed=1, is_ordered=0 (although this can currently only be done by tools/cc1). So update the comments to reflect this.
2020-06-10py/objtype: Use mp_obj_dict_copy() for creating obj.__dict__ attribute.Andrew Leech
The resulting dict is now marked as read-only (is_fixed=1) to enforce the fact that changes to this dict will not be reflected in the class instance. This commit reduces code size by about 20 bytes, and should be more efficient because it creates a direct copy of the dict rather than reinserting all elements.
2020-06-10py/objtype: Add __dict__ attribute for class objects.Andrew Leech
The behavior mirrors the instance object dict attribute where a copy of the local attributes are provided (unless the dict is read-only, then that dict itself is returned, as an optimisation). MicroPython does not support modifying this dict because the changes will not be reflected in the class. The feature is only enabled if MICROPY_CPYTHON_COMPAT is set, the same as the instance version.
2020-06-09mimxrt/boards: Integrate support for MIMXRT1020_EVK board.Philipp Ebensberger
2020-06-09mimxrt/boards: Enable LED class for MIMXRT1060_EVK board.Albort Xue
2020-06-09esp32: Update IDF v4.0 supported hash to v4.0.1.Jim Mussared
The main fix relevant to MicroPython is https://github.com/espressif/esp-idf/issues/4196 Release notes here https://github.com/espressif/esp-idf/releases/tag/v4.0.1
2020-06-08extmod/ure: Use single function for match/search/sub.stijn
Saves about 500 bytes on unix x64 and enables CPython-conform usage of passing a re object to these functions.
2020-06-08py/dynruntime.h: Make mp_obj_str_get_str raise if arg not a str/bytes.Damien George
2020-06-08mimxrt/tusb_config.h: Preliminary fix for TinyUSB HS endpoint overflow.Philipp Ebensberger
Sending more than 64 bytes to the USB CDC endpoint in HS mode will lead to a hard crash. This commit fixes the issue, although there may be a better fix from upstream TinyUSB in the future.
2020-06-05docs: Fix Sphinx 3.x warnings, and enable warnings-as-errors on build.David Lechner
This enables warnings as errors and fixes all current errors, namely: - reference to terms in the glossary must now be explicit (:term:) - method overloads must not be declared as a separate method or must use :noindex: - 2 cases where `` should have been used instead of `
2020-06-05github: Add GitHub action to build docs.David Lechner
This builds docs, but only on pull requests that change a file in the docs/ directory.
2020-06-05esp32/mpthreadport: Fix calculation of thread stack size.Damien George
With this commit the code should work correctly regardless of the size of StackType_t (it's actually 1 byte in size for the esp32's custom FreeRTOS). Fixes issue #6072.
2020-06-05qemu-arm: Support building in debug mode with DEBUG=1.Damien George
Fixes issue #6095.
2020-06-05examples/bluetooth: Fix incorrect value of BR/EDR flag in advertising.jxltom
According to Supplement to the Bluetooth Core Specification v8 Part A 1.3.1, to support BR/EDR the code should set the fifth bit (Simultaneous LE and BR/EDR to Same Device Capable (Controller)) and fourth bit (Simultaneous LE and BR/EDR to Same Device Capable (Host)) of the flag.
2020-06-05extmod/modbluetooth: Support bigger characteristic values.Jim Mussared
The ring buffer previously used a single unsigned byte field to save the length, meaning that it would overflow for large characteristic value responses. With this commit it now use a 16-bit length instead and has code to explicitly truncate at UINT16_MAX (although this should be impossible to achieve in practice).
2020-06-05extmod/modbluetooth: Ensure status=0 always on success.Jim Mussared
This commit makes sure that all discovery complete and read/write status events set the status to zero on success. The status value will be implementation-dependent on non-success cases.
2020-06-05docs/library: Update ubluetooth for new events and discover by uuid.Jim Mussared
2020-06-05tests/multi_bluetooth: Update to work with new BLE events.Jim Mussared
Updates the tests to use non-bitmask events, event renames, as well as some of the new completion events to improve reliability of the tests.
2020-06-05extmod/modbluetooth: Implement read done event.Jim Mussared
On btstack there's no status associated with the read result, it comes through as a separate event. This allows you to detect read failures or timeouts.
2020-06-05extmod/modbluetooth: Allow discovery of svc/char by uuid.Jim Mussared
In most situations this is a more efficient way of going straight to the service and characteristic you need.
2020-06-05extmod/modbluetooth: Add discover complete events for svc/char/desc.Jim Mussared
Without this it's difficult to implement a state machine correctly if the desired services are not found.
2020-06-05extmod/modbluetooth: Make modbluetooth event not a bitfield.Jim Mussared
There doesn't appear to be any use for only triggering on specific events, so it's just easier to number them sequentially. This makes them smaller values so they take up only 1 byte in the ringbuf, only 1 byte for the opcode in the bytecode, and makes room for more events. Also add a couple of new event types that need to be implemented (to avoid re-numbering later). And rename _COMPLETE and _STATUS to _DONE for consistency. In the future the "trigger" keyword argument can be reinstated by requiring the user to compute the bitmask, eg: ble.irq(handler, 1 << _IRQ_SCAN_RESULT | 1 << _IRQ_SCAN_DONE)
2020-06-05mimxrt: Add initial impl of machine.LED class, and basic pin support.Philipp Ebensberger
This commit implements an LED class with rudimentary parts of a pin C API to support it. The LED class does not yet support setting an intensity. This LED class is put in the machine module for the time being, until a better place is found. One LED is supported on TEENSY40 and MIMXRT1010_EVK boards.
2020-06-02docs/reference: Add note about multiple exceptions when heap is locked.Andrew Leech
2020-06-02minimal: Make build more flexible and work as 64-bit build.Damien George
Changes are: - string0 is no longer built when building for host as the target, because it'll be provided by the system libc and may in some cases clash with the system one (eg on OSX). - mp_int_t/mp_uint_t are defined in terms of intptr_t/uintptr_t to support both 32-bit and 64-bit builds. - Configuration values which are the default in py/mpconfig.h are removed from mpconfigport.h to make the configuration a bit more minimal, eg as a better starting point for new ports.
2020-06-02lib/utils/pyexec: Add missing MP_ERROR_TEXT when compiler disabled.Damien George
2020-06-02py/modbuiltins: Fix getattr to work with class raising AttributeError.Damien George
Fixes issue #6089.
2020-06-02stm32/Makefile: Quote libgcc path so spaces are not an issue.stinos
Fixes #3116.
2020-06-02qemu-arm/README: Update link to toolchain.David Spickett
New releases have moved from launchpad to developer.arm.com.
2020-06-02stm32/boards/xxx_WB55: Enable pyb.ADC and hardware SPI on WB55 boards.Damien George
These features are now supported (although machine.ADC is recommended over pyb.ADC).
2020-06-02stm32/dma: Add support for DMA on STM32WB, with SPI settings provided.Damien George
2020-06-02stm32/machine_adc: Make setting of ADC1_COMMON->CCR clearer on STM32WB.Damien George
2020-06-02stm32/adc: Add support to pyb.ADC for STM32WB MCUs.Damien George
2020-06-02stm32/modmachine: Allow changing AHB and APB bus frequencies on STM32WB.Damien George
For now SYSCLK cannot be changed and must remain at 64MHz.
2020-06-01stm32/machine_uart: Allow re-init'ing a static UART object.Damien George
Just disallow changing the rxbuf which will be some static RAM (can't free it and soft-reset would lose any dynamically allocated buffer).