Building with gcc 5.4.1 (Debian Stretch) with the unsupported
-Wno-error=lto-type-mismatch flag removed, the following diagnostic
occurs:
../../py/builtin.h:121:19: error: type of 'circuitpython_help_text' does not match original declaration [-Werror]
extern const char MICROPY_PY_BUILTINS_HELP_TEXT[];
^
../../shared-bindings/help.c:38:13: note: previously declared here
const char *circuitpython_help_text =
^
lto1: all warnings being treated as errors
lto-wrapper: fatal error: /usr/bin/arm-none-eabi-gcc returned 1 exit status
The following error occurs when building with gcc 5.4.1 (debian stretch):
common-hal/busio/UART.c:104:83: error: 'sercom_index' may be used uninitialized in this function [-Werror=maybe-uninitialized]
sercom_insts[rx->sercom[j].index]->USART.CTRLA.bit.ENABLE == 0) ||
It may be related to the addition of rx-only UARTs; gcc is unable
to infer the intended relationship between have_tx and sercom_index
being set (I am still not entirely confident of it myself)
The CMSIS files for the STM32 range provide macros to distinguish between
the different MCU series: STM32F4, STM32F7, STM32H7, STM32L4, etc. Prefer
to use these instead of custom ones.
By using pre-compiled regexs, using startswith(), and explicitly checking
for empty lines (of which around 30% of the input lines are), automatic
qstr extraction is speed up by about 10%.
This patch provides a custom (and simple) function to receive data on the
CAN bus, instead of the HAL function. This custom version calls
mp_handle_pending() while waiting for messages, which, among other things,
allows to interrupt the recv() method via KeyboardInterrupt.
Having the `active_read = false` in the background function left
a chance that a new_write occurs before active_read is set to false.
In that case, we'll read the appropriate data rather than write it
and never clear the active write.
Hopefully fixes#655.
mp_spiflash_read had a bug in it where "dest" and "addr" were incremented
twice for a certain special case. This was fixed, which then allowed the
function to be simplified to reduce code size.
mp_spiflash_write had a bug in it where "src" was not incremented correctly
for the case where the data to be written included the caching buffer as
well as some bytes after this buffer. This was fixed and the resulting
code simplified.
Certain pins (eg 4 and 5) seem to behave differently at the hardware level
when in open-drain mode: they glitch when set "high" and drive the pin
active high for a brief period before disabling the output driver. To work
around this make the pin an input to let it float high.