Commit Graph

13 Commits

Author SHA1 Message Date
Johny Mattsson f123d46209 Add ESP32C3 support/coexistence.
The uzlib and parts of Lua had to be switched over to use the
C standard int types, as their custom typedefs conflicted with
RISC-V toolchain provided typedefs.

UART console driver updated to do less direct register meddling
and use the IDF uart driver interface for setup. Still using our
own ISR rather than the default driver ISR. Down the line we
might want to investigate whether the IDF ISR would be a better
fit.

Lua C modules have been split into common and ESP32/ESP32-S
specific ones. In the future there might also be ESP32-C3
specific modules, which would go into components/modules-esp32c3
at that point.

Our old automatic fixup of flash size has been discarded as it
interferes with the checksumming done by the ROM loader and
results in unbootable systems. The IDF has already taken on
this work via the ESPTOOL_FLASHSIZE_DETECT option, which handles
this situation properly.
2021-08-11 17:32:47 +10:00
Johny Mattsson 16ef39e255 idf4: overhaul to new build system, part 1 of 3
Yet to come:
  - part 2: dealing with deprecated and removed APIs
  - part 3: making it actually work again
2021-07-15 16:27:03 +10:00
devsaurus 358379fd90 Updated ESP-IDF to latest. 2018-10-07 12:33:40 +02:00
devsaurus 8d0a8a5763 refactor task wdt handling to platform layer 2018-04-04 09:25:47 +02:00
devsaurus 8d843e5beb fix task wdt to handle PANIC situations and spiffs formatting 2018-04-02 21:17:18 +02:00
devsaurus c8e99d50a5 Updated to latest IDF. 2017-04-14 00:22:33 +02:00
Johny Mattsson 2b454abfdf Improved flash size detection.
With the recent flash layout changes, it became very possible to misdetect the
flash size. We're now using the partition table as the guard marker, since
that really shouldn't be all 0xff. Also, we now don't clobber the flash
device id (and keep block/sector/page/mask values).
2016-11-17 11:56:39 +11:00
Johny Mattsson 2266670b46 Updated to latest IDF. 2016-11-16 17:59:06 +11:00
Johny Mattsson 5c1bb4c6d6 Updated to latest IDF.
WiFi STA module updated to reflect IDF name changes.

Platform flash and partition api updated to reflect IDF name changes.
Eventually these (and the SPIFFS module) will likely need to be updated
to exclusively work with the esp_partition_xxx() functions in order to
support working with encrypted flash.
2016-11-12 13:17:17 +11:00
Johny Mattsson baf8249a79 Improved flash-size auto-detection.
No longer limited to the default 2MB.
2016-09-23 17:39:06 +10:00
Johny Mattsson 0fe0096c04 Platform flash layer updated for ESP32.
It would appear my ESP3212 only has a 2MB flash chip despite the
bootloader saying 4MB.
2016-09-22 14:56:40 +10:00
Johny Mattsson 9bbf8f43fb Successfully boot barebones NodeMCU on ESP32 (only).
RTOS driver evicted as it did not play nice with stdio etc.

Implemented a minimal driver to fully support Lua console on UART0. Output
on UART0 done via stdout (provided by the IDF). Input and setup handled
via driver_console/console.c. In addition to the direct input function
console_getc(), the driver also registers in the syscall tables to enable
regular stdio input functions to work (yay!). The Lua VM is still using the
direct interface since it's less overhead, but does also work when going
through stdin/fd 0.

Auto-bauding on the console is not yet functional; revisit when the UART docs
are available.

Module registration/linking/enabling moved over to be Kconfig based. See
updates to base_nodemcu/include/module.h and base_nodemcu/Kconfig for
details.

The sdk-overrides directory/approach is no longer used. The IDF is simply
too different to the old RTOS SDK - we need to adapt our code directly instead.

Everything in app/ is now unused, and will need to be gradually migrated
into components/ though it is probably better to migrate straight from the
latest dev branch.
2016-09-20 13:35:56 +10:00
Johny Mattsson a463d764eb WIP ESP32 IDF port.
Currently the UART driver break boot (or at least output).
2016-09-16 18:11:42 +10:00