- Mar 05, 2019
-
-
Damien George authored
POP_BLOCK and POP_EXCEPT are now the same, and are always followed by a JUMP. So this optimisation reduces code size, and RAM usage of bytecode by two bytes for each try-except handler.
-
Damien George authored
After the previous commit it is no longer needed.
-
Damien George authored
This patch fixes a bug in the VM when breaking within a try-finally. The bug has to do with executing a break within the finally block of a try-finally statement. For example: def f(): for x in (1,): print('a', x) try: raise Exception finally: print(1) break print('b', x) f() Currently in uPy the above code will print: a 1 1 1 segmentation fault (core dumped) micropython Not only is there a seg fault, but the "1" in the finally block is printed twice. This is because when the VM executes a finally block it doesn't really know if that block was executed due to a fall-through of the try (no exception raised), or because an exception is active. In particular, for nested finallys the VM has no idea which of the nested ones have active exceptions and which are just fall-throughs. So when a break (or continue) is executed it tries to unwind all of the finallys, when in fact only some may be active. It's questionable whether break (or return or continue) should be allowed within a finally block, because they implicitly swallow any active exception, but nevertheless it's allowed by CPython (although almost never used in the standard library). And uPy should at least not crash in such a case. The solution here relies on the fact that exception and finally handlers always appear in the bytecode after the try body. Note: there was a similar bug with a return in a finally block, but that was previously fixed in b7352084
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
From https://github.com/micropython/oofatfs, branch work-R0.13c, commit cb05c9486d3b48ffd6bd7542d8dbbab4b1caf790. Large code pages (932, 936, 949, 950) have been removed from ffunicode.c because they were not included in previous versions here.
-
Francisco J. Manno authored
To use HSI instead of HSE define MICROPY_HW_CLK_USE_HSI as 1 in the board configuration file. The default is to use HSE. HSI has been made the default for the NUCLEO_F401RE board to serve as an example, and because early revisions of this board need a hardware modification to get HSE working.
-
- Mar 04, 2019
-
-
Damien George authored
-
Damien George authored
-
Damien George authored
Also, to make it possible for ports to provide their own lwipopts.h, the default include directory of extmod/lwip-include is no longer added and instead a port should now make sure the correct include directory is included in the list (can still use extmod/lwip-include).
-
Damien George authored
This demonstrates how to use external QSPI flash in XIP (execute in place) mode. The default configuration has all extmod/ code placed into external QSPI flash, but other code can easily be put there by modifying the custom f769_qspi.ld script.
-
Damien George authored
A board can now use the make variables TEXT0_SECTIONS and TEXT1_SECTIONS to specify the linker sections that should go in its firmware. Defaults are provided which give the existing behaviour.
-
Tom Collins authored
-
- Mar 01, 2019
-
-
Damien George authored
This makes the QSPI more robust, in particular the timeout counter should not be used with memory mapped mode (see F7 errata).
-
Damien George authored
This port would rather keep the code size as RAM.
-
Damien George authored
This optimisation eliminates the need to create a temporary normal dict. The optimisation is enabled via MICROPY_COMP_CONST_LITERAL which is enabled by default (although only has an effect if OrderdDict is enabled). Thanks to @pfalcon for the initial idea and implementation.
-
- Feb 28, 2019
-
-
Damien George authored
Because "waiti 0" may have waited for a while (eg 500ms) and the internal WDT may need to be fed immediately. Fixes issue #4459.
-
Damien George authored
Fixes issue #4499.
-
- Feb 26, 2019
-
-
Damien George authored
-
Damien George authored
All exceptions that unwind through the async-with must be caught and BaseException is the top-level class, which includes Exception and others. Fixes issue #4552.
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
Some users of this module may require the LwIP stack to run at an elevated priority, to protect against concurrency issues with processing done by the underlying network interface. Since LwIP doesn't provide such protection it must be done here (the other option is to run LwIP in a separate thread, and use thread protection mechanisms, but that is a more heavyweight solution).
-
Damien George authored
-
Damien George authored
-
- Feb 25, 2019
-
-
Yonatan Goldschmidt authored
This is only correct for the extmod/uos_dupterm.c implementation however, as e.g cc3200 implementation does the mp_load_method() itself, and anyway requires `read` instead of `readinto`.
-
Petr Kracík authored
esp_wifi_connect will return ESP_OK for the normal path of execution which just means the reconnect is started, not that it is actually reconnected. In such a case wifi.isconnected() should return False until the reconnection is complete. After reconnect a GOT_IP event is called and it will change wifi_sta_connected back to True.
-
Damien George authored
-
Damien George authored
-
- Feb 21, 2019
-
-
Petr Kracík authored
A value of None for this argument is already supported, so the argument can be made optional.
-
Petr Kracík authored
-
Petr Kracík authored
This optional parameter for network.LAN clock_mode can be used for cases where the clock source is different from the default GPIO0. Fixes #4502.
-