aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-12-06stm32/boards: Add NUCLEO_L432KC board configuration files.boochow
2018-12-06stm32: Add peripheral support for STM32L432.boochow
The L432 does not have: GPIOD, TIM3, SPI2, ADC dual mode operation, 2-banks flash.
2018-12-06stm32/boards: Add STM32L432KC chip configuration files.boochow
The pin alternate function information is derived from ST's datasheet https://www.st.com/resource/en/datasheet/stm32l432kc.pdf In the datasheet, the line 2 of AF4 includes I2C2 but actually the chip does not have I2C2 so it is removed.
2018-12-05esp8266/machine_uart: Add rxbuf keyword arg to UART constructor/init.Damien George
As per the machine.UART documentation, this is used to set the length of the UART RX buffer.
2018-12-05esp32/machine_uart: Add txbuf/rxbuf keyword args to UART construct/init.Damien George
As per the machine.UART documentation, these are used to set the length of the TX and RX buffers.
2018-12-05stm32/uart: Add rxbuf keyword arg to UART constructor and init method.Damien George
As per the machine.UART documentation, this is used to set the length of the RX buffer. The legacy read_buf_len argument is retained for backwards compatibility, with rxbuf overriding it if provided.
2018-12-05stm32/powerctrl: Add support for standby mode on L4 MCUs.Damien George
This maps to machine.deepsleep() which is now supported.
2018-12-04stm32/mboot: Add documentation for using mboot on PYBv1.x.Damien George
2018-12-04stm32/boards: Add configuration for putting mboot on PYBv1.x.Damien George
2018-12-04stm32/mboot: Add support for 4th board LED.Damien George
2018-12-04stm32/mboot: Provide led_state_all function to reduce code size.Damien George
2018-12-04stm32/uart: Always show the flow setting when printing a UART object.Damien George
Also change the order of printing of flow so it is after stop (so bits, parity, stop are one after the other), and reduce code size by using mp_print_str instead of mp_printf where possible. See issue #1981.
2018-12-04stm32,esp8266,cc3200: Use MICROPY_GC_STACK_ENTRY_TYPE to save some RAM.Damien George
2018-12-04py: Add option to reduce GC stack integer size to save RAM.Ayke van Laethem
A new option MICROPY_GC_STACK_ENTRY_TYPE is added to select a custom type instead of size_t for the gc_stack array items. This can be beneficial for small devices, especially those that are low on memory anyway. If a device has 1MB or less of heap (and 16-byte GC blocks) then this type can be uint16_t, saving 128 bytes of RAM.
2018-12-04esp8266/modnetwork: Wait for iface to go down before forcing power mgmt.Damien George
If the STA interface is connected to an AP then it must be fully disconnected and deactivated before forcing the power management on.
2018-12-04py/py.mk: Fix broken Gmane URL.Craig Younkins
2018-12-03extmod/modlwip: Fix read-polling of listening socket with a backlog.Damien George
The recent implementation of the listen backlog meant that the logic to test for readability of such a socket changed, and this commit updates the logic to work again.
2018-12-01stm32/boards/STM32F429DISC: Enable UART as secondary REPL.roland
The board(s) feature a VCOM through the ST-LINK, this feature is something to keep around.
2018-12-01extmod/modlwip: Implement TCP listen/accept backlog.Damien George
Array to hold waiting connections is in-place if backlog=1, else is a dynamically allocated array. Incoming connections are processed FIFO style to maintain fairness.
2018-12-01esp8266/modnetwork: Automatically do radio sleep if no interface active.Damien George
Reduces current of device by about 55mA when radio is sleeping.
2018-12-01esp8266/ets_alt_task: Process idle callback if no other events occurred.Damien George
2018-11-28esp32: Allocate task TCB and stack from system heap not uPy heap.Damien George
This is necessary for two reasons: 1) FreeRTOS still needs the TCB data structure even after vPortCleanUpTCB has been called, so this latter hook function cannot free the TCB, and there is no where else to safely delete it (this behaviour has changed recently in the ESP IDF); 2) when using external SPI RAM the uPy heap is in this external memory but the task stack must be allocated from internal SRAM. Fixes issue #3904.
2018-11-28esp32/mpthreadport: Prevent deadlocks when deleting all threads.Damien George
vTaskDelete now immediately calls vPortCleanUpTCB, which requires the thread_mutex mutex, so vTaskDelete must be called after this mutex is released.
2018-11-28stm32/powerctrl: Disable IRQs during stop mode to allow reconfig on wakeDamien George
2018-11-28stm32/powerctrl: Move (deep)sleep funcs from modmachine.c to powerctrl.cDamien George
2018-11-28stm32/usb: Fully deinitialise USB periph when it is deactivated.Damien George
2018-11-28stm32/servo: Only initialise TIM5 if it is needed, to save power.Damien George
2018-11-27tools/pydfu.py: Improve DFU reset, and auto-detect USB transfer size.Damien George
A DFU device must be in the idle state before it can be programmed, and this requires either clearing the status or aborting, depending on its current state. Code is added to do this. And the USB transfer size is now automatically detected so devices with a size less than 2048 bytes work correctly.
2018-11-26tests/io: Update tests to use uos.remove() instead of uos.unlink().Paul Sokolovsky
After Unix port switches from one to another, to be consistent with baremetal ports.
2018-11-26unix/modos: Rename unlink to remove to be consistent with other ports.Paul Sokolovsky
We standardized to provide uos.remove() as a more obvious and user-friendly name. That's what written in the docs. The Unix port implementation predates this convention, so update it now.
2018-11-26stm32/flashbdev: Add missing include for irq.h.Michael Paul Coder
This is required for mboot to build.
2018-11-26stm32/adc: Add ADC auto-calibration for L4 MCUs.Tobias Badertscher
This increases the precision of the ADC.
2018-11-26py/unicode: Fix check for valid utf8 being stricter about contn chars.Damien George
2018-11-26README: Remove text about selecting different ports in the docs.Damien George
2018-11-15README: Remove references to "make axtls", it's no longer needed.Damien George
Since 0be2ea50e98f9d742b9611d0289853a11d9e7f53 axtls is automatically built as part of the usual "make" build process.
2018-11-01tests/import_long_dyn: Test for "import *" of a long dynamic name.Paul Sokolovsky
Such names aren't stored as qstr in module dict, and there was a bug in "import *" handling which assumed any name in a module dict is a qstr.
2018-11-01py/runtime: Fix qstr assumptions when handling "import *".Paul Sokolovsky
There was an assumption that all names in a module dict are qstr's. However, they can be dynamically generated (by assigning to globals()), and in case of a long name, it won't be a qstr. Handle this situation properly, including taking care of not creating superfluous qstr's for names starting with "_" (which aren't imported by "import *").
2018-11-01stm32/system_stm32: Introduce configuration defines for PLL3 settings.roland
A board must be able to set the PLL3 values based on the HSE that it uses.
2018-10-30tests/extmod: Skip uselect test when CPython doesn't have poll().stijn
CPython does not have an implementation of select.poll() on some operating systems (Windows, OSX depending on version) so skip the test in those cases instead of failing it.
2018-10-28py/scope: Optimise scope_find_or_add_id to not need "added" arg.Damien George
Taking the address of a local variable is mildly expensive, in code size and stack usage. So optimise scope_find_or_add_id() to not need to take a pointer to the "added" variable, and instead take the kind to use for newly added identifiers.
2018-10-28py/compile: Remove unneeded variable from global/nonlocal stmt helpers.Damien George
2018-10-28py/compile: Fix case of eager implicit conversion of local to nonlocal.Damien George
This ensures that implicit variables are only converted to implicit closed-over variables (nonlocals) at the very end of the function scope. If variables are closed-over when first used (read from, as was done prior to this commit) then this can be incorrect because the variable may be assigned to later on in the function which means they are just a plain local, not closed over. Fixes issue #4272.
2018-10-27tests/cmdline/cmd_showbc.py: Fix test to explicitly declare nonlocal.Damien George
The way it was written previously the variable x was not an implicit nonlocal, it was just a normal local (but the compiler has a bug which incorrectly makes it a nonlocal).
2018-10-27py/py.mk: When building axtls use -Wno-all to prevent all warnings.Damien George
Building axtls gives a lot of warnings with -Wall enabled, and explicitly disabling all of them cannot be done in a way compatible with gcc and clang, and likely other compilers. So just use -Wno-all to prevent all of the extra warnings (in addition to the necessary -Wno-unused-parameter, -Wno-uninitialized, -Wno-sign-compare and -Wno-old-style-definition). Fixes issue #4182.
2018-10-23tests/import: Add .exp file for module_getattr.py to not require Py 3.7.Damien George
2018-10-23examples/unix/ffi_example: Clean up and update the ffi example.Paul Sokolovsky
1. Use uctypes.bytearray_at(). Implementation of the "ffi" module predates that of "uctypes", so initially some convenience functions to access memory were added to ffi. Later, they landed in uctypes (which follows CPython's ctype module). So, replace undocumented experimental functions from ffi to documented ones from uctypes. 2. Use more suitable type codes for arguments (e.g. "P" (const void*) instead of "p" (void*). 3. Some better var naming. 4. Clarify some messages printed by the example.
2018-10-23docs/conf.py: Use https for intersphinx link to docs.python.org.Paul Sokolovsky
To get rid of warning when building the docs saying there's a redirect from http: to https:.
2018-10-23docs/library/uctypes: Add examples and make general updates.Paul Sokolovsky
Examples are added to the beginning of the module docs, similarly to docs for many other modules. Improvements to grammar, style, and clarity. Some paragraphs are updated with better suggestions. A warning added of the effect incorrect usage of the module may have. Describe the fact that offset range used in one defined structure is limited.
2018-10-23tests/extmod/uctypes_sizeof_layout: Test for sizeof of different layout.Paul Sokolovsky
On almost all realistic platforms, native layout should be larger (or equal) than packed layout.
2018-10-23extmod/moductypes: Make sizeof() accept "layout" parameter.Paul Sokolovsky
sizeof() can work in two ways: a) calculate size of already instantiated structure ("sizeof variable") - in this case we already no layout; b) size of structure decsription ("sizeof type"). In the latter case, LAYOUT_NATIVE was assumed, but there should possibility to calculate size for other layouts too. So, with this patch, there're now 2 forms: uctypes.sizeof(struct) uctypes.sizeof(struct_desc, layout)