Commit Graph

5 Commits

Author SHA1 Message Date
Amir Gonnen
995f9cfdfc esp32: Pin MicroPython tasks to a specific core.
On this port the GIL is enabled and everything works under the assumption
of the GIL, ie that a given task has exclusive access to the uPy state, and
any ISRs interrupt the current task and therefore the ISR inherits
exclusive access to the uPy state for the duration of its execution.

If the MicroPython tasks are not pinned to a specific core then an ISR may
be executed on a different core to the task, making it possible for the
main task and an ISR to execute in parallel, breaking the assumption of the
GIL.

The easiest and safest fix for this is to pin all MicroPython related code
to the same CPU core, as done by this patch.  Then any ISR that accesses
MicroPython state must be registered from a MicroPython task, to ensure it
is invoked on the same core.

See issue #4895.
2019-07-25 15:33:47 +10:00
Eric Poulsen
fa5c0b819c esp32/network_ppp: Add ppp_set_usepeerdns(pcb, 1) when init'ing iface.
Without this you often don't get any DNS server from your network provider.
Additionally, setting your own DNS _does not work_ without this option set
(which could be a bug in the PPP stack).
2019-07-04 11:17:41 +10:00
Damien George
0557f0b74b esp32/network_ppp: Add a timeout for closing PPP connection.
This also fixes deleting the PPP task, since eTaskGetState() never returns
eDeleted.

A limitation with this patch: once the PPP is deactivated (ppp.active(0))
it cannot be used again. A new PPP instance must be created instead.
2019-05-17 17:14:45 +10:00
Damien George
3d49b157b8 esp32: Update to latest ESP IDF using sdkconfig and new ldgen procedure.
Configuration for the build is now specified using sdkconfig rather than
sdkconfig.h, which allows for much easier configuration with defaults from
the ESP IDF automatically applied.  sdkconfig.h is generated using the new
ESP IDF kconfig_new tool written in Python.  Custom configuration for a
particular ESP32 board can be specified via the make variable SDKCONFIG.

The esp32.common.ld file is also now generated using the standard ESP IDF
ldgen.py tool.
2019-01-28 12:44:03 +11:00
Eric Poulsen
3c6f639aa5 esp32/network_ppp: Add PPPoS functionality.
This commit adds network.PPP(stream) which allows to create a TCP/IP
network interface over a stream object (eg a UART).
2018-10-19 23:32:02 +11:00