summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-09-16minimal/mpconfigport.h: Use MICROPY_CONFIG_ROM_LEVEL_MINIMUM.Jim Mussared
Update minimal port to use the new "minimal" rom level config (this is a no-op change, the binary is the same size and contains the exact same symbols). Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-09-16py/mpconfig.h: Define initial templates for "feature levels".Jim Mussared
This is the beginning of a set of changes to simplify enabling/disabling features. The goals are: - Remove redundancy from mpconfigport.h (never set a value to the default -- make it clear exactly what's being enabled). - Improve consistency between ports. All "similar" ports (i.e. approx same flash size) should get the same features. - Simplify mpconfigport.h -- just get default/sensible options for the size of the port. - Make it easy for defining constrained boards (e.g. STM32F0/L0), they can just set a lower level. This commit makes a step towards this and defines the "core" level as the current default feature set, and a "minimal" level to turn off everything. And a few placeholder levels are added for where the other ports will roughly land. This is a no-op change for all ports. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-09-16stm32/dma: Add functions for external users of DMA to enable clock.Damien George
Any external user of DMA (eg a board with a custom DMA driver) must call dma_external_acquire() for their DMA controller/stream to ensure that the DMA clock is not automatically turned off while it's still being used externally. Signed-off-by: Damien George <damien@micropython.org>
2021-09-16stm32/boards/make-pins.py: Allow empty lines and comments in pins.csv.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2021-09-16stm32/boards/make-pins.py: Allow a CPU pin to be hidden.Damien George
This change allows a CPU pin to be hidden from the user by prefixing it with a "-" in the pins.csv file for a board. It will still be available in C code, just not exposed to Python. Signed-off-by: Damien George <damien@micropython.org>
2021-09-16stm32: Suggest putting code in main.py not boot.py.Jim Mussared
Don't want users to accidentally use boot.py (because recovering requires knowing how to activate safe mode). Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-09-16stm32: Add support for H7A3(Q)/H7B3(Q), and STM32H73B3I_DK board defn.Jan Staal
This commit is based upon prior work of @dpgeorge and @koendv. MCU support for the STM32H7A3 and B3 families MCUs: - STM32H7A3xx - STM32H7A3xxQ (SMPS) - STM32H7B3xx - STM32H7B3xxQ (SMPS) Support has been added for the STM32H7B3I_DK board. Signed-off-by: Jan Staal <info@janstaal.com>
2021-09-15extmod/modnetwork: Remove modnetwork socket u_state member.iabdalkader
To simplify the socket state. The CC3K driver (see drivers/cc3000/inc/socket.h and src/socket.c) has socket() returning an INT16 so there is now enough room to store it directly in the fileno member.
2021-09-15extmod/modnetwork: Remove STM32 references.iabdalkader
2021-09-15stm32: Add basic support for STM32H750.Jan Hrudka
2021-09-15extmod/network_cyw43: Make consistent use of STA and AP constants.Damien George
The network.STA_IF and network.AP_IF constants are now independent to the CYW43_ITF_STA and CYW43_ITF_AP constants. Signed-off-by: Damien George <damien@micropython.org>
2021-09-15extmod/modnetwork: Define network interfaces in port config files.iabdalkader
So this network implementation becomes more generic.
2021-09-15extmod/modusocket: Add read/write stream methods to socket object.iabdalkader
Following other socket implementations.
2021-09-15extmod/modnetwork: Add extended socket state.iabdalkader
2021-09-15extmod/modnetwork: Add STA_IF and AP_IF constants.iabdalkader
2021-09-15extmod: Move modnetwork and modusocket from stm32 to extmod.iabdalkader
So they can be used by other ports.
2021-09-14mimxrt: Rework flash configuration.Philipp Ebensberger
- Moves definition of BOARD_FLASH_SIZE and other header files related to flash configuration into the Makefile. - Adds board specific clock_config.h. - Adds board.h, pin_mux.h, and peripherals.h as they are required by NXP MCU SDK in order to use our own clock_config.h. - Renames board specific FlexSPI configuration files. - Updates flash frequency of MIMXRT1020_EVK - Creates separated flash_config files for QSPI NOR and QSPI Hyper flash. - Unifies VFS start address to be @ 1M for 1010 and 1020 boards. - Unifies 1050EVK boards - Adds support to both NOR and HyperFlash on boards with both capabilities. - Adds automatic FlexRAM initialization to start-up code based on linker script and NXP HAL. - Applies code formatting to all files in mimxrt port. With this change the flash configuration is restructured and organized. This simplifies the configuration process and provides a better overview of each board's settings. With the integration of clock_config.h, board.h, pin_mux.h, and peripherals.h we gain better control of the settings and clock configurations. Furthermore the implementation of an explicit FlexRAM setup improves the system performance and allows for performance tuning. Signed-off-by: Philipp Ebensberger
2021-09-13py/emitnative: Ensure load_subscr does not clobber existing REG_RET.Damien George
Fixes issue #7782, and part of issue #6314. Signed-off-by: Damien George <damien@micropython.org>
2021-09-13tests/perf_bench: Use math.log instead of math.log2.Damien George
So MICROPY_PY_MATH_SPECIAL_FUNCTIONS is not needed for these performance tests. Signed-off-by: Damien George <damien@micropython.org>
2021-09-13esp32/machine_timer: Use tx_update member for IDF 4.4 and above.Seon Rozenblum
2021-09-13docs/library/machine.I2S.rst: Specify that I2S.shift args are kw-only.Peter Hinch
2021-09-13docs/make.bat: Change Windows output dir from '_build' to 'build'.Ihor Nehrutsa
To match the output file used by Makefile.
2021-09-10stm32/boards: Remove trailing spaces, and add newline at end of file.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2021-09-10stm32/boards/LEGO_HUB_NO6: Remove user paths from cc2564 init file.Tobias Thyrrestrup
Signed-off-by: Tobias Thyrrestrup <tt@LEGO.com>
2021-09-10stm32/boards/OLIMEX_E407: Add Ethernet RMII support.Daniel Gorny
2021-09-10stm32/boards/VCC_GND_H743VI: Add board definition for VCC_GND_H743VI.Boris Vinogradov
2021-09-10tools/autobuild: Add auto build for GENERIC_C3_USB.Patrick Van Oosterwijck
2021-09-10esp32/boards: Add new FeatherS2-Neo board definition.Seon Rozenblum
2021-09-10docs/library/bluetooth.rst: Update incorrect link to gatts_write.Matt Trentini
2021-09-10docs/library/os.rst: Clarify littlefs requirements for block erase.Peter Hinch
2021-09-10windows/README: Remove unsupported Python instructions for Cygwin.stijn
It's not possible anymore to build MicroPython on Cygwin using a standard Windows installation of Python so don't advertise that. Specifically: preprocessing in makeqstrdefs.py fails on the subprocess call with 'gcc: fatal error: no input files' because one of the flags contains double quotes and that somehow messes up the commandline.
2021-09-10py/parse: Simplify parse nodes representing a list.Damien George
This commit simplifies and optimises the parse tree in-memory representation of lists of expressions, for tuples and lists, and when tuples are used on the left-hand-side of assignments and within del statements. This reduces memory usage of the parse tree when such code is compiled, and also reduces the size of the compiler. For example, (1,) was previously the following parse tree: expr_stmt(5) (n=2) atom_paren(45) (n=1) testlist_comp(146) (n=2) int(1) testlist_comp_3b(149) (n=1) NULL NULL and with this commit is now: expr_stmt(5) (n=2) atom_paren(45) (n=1) testlist_comp(146) (n=1) int(1) NULL Similarly, (1, 2, 3) was previously: expr_stmt(5) (n=2) atom_paren(45) (n=1) testlist_comp(146) (n=2) int(1) testlist_comp_3c(150) (n=2) int(2) int(3) NULL and is now: expr_stmt(5) (n=2) atom_paren(45) (n=1) testlist_comp(146) (n=3) int(1) int(2) int(3) NULL Signed-off-by: Damien George <damien@micropython.org>
2021-09-10mimxrt/machine_bitstream: Add bitstream function to machine module.robert-hh
Following the code example for ESP32 of Jim Mussard. As a side effect: - mp_hal_ticks_cpu() was implemented, - mp_hal_get_cpu_freq() and mp_hal_ticks_cpu_init() were added and used. - mp_hal_pin_high() and mp_hal_pin_low() were changed for symmetry
2021-09-07mimxrt/sdcard: Implement SDCard driver.Philipp Ebensberger
- Configures `PLL2->PFD0` with **198MHz** as base clock of `USDHCx` peripheral. - Adds guards for SDCard related files via `MICROPY_PY_MACHINE_SDCARD` - Adds creation of pin defines for SDCard to make-pins.py - Adds new configuration option for SDCard peripheral pinout to mpconfigport.h - Adds interrupt handling support instead of polling - Adds support for `ADMA2` powered data transfer - Configures SDCard to run in HS (high-speed mode) with **50MHz** only! SDCard support is optional and requires `USDHC` peripheral. Thus this driver is not available on `MIMXRT1010_EVK`. SDCard support is enabled by setting `MICROPY_PY_MACHINE_SDCARD = 1` in mpconfigboard.mk. Signed-off-by: Philipp Ebensberger
2021-09-04rp2/mpconfigport.h: Enable heapq module.YoungJoon Chun
Fixes issue #7746.
2021-09-04extmod/machine_pwm: Factor out machine.PWM bindings to common code.Damien George
This commit refactors machine.PWM and creates extmod/machine_pwm.c. The esp8266, esp32 and rp2 ports all use this and provide implementations of the required PWM functionality. This helps to reduce code duplication and keep the same Python API across ports. This commit does not make any functional changes. Signed-off-by: Damien George <damien@micropython.org>
2021-09-02stm32/main: Don't unconditionally enable GPIO A,B,C,D clocks.Damien George
Rely on them being enabled only when needed. Signed-off-by: Damien George <damien@micropython.org>
2021-09-02stm32/pin: Enable GPIO clock of pin if it's constructed without init.Damien George
Fixes issue #7363. Signed-off-by: Damien George <damien@micropython.org>
2021-09-02zephyr/mphalport.h: Remove unused and unimplemented C-level pin API.Damien George
It gives compile warnings. Signed-off-by: Damien George <damien@micropython.org>
2021-09-02extmod/modonewire: Make _onewire module configurable via macro option.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2021-09-02extmod/machine_spi: Make SoftSPI configurable via macro option.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2021-09-02extmod/machine_i2c: Make SoftI2C configurable via macro option.Damien George
The zephyr port doesn't support SoftI2C so it's not enabled, and the legacy I2C constructor check can be removed. Signed-off-by: Damien George <damien@micropython.org>
2021-09-02all: Bump version to 1.17.v1.17Damien George
Signed-off-by: Damien George <damien@micropython.org>
2021-09-02stm32/boards/LEGO_HUB_NO6: Add comment re constraints on SPI flash cfg.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2021-09-01tools/mpremote: Bump version to 0.0.6.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2021-09-01tests/pybnative: Make while.py test run on boards without pyb.delay.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2021-09-01javascript/Makefile: Change variable to EXPORTED_RUNTIME_METHODS.Damien George
EXTRA_EXPORTED_RUNTIME_METHODS is deprecated. Signed-off-by: Damien George <damien@micropython.org>
2021-08-31tools/uncrustify: Force 1 newline at end of file.David Lechner
To keep things neat and tidy, we ensure that each file has 1 and only 1 newline at the end of each file. Signed-off-by: David Lechner <david@pybricks.com>
2021-08-31drivers/cyw43: Make wifi join fail if interface is not active.Damien George
Otherwise the Python network object continues to report that it is attempting to connect. Also make the return error code consistent with wifi scan. Signed-off-by: Damien George <damien@micropython.org>
2021-08-31drivers/cyw43: Fix cyw43_deinit so it can be called many times in a row.Damien George
This makes sure deinit() can be called on the interface many times without error, and that the state of the driver is fully reset. Fixes issue #7493. Signed-off-by: Damien George <damien@micropython.org>