Thonny causing crash emitglue.c:199:

This commit is contained in:
Dan Halbert 2022-07-06 23:01:19 -04:00
parent 8bb369cac5
commit 4e88d795e1
5 changed files with 295 additions and 17 deletions

View File

@ -1,4 +1,4 @@
# Automatically generated file. DO NOT EDIT.
# Espressif IoT Development Framework (ESP-IDF) Project Configuration
#
# Bootloader config
@ -12,6 +12,9 @@ CONFIG_BOOTLOADER_LOG_LEVEL=0
# Serial flasher config
#
# CONFIG_ESPTOOLPY_FLASHFREQ_26M is not set
# CONFIG_ESPTOOLPY_FLASHSIZE_32MB is not set
# CONFIG_ESPTOOLPY_FLASHSIZE_64MB is not set
# CONFIG_ESPTOOLPY_FLASHSIZE_128MB is not set
# end of Serial flasher config
#
@ -24,23 +27,283 @@ CONFIG_PARTITION_TABLE_FILENAME="esp-idf-config/partitions-8MB-no-uf2.csv"
#
# Compiler options
#
# CONFIG_COMPILER_SAVE_RESTORE_LIBCALLS is not set
CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE=y
# CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT is not set
CONFIG_COMPILER_OPTIMIZATION_ASSERTION_LEVEL=2
# end of Compiler options
#
# Component config
#
#
# Bluetooth
#
# CONFIG_BT_ENABLED is not set
# end of Bluetooth
#
# Driver configurations
#
#
# TWAI configuration
#
# CONFIG_TWAI_ERRATA_FIX_BUS_OFF_REC is not set
# CONFIG_TWAI_ERRATA_FIX_TX_INTR_LOST is not set
# CONFIG_TWAI_ERRATA_FIX_RX_FRAME_INVALID is not set
# CONFIG_TWAI_ERRATA_FIX_RX_FIFO_CORRUPT is not set
# end of TWAI configuration
#
# UART configuration
#
CONFIG_UART_ISR_IN_IRAM=y
# end of UART configuration
#
# RTCIO configuration
#
# CONFIG_RTCIO_SUPPORT_RTC_GPIO_DESC is not set
# end of RTCIO configuration
#
# GPIO Configuration
#
# CONFIG_GPIO_ESP32_SUPPORT_SWITCH_SLP_PULL is not set
# end of GPIO Configuration
# end of Driver configurations
#
# eFuse Bit Manager
#
# CONFIG_EFUSE_CODE_SCHEME_COMPAT_NONE is not set
CONFIG_EFUSE_CODE_SCHEME_COMPAT_3_4=y
# CONFIG_EFUSE_CODE_SCHEME_COMPAT_REPEAT is not set
CONFIG_EFUSE_MAX_BLK_LEN=192
# end of eFuse Bit Manager
#
# ESP-TLS
#
# CONFIG_ESP_TLS_USE_SECURE_ELEMENT is not set
# CONFIG_ESP_TLS_SERVER_MIN_AUTH_MODE_OPTIONAL is not set
# end of ESP-TLS
#
# ESP32-specific
#
CONFIG_ESP32_ECO3_CACHE_LOCK_FIX=y
CONFIG_ESP32_SPIRAM_SUPPORT=y
CONFIG_UART_ISR_IN_IRAM=y
#
# SPI RAM config
#
CONFIG_SPIRAM_TYPE_AUTO=y
# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set
# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set
# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set
CONFIG_SPIRAM_SIZE=-1
CONFIG_SPIRAM_SPEED_40M=y
CONFIG_SPIRAM=y
CONFIG_SPIRAM_BOOT_INIT=y
# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set
# CONFIG_SPIRAM_USE_MEMMAP is not set
# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set
CONFIG_SPIRAM_USE_MALLOC=y
CONFIG_SPIRAM_MEMTEST=y
CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=16384
# CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP is not set
CONFIG_SPIRAM_MALLOC_RESERVE_INTERNAL=32768
# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set
# CONFIG_SPIRAM_ALLOW_NOINIT_SEG_EXTERNAL_MEMORY is not set
CONFIG_SPIRAM_CACHE_WORKAROUND=y
#
# SPIRAM cache workaround debugging
#
CONFIG_SPIRAM_CACHE_WORKAROUND_STRATEGY_MEMW=y
# CONFIG_SPIRAM_CACHE_WORKAROUND_STRATEGY_DUPLDST is not set
# CONFIG_SPIRAM_CACHE_WORKAROUND_STRATEGY_NOPS is not set
# end of SPIRAM cache workaround debugging
#
# SPIRAM workaround libraries placement
#
CONFIG_SPIRAM_CACHE_LIBJMP_IN_IRAM=y
CONFIG_SPIRAM_CACHE_LIBMATH_IN_IRAM=y
CONFIG_SPIRAM_CACHE_LIBNUMPARSER_IN_IRAM=y
CONFIG_SPIRAM_CACHE_LIBIO_IN_IRAM=y
CONFIG_SPIRAM_CACHE_LIBTIME_IN_IRAM=y
CONFIG_SPIRAM_CACHE_LIBCHAR_IN_IRAM=y
CONFIG_SPIRAM_CACHE_LIBMEM_IN_IRAM=y
CONFIG_SPIRAM_CACHE_LIBSTR_IN_IRAM=y
CONFIG_SPIRAM_CACHE_LIBRAND_IN_IRAM=y
CONFIG_SPIRAM_CACHE_LIBENV_IN_IRAM=y
CONFIG_SPIRAM_CACHE_LIBFILE_IN_IRAM=y
CONFIG_SPIRAM_CACHE_LIBMISC_IN_IRAM=y
# end of SPIRAM workaround libraries placement
CONFIG_SPIRAM_BANKSWITCH_ENABLE=y
CONFIG_SPIRAM_BANKSWITCH_RESERVE=8
# CONFIG_SPIRAM_ALLOW_STACK_EXTERNAL_MEMORY is not set
#
# PSRAM clock and cs IO for ESP32-DOWD
#
CONFIG_D0WD_PSRAM_CLK_IO=17
CONFIG_D0WD_PSRAM_CS_IO=16
# end of PSRAM clock and cs IO for ESP32-DOWD
#
# PSRAM clock and cs IO for ESP32-D2WD
#
CONFIG_D2WD_PSRAM_CLK_IO=9
CONFIG_D2WD_PSRAM_CS_IO=10
# end of PSRAM clock and cs IO for ESP32-D2WD
#
# PSRAM clock and cs IO for ESP32-PICO
#
CONFIG_PICO_PSRAM_CS_IO=10
# end of PSRAM clock and cs IO for ESP32-PICO
# CONFIG_SPIRAM_CUSTOM_SPIWP_SD3_PIN is not set
CONFIG_SPIRAM_SPIWP_SD3_PIN=7
# CONFIG_SPIRAM_2T_MODE is not set
# end of SPI RAM config
# end of ESP32-specific
#
# ADC-Calibration
#
CONFIG_ADC_CAL_EFUSE_TP_ENABLE=y
CONFIG_ADC_CAL_EFUSE_VREF_ENABLE=y
CONFIG_ADC_CAL_LUT_ENABLE=y
# end of ADC-Calibration
#
# Common ESP-related
#
CONFIG_ESP_ERR_TO_NAME_LOOKUP=y
# end of Common ESP-related
#
# Ethernet
#
# CONFIG_ETH_USE_ESP32_EMAC is not set
# end of Ethernet
#
# PHY
#
CONFIG_ESP_PHY_REDUCE_TX_POWER=y
# end of PHY
#
# ESP System Settings
#
CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT=y
# CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT is not set
CONFIG_ESP_CONSOLE_UART_CUSTOM=y
# CONFIG_ESP_CONSOLE_NONE is not set
CONFIG_ESP_CONSOLE_UART=y
CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_0=y
# CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_1 is not set
CONFIG_ESP_CONSOLE_UART_NUM=0
CONFIG_ESP_CONSOLE_UART_TX_GPIO=8
CONFIG_ESP_CONSOLE_UART_RX_GPIO=7
CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200
# CONFIG_ESP_SYSTEM_CHECK_INT_LEVEL_5 is not set
# end of ESP System Settings
#
# High resolution timer (esp_timer)
#
# CONFIG_ESP_TIMER_IMPL_FRC2 is not set
CONFIG_ESP_TIMER_IMPL_TG0_LAC=y
# end of High resolution timer (esp_timer)
#
# Wi-Fi
#
CONFIG_ESP32_WIFI_STATIC_TX_BUFFER=y
CONFIG_ESP32_WIFI_TX_BUFFER_TYPE=0
CONFIG_ESP32_WIFI_STATIC_TX_BUFFER_NUM=16
CONFIG_ESP32_WIFI_CACHE_TX_BUFFER_NUM=32
# CONFIG_ESP32_WIFI_AMSDU_TX_ENABLED is not set
# end of Wi-Fi
#
# FreeRTOS
#
# CONFIG_FREERTOS_FPU_IN_ISR is not set
# end of FreeRTOS
#
# Hardware Abstraction Layer (HAL) and Low Level (LL)
#
# CONFIG_HAL_ASSERTION_ENABLE is not set
CONFIG_HAL_DEFAULT_ASSERTION_LEVEL=2
# end of Hardware Abstraction Layer (HAL) and Low Level (LL)
#
# LWIP
#
CONFIG_LWIP_LOCAL_HOSTNAME="Adafruit-Feather-ESP32-V2"
# end of LWIP
#
# mbedTLS
#
# CONFIG_MBEDTLS_EXTERNAL_MEM_ALLOC is not set
# end of mbedTLS
#
# Supplicant
#
# CONFIG_WPA_MBO_SUPPORT is not set
# CONFIG_WPA_DPP_SUPPORT is not set
# end of Supplicant
# end of Component config
#
# Deprecated options for backward compatibility
#
CONFIG_LOG_BOOTLOADER_LEVEL_NONE=y
# CONFIG_LOG_BOOTLOADER_LEVEL_INFO is not set
CONFIG_LOG_BOOTLOADER_LEVEL=0
CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED=y
# CONFIG_OPTIMIZATION_ASSERTIONS_SILENT is not set
CONFIG_OPTIMIZATION_ASSERTION_LEVEL=2
CONFIG_SPIRAM_SUPPORT=y
# CONFIG_WIFI_LWIP_ALLOCATION_FROM_SPIRAM_FIRST is not set
CONFIG_TRACEMEM_RESERVE_DRAM=0x0
# CONFIG_ULP_COPROC_ENABLED is not set
CONFIG_ULP_COPROC_RESERVE_MEM=0
CONFIG_BROWNOUT_DET=y
CONFIG_BROWNOUT_DET_LVL_SEL_0=y
# CONFIG_BROWNOUT_DET_LVL_SEL_1 is not set
# CONFIG_BROWNOUT_DET_LVL_SEL_2 is not set
# CONFIG_BROWNOUT_DET_LVL_SEL_3 is not set
# CONFIG_BROWNOUT_DET_LVL_SEL_4 is not set
# CONFIG_BROWNOUT_DET_LVL_SEL_5 is not set
# CONFIG_BROWNOUT_DET_LVL_SEL_6 is not set
# CONFIG_BROWNOUT_DET_LVL_SEL_7 is not set
CONFIG_BROWNOUT_DET_LVL=0
# CONFIG_DISABLE_BASIC_ROM_CONSOLE is not set
# CONFIG_NO_BLOBS is not set
# CONFIG_COMPATIBLE_PRE_V2_1_BOOTLOADERS is not set
# CONFIG_TWO_UNIVERSAL_MAC_ADDRESS is not set
CONFIG_FOUR_UNIVERSAL_MAC_ADDRESS=y
CONFIG_NUMBER_OF_UNIVERSAL_MAC_ADDRESS=4
CONFIG_ESP32S2_PANIC_PRINT_HALT=y
# CONFIG_ESP32S2_PANIC_SILENT_REBOOT is not set
CONFIG_CONSOLE_UART_CUSTOM=y
# CONFIG_ESP_CONSOLE_UART_NONE is not set
CONFIG_CONSOLE_UART=y
CONFIG_CONSOLE_UART_CUSTOM_NUM_0=y
# CONFIG_CONSOLE_UART_CUSTOM_NUM_1 is not set
CONFIG_CONSOLE_UART_NUM=0
CONFIG_CONSOLE_UART_TX_GPIO=8
CONFIG_CONSOLE_UART_RX_GPIO=7
CONFIG_CONSOLE_UART_BAUDRATE=115200
# end of Deprecated options for backward compatibility

View File

@ -41,7 +41,7 @@
#include "supervisor/shared/translate/translate.h"
#include "supervisor/shared/tick.h"
uint8_t never_reset_uart_mask = 0;
static uint8_t never_reset_uart_mask = 0;
static void uart_event_task(void *param) {
busio_uart_obj_t *self = param;
@ -74,13 +74,13 @@ static void uart_event_task(void *param) {
void uart_reset(void) {
for (uart_port_t num = 0; num < UART_NUM_MAX; num++) {
// Ignore the UART used by the IDF.
#ifdef CONFIG_ESP_CONSOLE_UART_NUM
// Do not reset the UART used by the IDF for logging.
if (num == CONFIG_ESP_CONSOLE_UART_NUM) {
continue;
}
#endif
if (uart_is_driver_installed(num) && !(never_reset_uart_mask & 1 << num)) {
if (uart_is_driver_installed(num) && !(never_reset_uart_mask & (1 << num))) {
uart_driver_delete(num);
}
}

View File

@ -166,6 +166,17 @@ safe_mode_t port_init(void) {
#define DEBUG (0)
#endif
#define pin_GPIOn(n) pin_GPIO##n
#define pin_GPIOn_EXPAND(x) pin_GPIOn(x)
#ifdef CONFIG_CONSOLE_UART_TX_GPIO
common_hal_never_reset_pin(&pin_GPIOn_EXPAND(CONFIG_CONSOLE_UART_TX_GPIO));
#endif
#ifdef CONFIG_CONSOLE_UART_RX_GPIO
common_hal_never_reset_pin(&pin_GPIOn_EXPAND(CONFIG_CONSOLE_UART_RX_GPIO));
#endif
#if DEBUG
// debug UART
#ifdef CONFIG_IDF_TARGET_ESP32C3

View File

@ -297,6 +297,10 @@ typedef long mp_off_t;
#define BOARD_UART_ROOT_POINTER mp_obj_t board_uart_bus;
#endif
#if MICROPY_PY_ASYNC_AWAIT && !CIRCUITPY_TRACEBACK
#error CIRCUITPY_ASYNCIO requires CIRCUITPY_TRACEBACK
#endif
#if defined(CIRCUITPY_CONSOLE_UART_RX) || defined(CIRCUITPY_CONSOLE_UART_TX)
#if !(defined(CIRCUITPY_CONSOLE_UART_RX) && defined(CIRCUITPY_CONSOLE_UART_TX))
#error Both CIRCUITPY_CONSOLE_UART_RX and CIRCUITPY_CONSOLE_UART_TX must be defined if one is defined.

View File

@ -47,17 +47,17 @@
static background_callback_t workflow_background_cb;
static void supervisor_workflow_update_status_bar(void) {
// Neighboring "" "" are concatenated by the compiler. Without this separation, the hex code
// doesn't get terminated after two following characters and the value is invalid.
// This is the OSC command to set the title and the icon text. It can be up to 255 characters
// but some may be cut off.
serial_write("\x1b" "]0;");
serial_write("🐍 ");
#if CIRCUITPY_WEB_WORKFLOW
supervisor_web_workflow_status();
#endif
// Send string terminator
serial_write("\x1b" "\\");
// // Neighboring "" "" are concatenated by the compiler. Without this separation, the hex code
// // doesn't get terminated after two following characters and the value is invalid.
// // This is the OSC command to set the title and the icon text. It can be up to 255 characters
// // but some may be cut off.
// serial_write("\x1b" "]0;");
// serial_write("🐍 ");
// #if CIRCUITPY_WEB_WORKFLOW
// supervisor_web_workflow_status();
// #endif
// // Send string terminator
// serial_write("\x1b" "\\");
}
static void workflow_background(void *data) {