aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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).
2020-06-01stm32/machine_uart: Retain attached-to-repl setting when init'ing UART.Damien George
2020-05-29extmod/vfs: Retain previous working directory if chdir fails.Damien George
Fixes issue #6069.
2020-05-29tools/codeformat.py: Add verbose option to pass to uncrustify and black.David Lechner
This adds a new command line option `-v` to `tools/codeformat.py` to enable verbose printing of all files that are scanned. Normally `uncrustify` and `black` are called with the `-q` option so setting verbose suppresses the `-q` option and on `black` also enables the `-v` option which makes it print out all file names matching the filter similar to how `uncrustify` does by default.
2020-05-29travis: For powerpc job, build both UART variants.Joel Stanley
The powerpc port can be built with two different UART drivers, so build both in CI. The default compiler is now powerpc64le-linux-gnu- so it does not need to be specified on the command line.
2020-05-29powerpc/uart: Choose which UART to use at build time, not runtime.Joel Stanley
Microwatt may have firmware that places data in r3, which was used to detect microwatt vs powernv. This breaks the existing probing of the UART type in this powerpc port. Instead build only the appropriate UART into the firmware, selected by passing the option UART=potato or UART=lpc_serial to the Makefile. A future enhancement would be to parse the device tree and configure MicroPython based on the settings.
2020-05-29esp32/modmachine: Fix machine.reset_cause to use IDF's esp_reset_reason.Thorsten von Eicken
The code previously called rtc_get_reset_reason which is a "raw" reset cause. The ESP-IDF massages that for the proper reset cause available from esp_reset_reason. Fixes issue #5134.
2020-05-28esp32/machine_sdcard: Add "freq" keyword arg to SDCard constructor.cccc
To allow high speed access.
2020-05-28tools/codeformat.py: Use -q option on uncrustify to make output quiet.David Lechner
This suppresses the Parsing: <file> as language C lines. This makes parsing run a bit faster and on CI it makes for less scrolling through logs (and black already uses the -q option).
2020-05-28py/modsys: Use consistent naming pattern for module-level const objects.David Lechner
This renames a few identifiers to follow the usual naming convention of mp_<module>_<name>. This makes them easier to find, e.g. when grep'ing.
2020-05-28windows: Make appveyor.yml self-contained.stijn
Add configuration which otherwise has to be set via the UI so the file is more self-contained, and remove configuration which is not needed because it's the same as the default. The major change here is that for a while now Appveyor has been using Visual Studio 2015 by default while we still want to support 2013.
2020-05-28py/ringbuf: Fix compilation with msvc.stijn
Older versions do not have "inline" so fetch the definition from mpconfigport.h.
2020-05-28py/modmath: Work around msvc float bugs in atan2, fmod and modf.stijn
Older implementations deal with infinity/negative zero incorrectly. This commit adds generic fixes that can be enabled by any port that needs them, along with new tests cases.
2020-05-27py/py.mk: Use additional CFLAGS to compile string0.c.Damien George
Otherwise functions like memset might get optimised to call themselves (eg with gcc 10). And provide CFLAGS_BUILTIN so these options can be changed by a port if needed. Fixes issue #6053.
2020-05-27lib/utils: Lock the scheduler when executing hard callback functions.Damien George
Otherwise scheduled functions may execute during the hard callback and then fail if they try to allocate heap memory.
2020-05-27travis: Set build name so it appears in the web interfaces.Joel Stanley
The env NAME="foo" syntax doesn't appear to set the name in the Travis web interface. Instead use the syntax from the docs: https://docs.travis-ci.com/user/build-stages/#naming-your-jobs-within-build-stages
2020-05-27travis: Run apt commands once, to slightly speed up the CI.Joel Stanley
2020-05-27powerpc: Set better default compiler.Joel Stanley
Most developers use a compiler which is called powerpc64le-linux-gnu-gcc.
2020-05-27powerpc: Fix Makefile rule when linking.Joel Stanley
The linker script was included in the "$^" inputs, causing the build to fail: LINK build/firmware.elf powerpc64le-linux-gnu-ld: error: linker script file 'powerpc.lds' appears multiple times As a fix the linker script is left as a dependency of the elf, but only the object files are linked.
2020-05-27mimxrt/boards: Add MIMXRT1060_EVK board.Albort Xue
2020-05-27esp8266/esppwm: Fix PWM glitch when setting duty on different channel.Olivier Ortigues
The PWM driver uses a double buffer for the PWM timing array, one in current use and the other one to update when changing duty parameters. The issue was that once the duty parameters were changed the updated buffer was applied immediately without synchronising to the start of the PWM period. By moving the buffer toggling/swapping to the interrupt when the cycle is done there are no more glitches.
2020-05-16docs/develop: Fix module/source name in Makefile of native example.Damien George
2020-05-16unix/main: Enter REPL when inspect active, even with stdin redirected.Yu-Ming Chang
This is how CPython behaves.
2020-05-15nrf: Add openocd as a supported flasher.Jim Mussared
Tested with the Particle Debugger on a Xenon.
2020-05-15travis: Build more boards as part of nrf job.Jim Mussared
Specifically: - pca10040: It was already the default. - microbit: It uses nRF51, has a Cortex-M0, and has additional libraries. - pca10056: It has USB CDC.
2020-05-15nrf: Update to work with nrfx v2.0.0, to match TinyUSB.Jim Mussared
Commit 6cea369b89b2223cf07ff8768e50dc39bbb770fe updated the TinyUSB submodule to a version based on nrfx v2.0.0. This commit updates the nrf port to work with the latest TinyUSB and nrfx v2.0.0.
2020-05-15lib/nrfx: Upgrade to nrfx v2.0.0.Damien George
2020-05-15nrf/mphalport: Remove need for "syntax unified" in mp_hal_delay_us.Damien George
Because it can confuse older versions of gcc. Instead use the correct instruction for Thumb vs Thumb-2 (sub vs subs) so the assembler emits the 2-byte instruction. Related to commit 1aa9ff914194824a78a8b010572ad7083c1bb4ec.
2020-05-15nrf/Makefile: Don't use -fno-builtin for Cortex-M0 builds.Damien George
So that error string compression is optimised correctly (it needs strcmp to be optimised away by the compiler).
2020-05-15extmod/vfs_lfsx: Fix import_stat so it takes into account current dir.Damien George
CPython semantics require searching the current directory if the import is not absolute (when "" is in sys.path). Fixes issue #6037.
2020-05-15stm32/boards: Add board config for Nucleo-F412ZG development board.Thomas Roberts
2020-05-15stm32: Add support for F412 MCUs.Thomas Roberts