summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-01-06zephyr: Get UART console device from devicetree instead of Kconfig.Maureen Helm
Updates the Zephyr port to get the UART console device from devicetree instead of Kconfig. The Kconfig option CONFIG_UART_CONSOLE_ON_DEV_NAME was removed in Zephyr v2.7.0. Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2022-01-06zephyr: Update include path to reboot.h.Maureen Helm
The reboot header was moved to a different path in Zephyr v2.6.0. The old path was deprecated for two releases (v2.6.0 and v2.7.0) and will no longer be supported after Zephyr v2.7.0. Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2022-01-06zephyr: Increase minimum CMake version to 3.20.0.Maureen Helm
As a prerequisite to upgrading to Zephyr v2.7.0, upgrade the minimum CMake version required for the Zephyr port to 3.20.0. Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2022-01-06tools/ci.sh: Upgrade Zephyr docker image to v0.21.0.Maureen Helm
As a prerequisite to upgrading to Zephyr v2.7.0, upgrade CI to use Zephyr docker image v0.21.0. In particular, this is needed to pick up a newer CMake version because Zephyr v2.7.0 increased the minimum CMake version required to 3.20.0. Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2022-01-06rp2: Add support for DHT11 and DHT22 sensors.iabdalkader
2022-01-06rp2/machine_pwm: Keep duty value when changing the frequency.robert-hh
The duty is saved and set whenever the frequency is changed, unless the duty rate was not set yet.
2022-01-06rp2/machine_pwm: Fix PWM frequency setting.robert-hh
The top value was off by 1: in order to count n ticks it has to be set to n-1. Fixes issue #8122.
2022-01-06rp2/boards/ARDUINO_NANO_RP2040_CONNECT: Set default I2C pins.iabdalkader
2022-01-06esp32/machine_bitstream: Fix signal duplication on output pins.Simon Baatz
After changing the bitstream implementation to use the RMT driver in commit 72d86158121e32bbabaeade08f449d507bf40f9a ("esp32/machine_bitstream.c: Replace with RMT-based driver."), using multiple `Neopixel` instances shows signal duplication between the instances (i.e. a `write()` on one instance is written to all instances). On invocation, the rmt driver configures the GPIO matrix to route the output signal to the respective GPIO pin. When called for a different `NeoPixel` instance using a different pin, the new route is established, but the old route still exists. Now, the RMT output signal is sent to both pins. Fix this by setting the standard GPIO output function for the current pin after uninstalling the RMT driver. Signed-off-by: Simon Baatz <gmbnomis@gmail.com>
2022-01-06esp32/machine_i2s: Add support for ESP-IDF 4.4.MikeTeachman
- Add default values for I2S features added in ESP-IDF 4.4. - Add workaround for bug introduced in ESP-IDF 4.4 (https://github.com/espressif/esp-idf/issues/8121).
2022-01-06shared/runtime/pyexec: Cleanup EXEC_FLAG flag constants.iabdalkader
- Cleanup pyexec flags definitions so it's clear they are different. - Use mp_uint_t for exec_flags because it should be unsigned.
2022-01-06py/qstr: Reset mpstate.qstr_last_chunk before raising an error.Emilie Feral
The qstr_last_chunk is not collected by the garbage collector. This relies on the assertion that qstr_pool_t also references the qstr_last_chunk. If an exception is raised while allocating the qstr_pool_t, qstr_last_chunk has to be invalidated not to become a dangling reference at the next garbage collection. Signed-off-by: Emilie Feral <emilie.feral@numworks.com>
2022-01-05docs/differences: Document details of new PEPs/features in Python 3.5+.NitiKaur
And how they relate to MicroPython. As these features are implemented (or the decision is made to not implement them) the tables can be updated to document the differences between MicroPython and standard Python.
2022-01-04mimxrt/hal: Allow readSampleClkSrc to be configured by a board.Chris Boudacoff
Via the MICROPY_HW_FLASH_DQS flag.
2022-01-04windows/appveyor: Build both standard and dev variants.stijn
This makes sure changes from previous related commits actually work.
2022-01-04tests/extmod: Skip uselect_poll_udp when poll() is not available.stijn
This is the same fix as applied in uselect_poll_basic.py.
2022-01-04windows: Run tests via Makefile.stijn
The application isn't necessarily called 'micropython' especially not When using variants, i.e. the tests need to be ran using $(PROG).
2022-01-04windows: Add support for build variants to windows port.Andrew Leech
Following the unix port. Support for building variants with msvc was done by @stinos.
2021-12-30tools/autobuild: Build esp8266 OTA image with GENERIC_1M board.Damien George
Because the GENERIC board won't fit in the flash defined by esp8266_ota.ld. Signed-off-by: Damien George <damien@micropython.org>
2021-12-30esp8266: Allow building a board to any dest directory.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2021-12-30stm32/network_wiznet5k: Fix build error with wiznet5k and lwip enabled.iabdalkader
Commit 4dba04a50fea01f6f8fec83d64f958f8d14e285a refactored the network code but the combination of MICROPY_PY_WIZNET5K=5500 and MICROPY_PY_LWIP=1 broke.
2021-12-29tools/upip.py: Skip '.frozen' entry in sys.path for install path.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2021-12-29ports: Move '.frozen' to second entry in sys.path.Damien George
In commit 86ce4426079b1b368881c22f46d80045e2f720b0 the '.frozen' entry was added at the start of sys.path, to allow control over when frozen modules are searched during import, and retain existing behaviour whereby frozen was searched before the filesystem. But Python semantics of sys.path require sys.path[0] to be the directory of the currently executing script, or ''. This commit moves the '.frozen' entry to second place in sys.path, so sys.path[0] retains its correct value (described above). Signed-off-by: Damien George <damien@micropython.org>
2021-12-29tools/mpremote: Add link to mpremote docs URL in help message.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2021-12-29tools/mpremote: Add help command.Sergei Silnov
Fixes issue #7480
2021-12-22tools/mpremote: Add mkdir and rmdir to RemoteFS.Michael Bentley
This allows the remote MicroPython instance to create and delete directories from the mounted host filesystem in addition to the already existing functionality of reading, creating, and modifying files. Signed-off-by: Michael Bentley <mikebentley15@gmail.com>
2021-12-22esp32/machine_bitstream: Replace bit-bang code with RMT-based driver.Jim Mussared
This aims to solve glitching issues on long neopixel strips. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-12-22esp32/machine_pwm: Keep duty constant when changing frequency.IhorNehrutsa
Save and restore the same duty cycle when the frequency (or frequency resolution) is changed. This allows a smooth frequency change. Also update the esp32 PWM quickref to be clearer.
2021-12-21esp32/modnetwork: Synchronize WiFi AUTH_xxx constants with IDF values.IhorNehrutsa
2021-12-21tests/basics/int_big_cmp.py: Add more tests for big-int comparison.Damien George
To improve coverage of mpz_cmp and mpn_cmp. Signed-off-by: Damien George <damien@micropython.org>
2021-12-21py/mpz: Fix bugs with bitwise of -0 by ensuring all 0's are positive.Damien George
This commit makes sure that the value zero is always encoded in an mpz_t as neg=0 and len=0 (previously it was just len=0). This invariant is needed for some of the bitwise operations that operate on negative numbers, because they cannot handle -0. For example (-((1<<100)-(1<<100)))|1 was being computed as -65535, instead of 1. Fixes issue #8042. Signed-off-by: Damien George <damien@micropython.org>
2021-12-21esp8266/etshal.h: Remove unneeded function declarations.Damien George
These removed ones are either unused by MicroPython or provided by osapi.h in the SDK. In particular ets_delay_us() has different signatures for different versions of the SDK, so best to let it provide the declaration. Fixes issue #8095. Signed-off-by: Damien George <damien@micropython.org>
2021-12-20stm32/boards/OLIMEX_H407: Fix typo in OLIMEX H407 board.json.Matt Trentini
Appears incorrectly as E407 in the download manager.
2021-12-20stm32/boards/make-pins.py: Generate empty ADC table if needed.iabdalkader
If ADCx pins are hidden, print an empty table to prevent linker errors.
2021-12-19stm32/qspi: Fix typo in address comment.iabdalkader
2021-12-19stm32/factoryreset: Init vfs flags before calling pyb_flash_init_vfs.iabdalkader
The vfs flags could have any random value from stack. This bug was introduced back in 7723dac3371ccf081c2490b33b69492dc42818bd
2021-12-19py/mpstate.h: Only include sys.path/argv objects in state when enabled.Damien George
The mp_sys_path_obj and mp_sys_argv_obj objects are only used by the runtime and accessible from Python if MICROPY_PY_SYS is enabled. So exclude them from the runtime state if this option is disabled. Signed-off-by: Damien George <damien@micropython.org>
2021-12-18py/runtime: Allow initialising sys.path/argv with defaults.Damien George
If MICROPY_PY_SYS_PATH_ARGV_DEFAULTS is enabled (which it is by default) then sys.path and sys.argv will be initialised and populated with default values. This keeps all bare-metal ports aligned. Signed-off-by: Damien George <damien@micropython.org>
2021-12-18docs/library/sys.rst: Add note about '.frozen' as an entry in sys.path.Jim Mussared
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-12-18ports: Add '.frozen' as the first entry in sys.path.Jim Mussared
Frozen modules will be searched preferentially, but gives the user the ability to override this behavior. This matches the previous behavior where "" was implicitly the frozen search path, but the frozen list was checked before the filesystem. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-12-18py/mkrules.cmake: Set frozen preprocessor defs early.Jim Mussared
This ensures MICROPY_QSTR_EXTRA_POOL and MICROPY_MODULE_FROZEN_MPY are set if necessary before the CFLAGS are extracted for QSTR generation. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-12-18py: Only search frozen modules when '.frozen' is found in sys.path.Jim Mussared
This changes makemanifest.py & mpy-tool.py to merge string and mpy names into the same list (now mp_frozen_names). The various paths for loading a frozen module (mp_find_frozen_module) and checking existence of a frozen module (mp_frozen_stat) use a common function that searches this list. In addition, the frozen lookup will now only take place if the path starts with ".frozen", which needs to be added to sys.path. This fixes issues #1804, #2322, #3509, #6419. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-12-17tools/makemanifest.py: Merge make-frozen.py.Jim Mussared
Takes the functionality from tools/make-frozen.py, adds support for multiple frozen directories, and moves it to tools/makemanifest.py. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-12-17all: Remove support for FROZEN_DIR and FROZEN_MPY_DIR.Jim Mussared
These have been deprecated for over two years in favour of FROZEN_MANIFEST and manifest.py. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-12-17teensy: Switch to use manifest.py instead of FROZEN_DIR.Jim Mussared
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-12-17py/modio: Remove io.resource_stream function.Jim Mussared
This feature is not enabled on any port, it's not in CPython's io module, and functionality is better suited to the micropython-lib implementation of pkg_resources.
2021-12-15py/showbc: Fix printing of raw bytecode header on nanbox builds.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2021-12-15tools/makemanifest.py: Make str conversion compatible with Python 2.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2021-12-15esp32/boards: Remove SPI pin defaults from GENERIC S2/S3 boards.Tomas Vanek
Default SPI pins are now correctly assigned by machine_hw_spi.c even for S2 and S3. mpconfigboard.h files define defaults with flipped SPI(1) and SPI(2) to workaround a bug in machine_hw_spi.c - the bug is fixed. Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
2021-12-15esp32/machine_hw_spi: Set proper default SPI(id=2) pins on S2 and S3.Tomas Vanek
Use IO_MUX pins as defined by ESP IDF in soc/esp32/include/soc/spi_pins.h ESP32S2 and S3 don't have IO_MUX pins for SPI3, GPIO matrix is always used. Choose suitable defaults for S2 and S3. ESP32C3 does not have SPI3 at all. Don't define pin mappings for it. Signed-off-by: Tomas Vanek <vanekt@fbl.cz>