| Age | Commit message (Collapse) | Author |
|
|
|
And update the GPIO init for NUCLEO_H743ZI to consistently use the mphal
functions.
|
|
Pins with multiple alt-funcs for the same peripheral (eg USART_CTS_NSS)
need to be split into individual alt-funcs for make-pins.py to work
correctly.
This patch changes the following:
- Split `..._CTS_NSS` into `..._CTS/..._NSS`
- Split `..._RTS_DE` into `..._RTS/..._DE`
- Split `JTDO_SWO` into `JTDO/TRACESWO` for consistency
- Fixed `TRACECK` to `TRACECLK` for consistency
|
|
|
|
|
|
|
|
|
|
Sourced from STM32Cube_FW_F0_V1.9.0.
|
|
Now points to branch: work-F0-1.9.0+F4-1.16.0+F7-1.7.0+H7-1.2.0+L4-1.8.1
|
|
|
|
Use direct register access to get the APB clock divider. This reduces code
size and makes the code more efficient.
|
|
|
|
If no block devices are defined by a board then storage support will be
disabled. This means there is no filesystem provided by either the
internal flash or external SPI flash. But the VFS system can still be
enabled and filesystems provided on external devices like an SD card.
|
|
With this change, all the USB source code can now be passed through the
compiler even if the MCU does not have a USB peripheral.
|
|
This prevents clients such as ampy, mpy-utils, etc getting confused by
extraneous data.
|
|
Instance members are always treated as values, even if they are properties.
A test is added to show this is the case.
|
|
Mboot is a custom bootloader for STM32 MCUs. It can provide a USB DFU
interface on either the FS or HS peripherals, as well as a custom I2C
bootloader interface.
|
|
|
|
These files provide no additional information, all the version and license
information is captured in the relevant files in these subdirectories.
Thanks to @JoeSc for the original patch.
|
|
This is what the IDF does, it must be done.
|
|
This patch reduces code size by:
bare-arm: -16
minimal x86: -156
unix x64: -288
unix nanbox: -184
stm32: -48
cc3200: -16
esp8266: -96
esp32: -16
The last 10 patches combined reduce code size by:
bare-arm: -164
minimal x86: -1260
unix x64: -3416
unix nanbox: -1616
stm32: -676
cc3200: -232
esp8266: -1144
esp32: -268
|
|
Reduces code size by:
bare-arm: +0
minimal x86: +0
unix x64: -368
unix nanbox: -248
stm32: -128
cc3200: -48
esp8266: -184
esp32: -40
|
|
Change in code size is:
bare-arm: +4
minimal x86: -88
unix x64: -456
unix nanbox: -88
stm32: -44
cc3200: +0
esp8266: -104
esp32: +8
|
|
Reduces code size by:
bare-arm: +0
minimal x86: +0
unix x64: -80
unix nanbox: +0
stm32: -12
cc3200: +0
esp8266: -28
esp32: +0
|
|
Reduces code size by:
bare-arm: -20
minimal x86: -140
unix x64: -408
unix nanbox: -140
stm32: -68
cc3200: -16
esp8266: -80
esp32: -32
|
|
Reduces code size by:
bare-arm: -8
minimal x86: -104
unix x64: -312
unix nanbox: -120
stm32: -60
cc3200: -16
esp8266: -92
esp32: -24
|
|
Reduces code size by:
bare-arm: -56
minimal x86: -300
unix x64: -576
unix nanbox: -300
stm32: -164
cc3200: -56
esp8266: -236
esp32: -76
|
|
Reduces code size by:
bare-arm: -24
minimal x86: -192
unix x64: -288
unix nanbox: -184
stm32: -72
cc3200: -16
esp8266: -148
esp32: -32
|
|
Reduces code size by:
bare-arm: -24
minimal x86: -72
unix x64: -200
unix nanbox: -72
stm32: -52
cc3200: -32
esp8266: -84
esp32: -24
|
|
Reduces code size by:
bare-arm: -16
minimal x86: -208
unix x64: -408
unix nanbox: -248
stm32: -12
cc3200: -24
esp8266: -96
esp32: -44
|
|
Generators that are already executing cannot be reexecuted. This patch
puts in a check for such a case.
Thanks to @jepler for finding the bug.
|
|
The code_state.old_globals variable is there to save the globals state so
should be used for this purpose, to avoid the need for additional local
variables on the C stack.
|
|
|
|
As per CPython semantics. This feature is controlled by
MICROPY_PY_BUILTINS_ROUND_INT which is disabled by default.
|
|
|
|
|
|
|
|
This patch allows to use lwIP as the implementation of the usocket module,
instead of the existing socket-multiplexer that delegates the entire TCP/IP
layer to the NIC itself.
This is disabled by default, and enabled by defining MICROPY_PY_LWIP to 1.
When enabled, the lwIP TCP/IP stack will be included in the build with
default settings for memory usage and performance (see
lwip_inc/lwipopts.h). It is then up to a particular NIC to register itself
with lwIP using the standard lwIP netif API.
|
|
|
|
The hardware doesn't allow it, instead the value is reset to 255 upon
setting the other calendar/time values.
|
|
Without this, if GC threshold is hit and there is not enough memory left to
satisfy the request, gc_collect() will run a second time and the search for
memory will happen again and will fail again.
Thanks to @adritium for pointing out this issue, see #3786.
|
|
|
|
Following outcome of recent fuzz testing and sanitizing by @jepler.
|
|
Under ubsan, when evaluating hash(-0.) the following diagnostic occurs:
../../py/objfloat.c:102:15: runtime error: negation of
-9223372036854775808 cannot be represented in type 'mp_int_t' (aka
'long'); cast to an unsigned type to negate this value to itself
So do just that, to tell the compiler that we want to perform this
operation using modulo arithmetic rules.
|
|
Before this, ubsan would detect a problem when executing
hash(006699999999999999999999999999999999999999999999999999999999999999999999)
../../py/mpz.c:1539:20: runtime error: left shift of 1067371580458 by
32 places cannot be represented in type 'mp_int_t' (aka 'long')
When the overflow does occur it now happens as defined by the rules of
unsigned arithmetic.
|
|
When computing e.g. hash(0.4e3) with ubsan enabled, a diagnostic like the
following would occur:
../../py/objfloat.c:91:30: runtime error: shift exponent 44 is too
large for 32-bit type 'int'
By casting constant "1" to the right type the intended value is preserved.
|
|
Fuzz testing combined with the undefined behavior sanitizer found that
parsing unreasonable float literals like 1e+9999999999999 resulted in
undefined behavior due to overflow in signed integer arithmetic, and a
wrong result being returned.
|
|
There is no need to use the mp_int_t type which may be 64-bits wide, there
is enough bit-width in a normal int to parse reasonable exponents. Using
int helps to reduce code size for 64-bit ports, especially nan-boxing
builds. (Similarly for the "dig" variable which is now an unsigned int.)
|
|
Calling memset(NULL, value, 0) is not standards compliant so we must add an
explicit check that emit->label_offsets is indeed not NULL before calling
memset (this pointer will be NULL on the first pass of the parse tree and
it's more logical / safer to check this pointer rather than check that the
pass is not the first one).
Code sanitizers will warn if NULL is passed as the first value to memset,
and compilers may optimise the code based on the knowledge that any pointer
passed to memset is guaranteed not to be NULL.
|
|
This patch makes it so that UART(0) can by dynamically attached to and
detached from the REPL by using the uos.dupterm function. Since WebREPL
uses dupterm slot 0 the UART uses dupterm slot 1 (a slot which is newly
introduced by this patch). UART(0) must now be attached manually in
boot.py (or otherwise) and inisetup.py is changed to provide code to do
this. For example, to attach use:
import uos, machine
uart = machine.UART(0, 115200)
uos.dupterm(uart, 1)
and to detach use:
uos.dupterm(None, 1)
When attached, all incoming chars on UART(0) go straight to stdin so
uart.read() will always return None. Use sys.stdin.read() if it's needed
to read characters from the UART(0) while it's also used for the REPL (or
detach, read, then reattach). When detached the UART(0) can be used for
other purposes.
If there are no objects in any of the dupterm slots when the REPL is
started (on hard or soft reset) then UART(0) is automatically attached.
Without this, the only way to recover a board without a REPL would be to
completely erase and reflash (which would install the default boot.py which
attaches the REPL).
|