| Age | Commit message (Collapse) | Author |
|
|
|
Since a long time now, mp_obj_type_t no longer refers explicitly to
mp_stream_p_t but rather to an abstract "const void *protocol". So there's
no longer any need to define mp_stream_p_t in obj.h and it can go with all
its associated definitions in stream.h. Pretty much all users of this type
will already include the stream header.
|
|
|
|
The Wiznet5k series of chips support a MACRAW mode which allows the host to
send and receive Ethernet frames directly. This can be hooked into the
lwIP stack to provide a full "socket" implementation using this Wiznet
Ethernet device. This patch adds support for this feature.
To enable the feature one must add the following to mpconfigboard.mk, or
mpconfigport.mk:
MICROPY_PY_WIZNET5K = 5500
and the following to mpconfigboard.h, or mpconfigport.h:
#define MICROPY_PY_LWIP (1)
After wiring up the module (X5=CS, X4=RST), usage on a pyboard is:
import time, network
nic = network.WIZNET5K(pyb.SPI(1), pyb.Pin.board.X5, pyb.Pin.board.X4)
nic.active(1)
while not nic.isconnected():
time.sleep_ms(50) # needed to poll the NIC
print(nic.ifconfig())
Then use the socket module as usual.
Compared to using the built-in TCP/IP stack on the Wiznet module, some
performance is lost in MACRAW mode: with a lot of memory allocated to lwIP
buffers, lwIP gives Around 750,000 bytes/sec max TCP download, compared
with 1M/sec when using the TCP/IP stack on the Wiznet module.
|
|
|
|
All it needs is a lwIP netif to function.
|
|
mod_network_nic_type_t doesn't need to be an actual uPy type, it just needs
to be an object.
|
|
It should be up to the NIC itself to decide if the network interface is
removed upon soft reset. Some NICs can keep the interface up over a soft
reset, which improves usability of the network.
|
|
If mbedtls_ctr_drbg_seed() is available in the mbedtls bulid then so should
be mbedtls_entropy_func(). Then it's up to the port to configure a valid
entropy source, eg via MBEDTLS_ENTROPY_HARDWARE_ALT.
|
|
Otherwise the "sock" member may have an undefined value if wrap_socket
fails with an exception and exits early, and then if the finaliser runs it
will try to close an invalid stream object.
Fixes issue #3828.
|
|
Fixes assertion failures and segmentation faults when making calls like:
super(1, 1).x
|
|
Fixes assertion failures when the arguments to type() were not of valid
types, e.g., when making calls like:
type("", (), 3)
type("", 3, {})
|
|
|
|
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.
|