summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-07-20stmhal: Put debug builds in separate diroldSven Wegener
Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
2018-07-20stmhal: Split out firmware0.bin and firmware1.bin rulesSven Wegener
Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
2018-07-20stmhal: Add target to start gdb debuggingSven Wegener
Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
2018-07-20stmhal: Replace __WFI with __BKPT in __fatal_errorSven Wegener
On a fatal error, bring the processor into debug state. Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
2018-07-20Use $(MAKE) for invoking sub-makeSven Wegener
This is required to properly pass on the jobserver fds. Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
2018-07-20mpy-cross: Disable stack-protectorfor-upstreamSven Wegener
The inline asm in nlrx86.c and nlrx64.c depends on a specific stack layout. Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
2018-07-20Use $(MAKE) for invoking sub-makeSven Wegener
This is required to properly pass on the jobserver fds. Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
2018-07-20py/makeqstrdefs.py: Create output file if missingSven Wegener
Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
2018-07-20py/makeqstrdefs.py: Avoid double newlineSven Wegener
From readlines() there's already a newline. Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
2018-07-03esp8266: Let machine.WDT trigger the software WDT if obj is not fed.Damien George
This patch allows scripts to have more control over the software WDT. If an instance of machine.WDT is created then the underlying OS is prevented from feeding the software WDT, and it is up to the user script to feed it instead via WDT.feed(). The timeout for this WDT is currently fixed and will be between 1.6 and 3.2 seconds.
2018-07-03esp8266/modesp: Run ets_loop_iter before/after doing flash erase/write.Damien George
A flash erase/write takes a while and during that time tasks may be scheduled via an IRQ. To prevent overflow of the task queue (and loss of tasks) call ets_loop_iter() before and after slow flash operations. Note: if a task is posted to a full queue while a flash operation is in progress then this leads to a fault when trying to print out the error message that the queue is full. This patch doesn't try to fix this particular issue, it just prevents it from happening in the first place.
2018-07-03extmod/vfs: Support opening a file descriptor (int) with VfsPosix.Damien George
Fixes issue #3865.
2018-07-03esp32: Allow to build with uPy floats disabled.Damien George
2018-07-03py/obj.h: Fix broken build for object repr C when float disabled.Nicko van Someren
Fixes issue #3914.
2018-07-02py/objgenerator: Eliminate need for mp_obj_gen_wrap wrapper instances.Damien George
For generating functions there is no need to wrap the bytecode function in a generator wrapper instance. Instead the type of the bytecode function can be changed to mp_type_gen_wrap. This reduces code size and saves a block of GC heap RAM for each generator.
2018-07-02ports: Enable ure.sub() on stm32, esp8266 (not 512k) and esp32.Damien George
2018-07-02docs/ure: Document some more supported regex operators.Damien George
2018-07-02docs/ure: Document sub(), groups(), span(), start() and end().Damien George
2018-07-02unix/mpconfigport_coverage: Enable ure groups, span, start, end and sub.Damien George
2018-07-02extmod/modure: Add ure.sub() function and method, and tests.Damien George
This feature is controlled at compile time by MICROPY_PY_URE_SUB, disabled by default. Thanks to @dmazzella for the original patch for this feature; see #3770.
2018-07-02extmod/modure: Add match.span(), start() and end() methods, and tests.Damien George
This feature is controlled at compile time by MICROPY_PY_URE_MATCH_SPAN_START_END, disabled by default. Thanks to @dmazzella for the original patch for this feature; see #3770.
2018-07-02extmod/modure: Add match.groups() method, and tests.Damien George
This feature is controlled at compile time by MICROPY_PY_URE_MATCH_GROUPS, disabled by default. Thanks to @dmazzella for the original patch for this feature; see #3770.
2018-06-28docs/uos: Make it clear that block device block_num param is an index.Damien George
2018-06-28esp8266/esp8266_common.ld: Put mp_keyboard_interrupt in iRAM.Damien George
This function may be called from a UART IRQ, which may interrupt the system when it is erasing/reading/writing flash. In such a case all code executing from the IRQ must be in iRAM (because the SPI flash is busy), so put mp_keyboard_interrupt in iRAM so ctrl-C can be caught during flash access. This patch also takes get_fattime out of iRAM and puts it in iROM to make space for mp_keyboard_interrupt. There's no real need to have get_fattime in iRAM because it calls other functions in iROM. Fixes issue #3897.
2018-06-27py/compile: Handle return/break/continue correctly in async with.Damien George
Before this patch the context manager's __aexit__() method would not be executed if a return/break/continue statement was used to exit an async with block. async with now has the same semantics as normal with. The fix here applies purely to the compiler, and does not modify the runtime at all. It might (eventually) be better to define new bytecode(s) to handle async with (and maybe other async constructs) in a cleaner, more efficient way. One minor drawback with addressing this issue purely in the compiler is that it wasn't possible to get 100% CPython semantics. The thing that is different here to CPython is that the __aexit__ method is not looked up in the context manager until it is needed, which is after the body of the async with statement has executed. So if a context manager doesn't have __aexit__ then CPython raises an exception before the async with is executed, whereas uPy will raise it after it is executed. Note that __aenter__ is looked up at the beginning in uPy because it needs to be called straightaway, so if the context manager isn't a context manager then it'll still raise an exception at the same location as CPython. The only difference is if the context manager has the __aenter__ method but not the __aexit__ method, then in that case uPy has different behaviour. But this is a very minor, and acceptable, difference.
2018-06-27tests: Move non-filesystem io tests to basics dir with io_ prefix.Damien George
2018-06-27esp8266/mpconfigport.h: Enable ucryptolib module for standard build.Damien George
It remains disabled for the 512k build.
2018-06-27extmod/moducryptolib: Don't include arpa/inet.h, it's not needed.Damien George
And some ports (eg esp8266) don't have it.
2018-06-27esp32/mpconfigport.h: Enable ucryptolib module.Damien George
2018-06-27extmod/moducryptolib: Shorten exception messages to reduce code size.Yonatan Goldschmidt
2018-06-27extmod/moducryptolib: Prefix all Python methods/objects with ucryptolib.Yonatan Goldschmidt
Follows what was done in b045ebd35 for uhashlib.
2018-06-27extmod/moducryptolib: Add an mbedTLS implementation for this module.Yonatan Goldschmidt
2018-06-27extmod/moducryptolib: Refactor functions for clean interface with axTLS.Yonatan Goldschmidt
This will allow implementations other than axTLS. This commit includes additions of checks and clarifications of exceptions related to user input. To make the interface cleaner, I've disallowed switching from encrypt to decrypt in the same object, as this is not always possible with other crypto libraries (not all libraries have AES_convert_key like axTLS).
2018-06-27extmod/moducryptolib: Optionally export MODE_* constants to Python.Yonatan Goldschmidt
Allow including crypto consts based on compilation settings. Disabled by default to reduce code size; if one wants extra code readability, can enable them.
2018-06-27zephyr: Rename CONFIG_CONSOLE_PULL to CONFIG_CONSOLE_SUBSYS.Damien George
Following a similar change in the Zephyr Project.
2018-06-27docs/usocket: Minor fixes to grammar of getaddrinfo.Damien George
2018-06-27zephyr/prj_qemu_x86.conf: Remove outdated CONFIG_RAM_SIZE.Paul Sokolovsky
Target RAM size is no longer set using Kconfig options, but instead using DTS (device tree config). Fortunately, the default is now set to a high value, so we don't need to use DTS fixup.
2018-06-27zephyr/prj_base.conf: Remove outdated CONFIG_NET_NBUF_RX_COUNT option.Paul Sokolovsky
CONFIG_NET_NBUF_RX_COUNT no longer exists in Zephyr, for a while. That means we build with the default RX buf count for a while too, and it works, so just remove it (instead of switching to what it was renamed to, CONFIG_NET_PKT_RX_COUNT).
2018-06-27tests/basics/namedtuple*: Import ucollections first.Paul Sokolovsky
Otherwise, test may have artefacts in the presence of the micropython-lib module.
2018-06-27docs/usocket: getaddrinfo: Describe af/type/proto optional params.Paul Sokolovsky
These can be optionally specified, but all ports are expected to be able to accept them, at the very least ignore, though handling of "type" param (SOCK_STREAM vs SOCK_DGRAM) is recommended.
2018-06-27docs/ucryptolib: Add docs for new ucryptolib module.Paul Sokolovsky
2018-06-27unix/mpconfigport.h: Enable MICROPY_PY_UCRYPTOLIB.Paul Sokolovsky
2018-06-27tests/extmod/ucryptolib*: Add into and inplace tests for ucryptolib.Paul Sokolovsky
Tests for separate input and output buffer (alloc-free operation) and the same writable buffer used as input and output (inplace operation).
2018-06-27tests/extmod/ucryptolib*: Add tests for ucryptolib module.Paul Sokolovsky
2018-06-27extmod/moducryptolib: Add ucryptolib module with crypto functions.Paul Sokolovsky
The API follows guidelines of https://www.python.org/dev/peps/pep-0272/, but is optimized for code size, with the idea that full PEP 0272 compatibility can be added with a simple Python wrapper mode. The naming of the module follows (u)hashlib pattern. At the bare minimum, this module is expected to provide: * AES128, ECB (i.e. "null") mode, encrypt only Implementation in this commit is based on axTLS routines, and implements following: * AES 128 and 256 * ECB and CBC modes * encrypt and decrypt
2018-06-26docs/library: Add documentation for ucollections.deque.Damien George
2018-06-26stm32/mboot: Always use a flash latency of 1WS to match 48MHz HCLK.Damien George
2018-06-26stm32/mboot: Only compile in code for the USB periph that is being used.Damien George
Prior to this patch, if both USB FS and HS were enabled via the configuration file then code was included to handle both of their IRQs. But mboot only supports listening on a single USB peripheral, so this patch excludes the code for the USB that is not used.
2018-06-25stm32/mboot: Fix bug with invalid memory access of USB state.Damien George
Only one of pcd_fs_handle/pcd_hs_handle is ever initialised, so if both of these USB peripherals are enabled then one of these if-statements will access invalid memory pointed to by an uninitialised Instance. This patch fixes this bug by explicitly referencing the peripheral struct.
2018-06-25docs/esp8266: Fix minor typo in "certificates".jcea