Add fault handling for ESP32, ESP32-S2, and ESP32-S3.

Also bump the version.
This commit is contained in:
Brad Nelson
2023-01-04 21:45:26 -08:00
parent b155e49a63
commit 600e82d67e
5 changed files with 45 additions and 8 deletions

View File

@ -86,7 +86,7 @@ static cell_t ResizeFile(cell_t fd, cell_t size);
#define REQUIRED_SYSTEM_SUPPORT \
X("MS-TICKS", MS_TICKS, PUSH millis()) \
XV(internals, "RAW-YIELD", RAW_YIELD, yield()) \
XV(internals, "RAW-TERMINATE", RAW_TERMINATE, exit(n0))
XV(internals, "RAW-TERMINATE", RAW_TERMINATE, ESP.restart())
#define REQUIRED_SERIAL_SUPPORT \
XV(serial, "Serial.begin", SERIAL_BEGIN, Serial.begin(tos); DROP) \

View File

@ -52,6 +52,11 @@
# define ENABLE_RMT_SUPPORT
#endif
// ESP32-C3 doesn't support fault handling yet.
#if !defined(CONFIG_IDF_TARGET_ESP32C3)
# define ENABLE_ESP32_FORTH_FAULT_HANDLING
#endif
// Uncomment this #define for OLED Support.
// You will need to install these libraries from the Library Manager:
// Adafruit SSD1306

View File

@ -39,6 +39,9 @@ PLATFORM_SIMULATED_OPCODE_LIST
#define heap_caps_get_largest_free_block(x) SIM_HEAP_SIZE
#define heap_caps_get_free_size(x) SIM_HEAP_SIZE
// Fault handling can't work in the simulator for now.
#undef ENABLE_ESP32_FORTH_FAULT_HANDLING
#include "common/bits.h"
#include "common/core.h"
#include "common/interp.h"