aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-06-04cc3200/mods: Include stream.h to get definition of mp_stream_p_t.Damien George
2018-06-04py/stream: Move definition of mp_stream_p_t from obj.h to stream.h.Damien George
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.
2018-06-03stm32/modnetwork: Fix arg indexing in generic ifconfig method.Damien George
2018-06-01stm32: Add network driver for Wiznet5k using MACRAW mode and lwIP.Damien George
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.
2018-06-01drivers/wiznet5k: Fix bug with MACRAW socket calculating packet size.Damien George
2018-06-01stm32/modnetwork: Provide generic implementation of ifconfig method.Damien George
All it needs is a lwIP netif to function.
2018-06-01stm32/modnetwork: Change base entry of NIC object from type to base.Damien George
mod_network_nic_type_t doesn't need to be an actual uPy type, it just needs to be an object.
2018-06-01stm32/modnetwork: Don't take netif's down when network is deinited.Damien George
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.
2018-05-31extmod/modussl_mbedtls: Use mbedtls_entropy_func for CTR-DRBG entropy.Damien George
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.
2018-05-31extmod/modussl_mbedtls: Populate sock member right away in wrap_socket.Damien George
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.
2018-05-30py/objtype: Fix assertion failures in super_attr by checking type.Jeff Epler
Fixes assertion failures and segmentation faults when making calls like: super(1, 1).x
2018-05-30py/objtype: Fix assertion failures in mp_obj_new_type by checking types.Jeff Epler
Fixes assertion failures when the arguments to type() were not of valid types, e.g., when making calls like: type("", (), 3) type("", 3, {})
2018-05-30stm32/flash: Increase H7 flash size to full 2MiB.Damien George
2018-05-30stm32/boards: Ensure USB OTG power is off for NUCLEO_F767ZI.rolandvs
And update the GPIO init for NUCLEO_H743ZI to consistently use the mphal functions.
2018-05-29stm32/boards: Split combined alt-func labels and fix some other errors.rolandvs
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
2018-05-28stm32/README: Update to include STM32F0 in list of supported MCUs.Damien George
2018-05-28stm32/boards: Add NUCLEO_F091RC board configuration files.Damien George
2018-05-28stm32/boards: Add alt-func CSV list and linker script for STM32F091.Damien George
2018-05-28stm32: Add support for STM32F0 MCUs.Damien George
2018-05-28stm32/boards: Add startup_stm32f0.s for STM32F0 MCUs.Damien George
Sourced from STM32Cube_FW_F0_V1.9.0.
2018-05-28lib/stm32lib: Update library to include support for STM32F0 MCUs.Damien George
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
2018-05-28stm32: Allow a board to disable MICROPY_VFS_FAT.Damien George
2018-05-28stm32/timer: Make timer_get_source_freq more efficient by using regs.Damien George
Use direct register access to get the APB clock divider. This reduces code size and makes the code more efficient.
2018-05-28stm32: Add support for Cortex-M0 CPUs.Damien George
2018-05-28stm32: Allow to have no storage support if there are no block devices.Damien George
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.
2018-05-28stm32/usb: Guard USB device code with #if for whether USB is enabled.Damien George
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.
2018-05-28esp32: Silence ESP-IDF log messages when in raw REPL mode.Nick Moore
This prevents clients such as ampy, mpy-utils, etc getting confused by extraneous data.
2018-05-25py/objtype: Remove TODO comment about needing to check for property.Damien George
Instance members are always treated as values, even if they are properties. A test is added to show this is the case.
2018-05-24stm32: Add new component, the mboot bootloader.Damien George
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.
2018-05-24stm32: Add low-level hardware I2C slave driver.Damien George
2018-05-24stm32: Remove unneeded HTML release notes from usbdev and usbhost dirs.Damien George
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.
2018-05-23esp32/esp32.custom_common.ld: Put soc code in iram0.Damien George
This is what the IDF does, it must be done.
2018-05-23py/emit: Combine setup with/except/finally into one emit function.Damien George
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
2018-05-23py/emit: Merge build set/slice into existing build emit function.Damien George
Reduces code size by: bare-arm: +0 minimal x86: +0 unix x64: -368 unix nanbox: -248 stm32: -128 cc3200: -48 esp8266: -184 esp32: -40
2018-05-23py/emit: Combine import from/name/star into one emit function.Damien George
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
2018-05-23py/emit: Combine break_loop and continue_loop into one emit function.Damien George
Reduces code size by: bare-arm: +0 minimal x86: +0 unix x64: -80 unix nanbox: +0 stm32: -12 cc3200: +0 esp8266: -28 esp32: +0
2018-05-23py/emit: Combine load/store/delete attr into one emit function.Damien George
Reduces code size by: bare-arm: -20 minimal x86: -140 unix x64: -408 unix nanbox: -140 stm32: -68 cc3200: -16 esp8266: -80 esp32: -32
2018-05-23py/emit: Combine load/store/delete subscr into one emit function.Damien George
Reduces code size by: bare-arm: -8 minimal x86: -104 unix x64: -312 unix nanbox: -120 stm32: -60 cc3200: -16 esp8266: -92 esp32: -24
2018-05-23py/emit: Combine name and global into one func for load/store/delete.Damien George
Reduces code size by: bare-arm: -56 minimal x86: -300 unix x64: -576 unix nanbox: -300 stm32: -164 cc3200: -56 esp8266: -236 esp32: -76
2018-05-23py/emit: Combine build tuple/list/map emit funcs into one.Damien George
Reduces code size by: bare-arm: -24 minimal x86: -192 unix x64: -288 unix nanbox: -184 stm32: -72 cc3200: -16 esp8266: -148 esp32: -32
2018-05-23py/emit: Combine yield value and yield-from emit funcs into one.Damien George
Reduces code size by: bare-arm: -24 minimal x86: -72 unix x64: -200 unix nanbox: -72 stm32: -52 cc3200: -32 esp8266: -84 esp32: -24
2018-05-23py/emit: Combine fast and deref into one function for load/store/delete.Damien George
Reduces code size by: bare-arm: -16 minimal x86: -208 unix x64: -408 unix nanbox: -248 stm32: -12 cc3200: -24 esp8266: -96 esp32: -44
2018-05-22py/objgenerator: Protect against reentering a generator.Damien George
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.
2018-05-22py/objgenerator: Save state in old_globals instead of local variable.Damien George
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.
2018-05-22ports: Enable MICROPY_PY_BUILTINS_ROUND_INT on selected ports.Damien George
2018-05-22py/modbuiltins: Add support for rounding integers.Jan Klusacek
As per CPython semantics. This feature is controlled by MICROPY_PY_BUILTINS_ROUND_INT which is disabled by default.
2018-05-22py/parsenum: Adjust braces so they are balanced.Damien George
2018-05-22stm32/main: Use consistent indenting of macro #if's.Damien George
2018-05-22stm32/rng: Use Yasmarang for rng_get() if MCU doesn't have HW RNG.Damien George
2018-05-21stm32: Integrate lwIP as implementation of usocket module.Damien George
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.