Wykres commitów

12983 Commity (889dee8076aa1c639dbbd6ce4993872e7feb4acf)

Autor SHA1 Wiadomość Data
Damien George 889dee8076 extmod/modbluetooth: Fix conditional compilation of ringbuf_put_uuid.
This fixes a bug introduced in a76604afba

Signed-off-by: Damien George <damien@micropython.org>
2022-01-13 13:45:07 +11:00
iabdalkader f2ccf87e0b extmod/network_ninaw10: Use socket timeout preset in modusocket. 2022-01-12 14:37:40 +11:00
iabdalkader 842da93011 extmod/modusocket: Initialise accepted socket state. 2022-01-12 14:37:32 +11:00
iabdalkader 67420de4f4 extmod/modusocket: Allow setting timeout on unbound sockets.
For an extended state socket, if settimeout() is called before a NIC is
bound, save the timeout until the NIC is bound.
2022-01-12 14:36:55 +11:00
stijn b47b245c2e windows/appveyor: Build mpy-cross only once for mingw-w64.
The main Makefile builds the mpy-cross executable automatically if
it doesn't exist since 78718fffb1,
so build it first to make sure it doesn't get needlessly rebuilt.
2022-01-10 15:01:03 +01:00
Damien George ff0227fa0d esp32/boards/GENERIC_D2WD: Build with -Os optimisation.
This board has only 2MiB of flash so the build needs to be reduced in size
to fit.  Commit 549448e8bb made all boards
build with -O2 by default (for performance) so this overrides that default.

Signed-off-by: Damien George <damien@micropython.org>
2022-01-09 11:25:37 +11:00
Damien George 1892d03740 mimxrt,stm32: Enable MICROPY_PY_USSL_FINALISER.
This is needed because these ports allocate mbedtls data on the MicroPython
heap, and SSL socket objects must be fully cleaned up when they are garbage
collected, to free this memory allocated by mbedtls.  As part of this,
gc_sweep_all() will now ensure that the MP_STATE_PORT(mbedtls_memory)
linked-list is fully deallocated on soft reset.

Signed-off-by: Damien George <damien@micropython.org>
2022-01-08 00:02:04 +11:00
Damien George 772058a6bd py/mpconfig.h: Define MICROPY_PY_USSL_FINALISER only if not defined.
So a port can define it even if MICROPY_PY_USSL is not defined.

Signed-off-by: Damien George <damien@micropython.org>
2022-01-07 23:59:17 +11:00
stijn 22cf0940e1 py/modbuiltins: Add additional macro for extending builtins.
Mainly useful for defining additional globals in boards and variants.
2022-01-07 11:36:52 +11:00
Damien George df3f59ca4b ports: Update board.json files to link to new board images.
Signed-off-by: Damien George <damien@micropython.org>
2022-01-07 11:33:28 +11:00
Damien George b96318ab61 esp32: Enable platform module with IDF version.
Output looks like this:

    >>> import platform
    >>> platform.libc_ver()
    ('newlib', '3.0.0')
    >>> platform.platform()
    'MicroPython-1.17.0-xtensa-IDFv4.2.2-with-newlib3.0.0'
    >>> platform.python_compiler()
    'GCC 8.4.0'

Signed-off-by: Damien George <damien@micropython.org>
2022-01-06 18:25:48 +11:00
Damien George 3243abfda2 extmod/moduplatform: Detect xtensa arch.
Signed-off-by: Damien George <damien@micropython.org>
2022-01-06 18:24:52 +11:00
Damien George 000b001fc1 rp2/boards/GARATRONIC_PYBSTICK26_RP2040: Use correct pico-sdk board cfg.
Signed-off-by: Damien George <damien@micropython.org>
2022-01-06 16:50:20 +11:00
Damien George 4693cf9081 rp2/CMakeLists.txt: Allow a board to override PICO_BOARD.
Signed-off-by: Damien George <damien@micropython.org>
2022-01-06 16:49:57 +11:00
Damien George d4997c7b60 lib/stm32lib: Update library for fix to F7 USB HS.
Fixes build on MCUs with built-in USB HS PHY.

Signed-off-by: Damien George <damien@micropython.org>
2022-01-06 16:43:22 +11:00
Damien George 8ac5613419 LICENSE,docs: Update copyright year range to include 2022.
Signed-off-by: Damien George <damien@micropython.org>
2022-01-06 15:50:14 +11:00
iabdalkader 12f9f93b39 drivers/ninaw10/nina_wifi_drv: Fix DNS resolution.
- The wrong ACK is returned and checked.
- Send secondary DNS to google.
2022-01-06 14:37:34 +11:00
iabdalkader 5a86031223 extmod/network_ninaw10: Make recv/recvfrom interchangeable. 2022-01-06 14:36:57 +11:00
iabdalkader 73a6b53dbe extmod/network_ninaw10: Return -1 on timeout from recv/send. 2022-01-06 14:36:55 +11:00
iabdalkader 544c232eb7 extmod/network_ninaw10: Make NIC state persistent. 2022-01-06 14:36:51 +11:00
iabdalkader 0f25e0387c extmod/network_ninaw10: Disable active connections before connecting. 2022-01-06 14:36:44 +11:00
Maureen Helm c6d26bc524 zephyr: Upgrade to Zephyr v2.7.0.
Updates the Zephyr port build instructions and CI to use the latest
Zephyr release tag.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2022-01-06 14:09:39 +11:00
Maureen Helm 0cf03bd3b1 zephyr: Use CONFIG_USB_DEVICE_STACK for conditional USB device support.
CONFIG_USB was removed in Zephyr v2.7.0 after some Kconfig rework that
made it sufficient to use CONFIG_USB_DEVICE_STACK only.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2022-01-06 14:09:39 +11:00
Maureen Helm 1e5df0982a zephyr: Get UART console device from devicetree instead of Kconfig.
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-06 14:09:39 +11:00
Maureen Helm 080a9e906d zephyr: Update include path to reboot.h.
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-06 14:09:39 +11:00
Maureen Helm ddbbfbed75 zephyr: Increase minimum CMake version to 3.20.0.
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-06 14:09:39 +11:00
Maureen Helm 1469e29905 tools/ci.sh: Upgrade Zephyr docker image to v0.21.0.
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-06 14:09:39 +11:00
iabdalkader 908e4cf5c3 rp2: Add support for DHT11 and DHT22 sensors. 2022-01-06 14:00:03 +11:00
robert-hh 01d9b7adde rp2/machine_pwm: Keep duty value when changing the frequency.
The duty is saved and set whenever the frequency is changed, unless the
duty rate was not set yet.
2022-01-06 13:52:45 +11:00
robert-hh 9e56e630ca rp2/machine_pwm: Fix PWM frequency setting.
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-06 13:51:19 +11:00
iabdalkader f4487a0049 rp2/boards/ARDUINO_NANO_RP2040_CONNECT: Set default I2C pins. 2022-01-06 13:35:20 +11:00
Simon Baatz 79ae7098ca esp32/machine_bitstream: Fix signal duplication on output pins.
After changing the bitstream implementation to use the RMT driver in
commit 72d8615812
("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-06 13:21:37 +11:00
MikeTeachman 49d8ae3ecc esp32/machine_i2s: Add support for ESP-IDF 4.4.
- 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-06 13:10:38 +11:00
iabdalkader 644f4dcc94 shared/runtime/pyexec: Cleanup EXEC_FLAG flag constants.
- 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-06 13:06:39 +11:00
Emilie Feral 58b56b91c4 py/qstr: Reset mpstate.qstr_last_chunk before raising an error.
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-06 13:00:43 +11:00
NitiKaur 01953f2964 docs/differences: Document details of new PEPs/features in Python 3.5+.
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-05 22:49:20 +11:00
Chris Boudacoff 802ef271b8 mimxrt/hal: Allow readSampleClkSrc to be configured by a board.
Via the MICROPY_HW_FLASH_DQS flag.
2022-01-04 15:42:12 +11:00
stijn 3f16719888 windows/appveyor: Build both standard and dev variants.
This makes sure changes from previous related commits actually work.
2022-01-04 15:07:45 +11:00
stijn 19d949a866 tests/extmod: Skip uselect_poll_udp when poll() is not available.
This is the same fix as applied in uselect_poll_basic.py.
2022-01-04 15:07:45 +11:00
stijn 7955734aca windows: Run tests via Makefile.
The application isn't necessarily called 'micropython' especially
not When using variants, i.e. the tests need to be ran using $(PROG).
2022-01-04 15:07:45 +11:00
Andrew Leech 05ed19e73e windows: Add support for build variants to windows port.
Following the unix port.

Support for building variants with msvc was done by @stinos.
2022-01-04 15:06:26 +11:00
Damien George bfe9eba484 tools/autobuild: Build esp8266 OTA image with GENERIC_1M board.
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-30 15:47:49 +11:00
Damien George a29c70c9b4 esp8266: Allow building a board to any dest directory.
Signed-off-by: Damien George <damien@micropython.org>
2021-12-30 15:47:49 +11:00
iabdalkader 8af9dbbde1 stm32/network_wiznet5k: Fix build error with wiznet5k and lwip enabled.
Commit 4dba04a50f refactored the network code
but the combination of MICROPY_PY_WIZNET5K=5500 and MICROPY_PY_LWIP=1
broke.
2021-12-30 11:54:19 +11:00
Damien George 959e6f7da9 tools/upip.py: Skip '.frozen' entry in sys.path for install path.
Signed-off-by: Damien George <damien@micropython.org>
2021-12-29 23:55:37 +11:00
Damien George aac5a97d08 ports: Move '.frozen' to second entry in sys.path.
In commit 86ce442607 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-29 23:55:36 +11:00
Damien George 028776d97b tools/mpremote: Add link to mpremote docs URL in help message.
Signed-off-by: Damien George <damien@micropython.org>
2021-12-29 23:35:24 +11:00
Sergei Silnov 74e995dfd2 tools/mpremote: Add help command.
Fixes issue #7480
2021-12-29 09:46:33 +01:00
Michael Bentley 7566d107d5 tools/mpremote: Add mkdir and rmdir to RemoteFS.
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-22 12:13:39 +11:00
Jim Mussared 599b61c086 esp32/machine_bitstream: Replace bit-bang code with RMT-based driver.
This aims to solve glitching issues on long neopixel strips.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-12-22 12:04:13 +11:00