aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-01-26py/mpconfig.h: Remove parentheses from MICROPY_VERSION_xxx macros.Damien George
Otherwise MICROPY_VERSION_STRING includes these parentheses in the string.
2019-01-25pic16bit: Update to compile with latest xc16 v1.35 compiler.Damien George
This port has been verified to work with these latest changes.
2019-01-25py/obj.h: Explicitly cast args to uint32_t in MP_OBJ_FUN_MAKE_SIG.Damien George
For architectures where size_t is less than 32 bits (eg 16 bits) the args must be casted to uint32_t so the left shift will work. For architectures where size_t is greater than 32 bits (eg 64 bits) this new casting will not lose any bits because the end result must anyway fit in a uint32_t.
2019-01-25docs/library: Add documentation for esp32 module.Damien George
2019-01-25docs: Add initial docs for esp32 port, including quick-ref and general.Matt Trentini
With contributions from Oliver Robson (@HowManyOliversAreThere), Sean Lanigan (@seanlano) and @rprr.
2019-01-24lib/stm32lib: Update library to get F413 BOR defs and fix gcc 8 warning.Damien George
2019-01-23esp32/machine_hw_spi: Make HW SPI objects statically allocated.Damien George
This aligns more closely with the hardware, that there are two, fixed HW SPI peripherals. And it allows to recreate the HW SPI objects without error, as well as create them again after a soft reset. Fixes issue #4103.
2019-01-23esp32/machine_hw_spi: Use separate DMA channels for HSPI and VSPI.Damien George
Otherwise only one of HSPI or VSPI can be used at a time. Fixes issue #4068.
2019-01-23esp32/modules/neopixel.py: Change NeoPixel to different default timings.Matt Trentini
In order to suit the more common 800KHz by default (instead of 400KHz), and also have the same behaviour as the esp8266 port. Resolves #4396. Note! This is a breaking change. Anyone that has previously used the NeoPixel class on an ESP32 board may be affected.
2019-01-22esp8266/esp_mphal: Provide mp_hal_pin_od_high_dht so DHT works reliably.Damien George
The original behaviour of open-drain-high was to use the open-drain mode of the GPIO pin, and this seems to make driving a DHT more reliable. See issue #4233.
2019-01-22drivers/dht: Allow open-drain-high call to be DHT specific if needed.Damien George
Some ports (eg esp8266) need to have specific behaviour for driving a DHT reliably.
2019-01-17esp32/Makefile: Use system provided math library rather than uPy one.Damien George
The ESP IDF system already provides a math library, and that one is likely to be better tuned to the Xtensa architecture. The IDF components are also tested against its own math library, so best not to override it. Using the system provided library also allows to easily switch to double-precision floating point by changing MICROPY_FLOAT_IMPL to MICROPY_FLOAT_IMPL_DOUBLE.
2019-01-16esp32/machine_pin: Add Pin.off() and Pin.on() methods.Damien George
2019-01-16esp8266/main: Activate UART(0) on dupterm for REPL before boot.py runs.Damien George
So that the user can explicitly deactivate UART(0) if needed. See issue #4314. This introduces some risk to "brick" the device, if the user disables the REPL without providing an alternative REPL (eg WebREPL), or any way to reenable it. In such a case the device needs to be erased and reprogrammed. This seems unavoidable, given the desire to have the option to use the UART for something other than the REPL.
2019-01-11docs/differences: Clarify the differences are against Python 3.4.stijn
2019-01-11stm32/main: Make thread and FS state static and exclude when not needed.Damien George
Without the static qualifier these objects will be kept by the linker even if they are unused. So this patch saves some RAM when these features are unused by a board.
2019-01-11stm32/wdt: Make singleton WDT object const so it goes in ROM.Damien George
2019-01-10py/modio: Make iobase_singleton object const so it goes in ROM.Damien George
2019-01-10esp32/modsocket: For socket read only release GIL if socket would block.Damien George
If there are many short reads to a socket in a row (eg by readline) then releasing and acquiring the GIL each time will give very poor throughput. So first poll the socket to see if it has data, and if it does then don't release the GIL.
2019-01-10esp32/mphalport: When tx'ing to REPL only release GIL if many chars sentDamien George
Otherwise, if multiple threads are active, printing data to the REPL may be very slow because in some cases only one character is output per call to mp_hal_stdout_tx_strn.
2019-01-04py: Fix location of VM returned exception in invalid opcode and commentsDamien George
The location for a returned exception was changed to state[0] in d95947b48a30f818638c3619b92110ce6d07f5e3
2019-01-04py: Get optional VM stack overflow check compiling and working again.Damien George
Changes to the layout of the bytecode header meant that this debug code was no longer compiling. This is now fixed and a new compile-time option is introduced, MICROPY_DEBUG_VM_STACK_OVERFLOW, to turn on this feature (which is disabled by default). This option is needed because more than one file needs to cooperate to make this check work.
2018-12-30stm32/sdcard: Properly reset SD periph when SDMMC2 is used on H7 MCUs.Damien George
2018-12-30tools/pydfu.py: Fix regression so tool runs under Python 2 again.Dave Hylands
Under python3 (tested with 3.6.7) bytes with a list of integers as an argument returns a different result than under python 2.7 (tested with 2.7.15rc1) which causes pydfu.py to fail when run under 2.7. Changing bytes to bytearray makes pydfu work properly under both Python 2.7 and Python 3.6.
2018-12-30stm32/modmachine: Fix reset_cause to correctly give DEEPSLEEP on L4 MCU.roland
Before this fix it returned SOFT_RESET after waking from a deepsleep (standby).
2018-12-30stm32/uart: Make sure user IRQs are handled even with a keyboard intr.Damien George
2018-12-30stm32/uart: Clear overrun error flag after reading RX data register.Damien George
On MCUs other than F4 the ORE (overrun error) flag needs to be cleared independently of clearing RXNE, even though both are wired to trigger the same RXNE IRQ. In the case that an overrun occurred it's necessary to explicitly clear the ORE flag or else the RXNE interrupt will keep firing.
2018-12-29stm32/uart: Always enable global UART IRQ handler on init.Damien George
Otherwise IRQs may not be enabled for the user UART.irq() handler. In particular this fixes the user IRQ_RXIDLE interrupt so that it triggers even when there is no RX buffer.
2018-12-29stm32/uart: Fix uart_rx_any in case of no buffer to return 0 or 1.Damien George
2018-12-29stm32: Implement UART.irq() method with initial support for RX idle IRQ.Tobias Badertscher
2018-12-29lib/utils: Add generic MicroPython IRQ helper functions.Tobias Badertscher
Initial implementation of this is taken from the cc3200 port.
2018-12-27py/runtime: Unlock the GIL in mp_deinit function.Damien George
This mirrors what is done in mp_init. Some RTOSs require this symmetry to get back to a clean state (when doing a soft reset, for example).
2018-12-22py/mpconfig: Move MICROPY_VERSION macros to static ones in mpconfig.h.Damien George
It's more robust to have the version defined statically in a header file, rather than dynamically generating it via git using a git tag. In case git doesn't exist, or a different source control tool is used, it's important to still have the uPy version number available.
2018-12-22stm32/main: Add board config option to enable/disable mounting SD card.Andrew Leech
The new option MICROPY_HW_SDCARD_MOUNT_AT_BOOT can now be defined to 0 in mpconfigboard.h to allow SD hardware to be enabled but not auto-mounted at boot. This feature is enabled by default to retain previous behaviour. Previously, if an SD card is enabled in hardware it is also used to boot from. While this can be disabled with a SKIPSD file on internal flash, this wont be available at first boot or if the internal flash gets corrupted.
2018-12-20py/gc: Adjust gc_alloc() signature to be able to accept multiple flags.Paul Sokolovsky
The older "bool has_finaliser" gets recast as GC_ALLOC_FLAG_HAS_FINALISER=1 so this is a backwards compatible change to the signature. Since bool gets implicitly converted to 1 this patch doesn't include conversion of all calls.
2018-12-20py/objarray: Introduce "memview_offset" alias for "free" field of objectPaul Sokolovsky
Both mp_type_array and mp_type_memoryview use the same object structure, mp_obj_array_t, but for the case of memoryview, some fields, e.g. "free", have different meaning. As the "free" field is also a bitfield, assume that (anonymous) union can't be used here (for the concerns of possible compatibility issues with wide array of toolchains), and just add a field alias using a #define. As it's a define, it should be a selective identifier, so use verbose "memview_offset" to avoid any clashes.
2018-12-15tools/mpy-tool.py: Fix build error when no qstrs present in frozen mpy.Dave Hylands
If you happen to only have a really simple frozen file that doesn't contain any new qstrs then the generated frozen_mpy.c file contains an empty enumeration which causes a C compile time error.
2018-12-15py/qstr: Put a lower bound on new qstr pool allocation.Damien George
2018-12-15windows: Remove remaining traces of old GNU readline support.Damien George
GNU readline support for the unix port was removed in acaa30b6046d449f5f58a8f02c83459702759df7 and in 5e83a75c78dc8c370b25e7ee669295854ea45130, so it's also no longer supported in the windows port.
2018-12-13stm32/boards/NUCLEO_L432KC: Specify L4 OpenOCD config file for this MCU.Damien George
2018-12-13stm32/boards: Allow OpenOCD stm_flash procedure to accept single FW img.Damien George
To support deplop-openocd on target boards that use TEXT0_ADDR only and have their firmware in a single binary image.
2018-12-13tests/basics/special_methods2: Typo fix in comment.Paul Sokolovsky
2018-12-13tools/mpy-tool.py: Fix calc of opcode size for opcodes with map caching.Damien George
Following an equivalent fix to py/bc.c. The reason the incorrect values for the opcode constants were not previously causing a bug is because they were never being used: these opcodes always have qstr arguments so the part of the code that was comparing them would never be reached. Thanks to @malinah for finding the problem and providing the initial patch.
2018-12-13py/bc: Fix calculation of opcode size for opcodes with map caching.Damien George
All 4 opcodes that can have caching bytes also have qstrs, so the test for them must go in the qstr part of the code. The reason this incorrect calculation of the opcode size did not lead to a bug is because the caching byte is at the end of the opcode (byte, qstr, qstr, cache) and is always 0x00 when saving/loading, so was just treated as a single byte no-op opcode. Hence these opcodes were being saved/loaded/decoded correctly. Thanks to @malinah for finding the problem and providing the initial patch.
2018-12-13py/objdict: Make .fromkeys() method configurable.Paul Sokolovsky
On by default, turned off for minimal/bare-arm. Saves 144 bytes on x86.
2018-12-13docs/ure: Fully describe supported syntax subset, add example.Paul Sokolovsky
2018-12-12stm32/adc: Support 16-bit ADC configuration on H7 MCUs.Damien George
2018-12-12stm32/adc: Increase ADC sampling time for internal sources on H7 MCUs.Damien George
2018-12-12stm32/adc: Fix calibrated volt/temp readings on H7 by using 16bit scale.Damien George
2018-12-12stm32/extint: Use correct EXTI channels on H7 MCUs for RTC events.Damien George