Adds support for NeoPixels on GPIO32 and GPIO33 on ESP32. Otherwise,
NeoPixels wired to GPIO32/33 wll silently fail without any hints to the
user.
With thanks to @robert-hh.
Fixes issue #7221.
ATOM is a very small ESP32 development board produced by M5Stack, with a
size of 24mm * 24mm, with peripherals such as WS2812, IR, button, MPU6886
(Only Matrix), and 8 GPIO extensions. It also has a plastic shell.
Improvements made:
- PSRAM support for S2
- partition definition for 16MiB flash
- correct ADC and DAC pins
- correct GPIO and IRQ pins
- S3 components in CMakeLists
Based on original commit made by Seon Rozenblum aka @UnexpectedMaker.
Signed-off-by: Damien George <damien@micropython.org>
So a lock can be acquired on one Python thread and then released on
another. A test for this is added.
Signed-off-by: Damien George <damien@micropython.org>
Because vPortCleanUpTCB runs on the FreeRTOS idle task and cannot execute
any VM or runtime related code like freeing memory.
Signed-off-by: Damien George <damien@micropython.org>
This helper is added to properly set a pending exception, to mirror
mp_sched_schedule(), which schedules a function.
Signed-off-by: Damien George <damien@micropython.org>
This commit re-enables the command-line make option "FROZEN_MANIFEST". The
boards/*/mpconfigboard.cmake will now use the command-line FROZEN_MANIFEST
value if supplied.
Usage: make FROZEN_MANIFEST=~/foo/my-manifest.py
Because "find_package(Python3 ...)" requires at least this version of
CMake. And other features like GREATER_EQUAL and COMMAND_EXPAND_LISTS need
at least CMake 3.7 and 3.8 respectively.
Signed-off-by: Damien George <damien@micropython.org>
Commit 8a917ad252 added the gpio_reset_pin()
call to make sure that pins that were used as ADC inputs could subsequently
be used as digital IO. But calling gpio_reset_pin() will enable the
pull-up on the pin and so pull it high for a brief period. Instead use
rtc_gpio_deinit() which will just reconfigure the pin as a digital IO and
do nothing else.
Fixes issue #7079 (see also #5771).
Signed-off-by: Damien George <damien@micropython.org>
For an unconnected TCP socket, poll should return WR|HUP and read should
raise ENOTCONN. This is implemented by this commit and now the following
tests pass on esp32: extmod/usocket_tcp_basic.py,
net_hosted/connect_poll.py.
Signed-off-by: Damien George <damien@micropython.org>
It was noticed that the esp32 port didn't build ulab correctly. The
problem was a multiple defintion of the 'mp_hal_stdout_tx_str' and
'mp_hal_stdout_tx_strn_cooked' functions.
They were defined in stdout_helpers.c but also in the
ports/esp32/mphalport.c.
Fixed by removing stdout_helpers.c from the build.
Signed-off-by: Michael O'Cleirigh <michael.ocleirigh@rivulet.ca>
Support for User C and C++ modules was lost due to upgrading the esp32 to
the latest CMake based IDF from the GNUMakefile build process.
Restore the support for the esp32 port by integrating with the approach
recently added for the rp2 port.
Signed-off-by: Michael O'Cleirigh <michael.ocleirigh@rivulet.ca>
This commit fixes two issues on the esp32:
- it enables machine.soft_reset() to be called in main.py;
- it enables machine.reset_cause() to correctly identify a soft reset.
The former is useful in that it enables soft resets in applications that
are started at boot time. The support is patterned after the stm32 port.
This commit implements basic NVS support for the esp32. It follows the
pattern of the esp32.Partition class and exposes an NVS object per NVS
namespace. The initial support provided is only for signed 32-bit integers
and binary blobs. It's easy (albeit a bit tedious) to add support for
more types.
See discussions in: #4436, #4707, #6780
This enables -Os for compilation, but still keeps full assertion messages.
With IDF v4.2, -Os changes the GENERIC firmware size from 1512176 down to
1384640, and the GENERIC_SPIRAM firmware is now 1452320 which fits in the
allocated partition.
Signed-off-by: Damien George <damien@micropython.org>
The underlying OS (the ESP-IDF) uses it's own internal errno codes and so
it's simpler and cleaner to use those rather than trying to convert
everything to the values defined in py/mperrno.h.
It's now replaced by cmake/idf.py. But a convenience Makefile is still
provided with traditional targets like "all" and "deploy".
Signed-off-by: Damien George <damien@micropython.org>
This commit adds support for building the esp32 port with cmake, and in
particular it builds MicroPython as a component within the ESP-IDF. Using
cmake and the ESP-IDF build infrastructure makes it much easier to maintain
the port, especially with the various new ESP32 MCUs and their required
toolchains.
Signed-off-by: Damien George <damien@micropython.org>