diff --git a/build/devices/esp32/targets/esp32c3/manifest.json b/build/devices/esp32/targets/esp32c3/manifest.json new file mode 100644 index 00000000..a69d9e3d --- /dev/null +++ b/build/devices/esp32/targets/esp32c3/manifest.json @@ -0,0 +1,35 @@ +{ + "include": [ + "$(MODULES)/drivers/button/manifest.json", + "$(MODULES)/drivers/neopixel/manifest.json" + ], + "build":{ + "ESP32_SUBCLASS": "esp32c3" + }, + "modules": { + "setup/target": "./setup-target" + }, + "preload": [ + "setup/target", + "neopixel" + ], + "config": { + "screen": "", + "led": { + "pin": 8, + "rainbow": true, + "brightness": 32 + } + }, + "defines": { + "i2c": { + "sda_pin": 4, + "scl_pin": 5 + }, + "spi": { + "miso_pin":6, + "mosi_pin":7, + "sck_pin": 8 + } + } +} diff --git a/build/devices/esp32/targets/esp32c3/setup-target.js b/build/devices/esp32/targets/esp32c3/setup-target.js new file mode 100644 index 00000000..3f9be86b --- /dev/null +++ b/build/devices/esp32/targets/esp32c3/setup-target.js @@ -0,0 +1,100 @@ +import config from "mc/config"; +import NeoPixel from "neopixel"; +import Timer from "timer"; +import Button from "button"; + +class NeoPixelLED extends NeoPixel { + #value = 0; + read() { + return this.#value; + } + write(value) { + this.#value = value; + if (value) { + super.setPixel(0, super.makeRGB(255, 255, 255)); + }else{ + super.setPixel(0, super.makeRGB(0, 0, 0)); + } + super.update(); + } + on() { + this.write(1); + } + off() { + this.write(0); + } +} + +class Flash { + constructor(options) { + return new Button({ + ...options, + pin: 0, + invert: true + }); + } +} + + +globalThis.Host = Object.freeze({ + LED: { + Default: class { + constructor(options) { + const led = new NeoPixelLED({ + ...options, + length: 1, + pin: config.led.pin, + order: "GRB" + }); + led.brightness = config.led.brightness; + return led; + } + } + }, + Button: { + Default: Flash, + Flash + } +}, true); + +const phases = Object.freeze([ + //red, purple, blue, cyan, green, orange, white, black + [1, 0, -1, 0, 0, 1, 0, -1], + [0, 0, 0, 1, 0, 0, 0, -1], + [0, 1, 0, 0, -1, 0, 1, -1] +], true); + +export default function (done) { + if (config.led.rainbow){ + const neopixel = new Host.LED.Default; + const STEP = 3; + + let rgb = [0, 0, 0]; + let phase = 0; + + Timer.repeat(() => { + let advance; + for (let i = 0; i < 3; i++) { + const direction = phases[i][phase]; + rgb[i] += direction * STEP; + if (direction) { + if (rgb[i] >= 255){ + rgb[i] = 255; + advance = true; + } + else if (rgb[i] <= 0){ + rgb[i] = 0; + advance = true; + } + } + } + if (advance) + if (++phase >= phases[0].length) phase = 0; + + neopixel.setPixel(0, neopixel.makeRGB(rgb[0], rgb[1], rgb[2])); + neopixel.update(); + }, 33); + } + + done?.(); +} diff --git a/build/devices/esp32/xsProj-esp32c3/CMakeLists.txt b/build/devices/esp32/xsProj-esp32c3/CMakeLists.txt new file mode 100644 index 00000000..6a0f9122 --- /dev/null +++ b/build/devices/esp32/xsProj-esp32c3/CMakeLists.txt @@ -0,0 +1,23 @@ +# +# Copyright (c) 2020 Moddable Tech, Inc. +# +# This file is part of the Moddable SDK Tools. +# +# The Moddable SDK Tools is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# The Moddable SDK Tools is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with the Moddable SDK Tools. If not, see . +# + +cmake_minimum_required(VERSION 3.5) + +include($ENV{IDF_PATH}/tools/cmake/project.cmake) +project(xs_esp32) \ No newline at end of file diff --git a/build/devices/esp32/xsProj-esp32c3/Makefile b/build/devices/esp32/xsProj-esp32c3/Makefile new file mode 100644 index 00000000..ac53eb91 --- /dev/null +++ b/build/devices/esp32/xsProj-esp32c3/Makefile @@ -0,0 +1,31 @@ +# +# Copyright (c) 2016-2017 Moddable Tech, Inc. +# +# This file is part of the Moddable SDK Tools. +# +# The Moddable SDK Tools is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# The Moddable SDK Tools is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with the Moddable SDK Tools. If not, see . +# + +PROJECT_NAME := xs_esp32 +BUILD_DIR_BASE := $(IDF_BUILD_DIR) +DEBUGGER_SPEED ?= 921600 + +# COMPONENTS=freertos esp32 newlib esptool_py tcpip_adapter lwip main soc ethernet log driver vfs heap nvs_flash spi_flash bootloader_support app_trace xtensa-debug-module mbedtls wpa_supplicant micro-ecc + +CFLAGS += -Wno-unused-value -DDEBUGGER_SPEED=$(DEBUGGER_SPEED) + +EXTRA_LDFLAGS ?= -Wl,--wrap=spi_flash_erase_sector -Wl,--wrap=spi_flash_erase_range + +include $(IDF_PATH)/make/project.mk + diff --git a/build/devices/esp32/xsProj-esp32c3/getPort.py b/build/devices/esp32/xsProj-esp32c3/getPort.py new file mode 100644 index 00000000..211e1e20 --- /dev/null +++ b/build/devices/esp32/xsProj-esp32c3/getPort.py @@ -0,0 +1,34 @@ +# +# Copyright (c) 2020 Moddable Tech, Inc. +# +# This file is part of the Moddable SDK Tools. +# +# The Moddable SDK Tools is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# The Moddable SDK Tools is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with the Moddable SDK Tools. If not, see . +# +# getPort.py: utility to determine what serial port idf.py will choose automatically if no ESPPORT is specified. +# + +import sys +import io +import serial.tools.list_ports +from io import BytesIO as StringIO + +# Same logic as used by idf.py, to ensure same port is chosen for serial2xsbug +ports = list(reversed(sorted(p.device for p in serial.tools.list_ports.comports()))) +length = len(ports) + +if length > 0: + sys.stdout = StringIO() + sys.stdout = sys.__stdout__ + print(ports[0]), \ No newline at end of file diff --git a/build/devices/esp32/xsProj-esp32c3/main/CMakeLists.txt b/build/devices/esp32/xsProj-esp32c3/main/CMakeLists.txt new file mode 100644 index 00000000..d8ddcfcb --- /dev/null +++ b/build/devices/esp32/xsProj-esp32c3/main/CMakeLists.txt @@ -0,0 +1,37 @@ +# +# Copyright (c) 2020-2022 Moddable Tech, Inc. +# +# This file is part of the Moddable SDK Tools. +# +# The Moddable SDK Tools is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# The Moddable SDK Tools is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with the Moddable SDK Tools. If not, see . +# + + +file(TO_CMAKE_PATH "$ENV{MODDABLE}" ENV_MODDABLE) +set(COMPONENT_SRCS "main.c") +set(COMPONENT_ADD_INCLUDEDIRS ${ENV_MODDABLE}/xs/platforms/esp ${ENV_MODDABLE}/xs/platforms/mc ${ENV_MODDABLE}/xs/includes ${ENV_MODDABLE}/modules/base/instrumentation) + +register_component() + +if (mxDebug EQUAL "1") + target_compile_options(${COMPONENT_TARGET} PRIVATE -DmxDebug=1) +endif() +if (DEBUGGER_SPEED) + target_compile_options(${COMPONENT_TARGET} PRIVATE -DDEBUGGER_SPEED=${DEBUGGER_SPEED}) +endif() + +add_prebuilt_library(xs_esp32 ${CMAKE_BINARY_DIR}/xs_${ESP32_SUBCLASS}.a + PRIV_REQUIRES driver nvs_flash vfs spiffs fatfs bt) + +target_link_libraries(${COMPONENT_LIB} PRIVATE xs_esp32) diff --git a/build/devices/esp32/xsProj-esp32c3/main/component.mk b/build/devices/esp32/xsProj-esp32c3/main/component.mk new file mode 100644 index 00000000..9651eadf --- /dev/null +++ b/build/devices/esp32/xsProj-esp32c3/main/component.mk @@ -0,0 +1,27 @@ +# +# Copyright (c) 2016-2017 Moddable Tech, Inc. +# +# This file is part of the Moddable SDK Tools. +# +# The Moddable SDK Tools is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# The Moddable SDK Tools is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with the Moddable SDK Tools. If not, see . +# + +ifeq ($(DEBUG),1) + CFLAGS += -DmxDebug=1 +endif + +COMPONENT_EXTRA_INCLUDES += $(MODDABLE)/xs/platforms/esp $(MODDABLE)/xs/includes $(MODDABLE)/modules/base/instrumentation + +COMPONENT_ADD_LDFLAGS += $(BUILD_DIR_BASE)/xs_esp32.a + diff --git a/build/devices/esp32/xsProj-esp32c3/main/main.c b/build/devices/esp32/xsProj-esp32c3/main/main.c new file mode 100644 index 00000000..0c265522 --- /dev/null +++ b/build/devices/esp32/xsProj-esp32c3/main/main.c @@ -0,0 +1,225 @@ +/* + * Copyright (c) 2016-2020 Moddable Tech, Inc. + * + * This file is part of the Moddable SDK Runtime. + * + * The Moddable SDK Runtime is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Moddable SDK Runtime is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with the Moddable SDK Runtime. If not, see . + * + */ + + +#define __XS6PLATFORMMINIMAL__ +#define ESP32 4 + +#include +#include +#include +#include "freertos/FreeRTOS.h" +#include "freertos/task.h" +#include "esp_wifi.h" +#include "esp_event.h" +// #include "esp_event_loop.h" +#include "esp_task_wdt.h" +#include "lwip/inet.h" +#include "lwip/ip4_addr.h" +#include "lwip/dns.h" +#include "nvs_flash.h" +#include "sdkconfig.h" +#include "esp_log.h" + +#if CONFIG_BT_ENABLED + #include "esp_bt.h" +#endif + +#include "driver/uart.h" + +#include "modInstrumentation.h" +#include "esp_system.h" // to get system_get_free_heap_size, etc. + +#include "xs.h" +#include "xsHost.h" +#include "xsHosts.h" + +#ifndef DEBUGGER_SPEED + #define DEBUGGER_SPEED 921600 +#endif + +extern void fx_putc(void *refcon, char c); //@@ +extern void mc_setup(xsMachine *the); + +static xsMachine *gThe; // the main XS virtual machine running + +/* + xsbug IP address + + IP address either: + 0,0,0,0 - no xsbug connection + 127,0,0,7 - xsbug over serial + w,x,y,z - xsbug over TCP (address of computer running xsbug) +*/ + +#define XSDEBUG_NONE 0,0,0,0 +#define XSDEBUG_SERIAL 127,0,0,7 +#ifndef DEBUG_IP + #define DEBUG_IP XSDEBUG_SERIAL +#endif + +#ifdef mxDebug + unsigned char gXSBUG[4] = {DEBUG_IP}; +#endif + +#define USE_UART UART_NUM_0 +#define USE_UART_TX 21 +#define USE_UART_RX 20 + +#ifdef mxDebug + +static void debug_task(void *pvParameter) +{ + extern uint8_t fxIsConnected(xsMachine* the); + + while (true) { + uart_event_t event; + + if (!xQueueReceive((QueueHandle_t)pvParameter, (void * )&event, portMAX_DELAY)) + continue; + + if (UART_DATA == event.type) + fxReceiveLoop(); + } +} +#endif + +void setup(void) +{ + esp_task_wdt_add(NULL); + esp_err_t err; + uart_config_t uartConfig; +#ifdef mxDebug + uartConfig.baud_rate = DEBUGGER_SPEED; +#else + uartConfig.baud_rate = 115200; //@@ different from ESP8266 +#endif + uartConfig.data_bits = UART_DATA_8_BITS; + uartConfig.parity = UART_PARITY_DISABLE; + uartConfig.stop_bits = UART_STOP_BITS_1; + uartConfig.flow_ctrl = UART_HW_FLOWCTRL_DISABLE; + uartConfig.rx_flow_ctrl_thresh = 120; // unused. no hardware flow control. +// uartConfig.use_ref_tick = 0; // deprecated in 4.x + + err = uart_param_config(USE_UART, &uartConfig); + if (err) + printf("uart_param_config err %d\n", err); + err = uart_set_pin(USE_UART, USE_UART_TX, USE_UART_RX, UART_PIN_NO_CHANGE, UART_PIN_NO_CHANGE); + if (err) + printf("uart_set_pin err %d\n", err); + +#ifdef mxDebug + QueueHandle_t uartQueue; + uart_driver_install(USE_UART, UART_FIFO_LEN * 2, 0, 8, &uartQueue, 0); + xTaskCreate(debug_task, "debug", 768 / sizeof(StackType_t), uartQueue, 8, NULL); +#else + uart_driver_install(USE_UART, UART_FIFO_LEN * 2, 0, 0, NULL, 0); +#endif + + gThe = modCloneMachine(0, 0, 0, 0, NULL); + + modRunMachineSetup(gThe); + +#if CONFIG_TASK_WDT +// esp_task_wdt_add(NULL); +#endif +} + +void loop_task(void *pvParameter) +{ + setup(); + + while (true) { + modTimersExecute(); + modMessageService(gThe, modTimersNext()); + } +} + +/* + Required functions provided by application + to enable serial port for diagnostic information and debugging +*/ + +void modLog_transmit(const char *msg) +{ + uint8_t c; + +#if mxDebug + if (gThe) { + while (0 != (c = c_read8(msg++))) + fx_putc(gThe, c); + fx_putc(gThe, 0); + } + else +#endif + { + while (0 != (c = c_read8(msg++))) + ESP_putc(c); + ESP_putc(13); + ESP_putc(10); + } +} + +void ESP_put(uint8_t *c, int count) { + uart_write_bytes(USE_UART, (char *)c, count); +} + +void ESP_putc(int c) { + char cx = c; + uart_write_bytes(USE_UART, &cx, 1); +} + +int ESP_getc(void) { + uint8_t c; + int err = uart_read_bytes(USE_UART, &c, 1, 0); + return (1 == err) ? c : -1; +} + +uint8_t ESP_isReadable() { + size_t s; + uart_get_buffered_data_len(USE_UART, &s); + return s > 0; +} + +uint8_t ESP_setBaud(int baud) { + uart_wait_tx_done(USE_UART, 5 * 1000); + return ESP_OK == uart_set_baudrate(USE_UART, baud); +} + +void app_main() { + modPrelaunch(); + + esp_log_level_set("wifi", ESP_LOG_ERROR); + esp_log_level_set("phy_init", ESP_LOG_ERROR); + esp_log_level_set("I2S", ESP_LOG_ERROR); + + ESP_ERROR_CHECK(nvs_flash_init()); +#if CONFIG_BT_ENABLED + ESP_ERROR_CHECK(esp_bt_controller_mem_release(ESP_BT_MODE_CLASSIC_BT)); +#endif + + #if 0 == CONFIG_LOG_DEFAULT_LEVEL + #define kStack ((8 * 1024) / sizeof(StackType_t)) + #else + #define kStack ((10 * 1024) / sizeof(StackType_t)) + #endif + + xTaskCreate(loop_task, "main", kStack, NULL, 4, NULL); +} diff --git a/build/devices/esp32/xsProj-esp32c3/partitions.csv b/build/devices/esp32/xsProj-esp32c3/partitions.csv new file mode 100644 index 00000000..6fa4f6bc --- /dev/null +++ b/build/devices/esp32/xsProj-esp32c3/partitions.csv @@ -0,0 +1,27 @@ +# +# Copyright (c) 2016-2017 Moddable Tech, Inc. +# +# This file is part of the Moddable SDK Tools. +# +# The Moddable SDK Tools is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# The Moddable SDK Tools is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with the Moddable SDK Tools. If not, see . +# + +# Name, Type, SubType, Offset, Size, Flags +# Note: if you change the phy_init or app partition offset, make sure to change the offset in Kconfig.projbuild,,,, +nvs, data, nvs, 0x9000, 0x006000, +phy_init, data, phy, 0xf000, 0x001000, +factory, app, factory, 0x10000, 0x390000, +xs, 0x40, 1, 0x3A0000, 0x040000, +settings, data, 1, 0x3E0000, 0x010000, +storage, data, spiffs, 0x3F0000, 0x010000, diff --git a/build/devices/esp32/xsProj-esp32c3/sdkconfig.defaults b/build/devices/esp32/xsProj-esp32c3/sdkconfig.defaults new file mode 100644 index 00000000..75f207bd --- /dev/null +++ b/build/devices/esp32/xsProj-esp32c3/sdkconfig.defaults @@ -0,0 +1,1307 @@ +# +# Automatically generated file. DO NOT EDIT. +# Espressif IoT Development Framework (ESP-IDF) Project Configuration +# +CONFIG_IDF_CMAKE=y +CONFIG_IDF_TARGET_ARCH_RISCV=y +CONFIG_IDF_TARGET="esp32c3" +CONFIG_IDF_TARGET_ESP32C3=y +CONFIG_IDF_FIRMWARE_CHIP_ID=0x0005 + +# +# SDK tool configuration +# +CONFIG_SDK_TOOLPREFIX="riscv32-esp-elf-" +# CONFIG_SDK_TOOLCHAIN_SUPPORTS_TIME_WIDE_64_BITS is not set +# end of SDK tool configuration + +# +# Build type +# +CONFIG_APP_BUILD_TYPE_APP_2NDBOOT=y +# CONFIG_APP_BUILD_TYPE_ELF_RAM is not set +CONFIG_APP_BUILD_GENERATE_BINARIES=y +CONFIG_APP_BUILD_BOOTLOADER=y +CONFIG_APP_BUILD_USE_FLASH_SECTIONS=y +# end of Build type + +# +# Application manager +# +CONFIG_APP_COMPILE_TIME_DATE=y +# CONFIG_APP_EXCLUDE_PROJECT_VER_VAR is not set +# CONFIG_APP_EXCLUDE_PROJECT_NAME_VAR is not set +# CONFIG_APP_PROJECT_VER_FROM_CONFIG is not set +CONFIG_APP_RETRIEVE_LEN_ELF_SHA=16 +# end of Application manager + +# +# Bootloader config +# +CONFIG_BOOTLOADER_OFFSET_IN_FLASH=0x0 +CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE=y +# CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_DEBUG is not set +# CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_PERF is not set +# CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_NONE is not set +CONFIG_BOOTLOADER_LOG_LEVEL_NONE=y +# CONFIG_BOOTLOADER_LOG_LEVEL_ERROR is not set +# CONFIG_BOOTLOADER_LOG_LEVEL_WARN is not set +# CONFIG_BOOTLOADER_LOG_LEVEL_INFO is not set +# CONFIG_BOOTLOADER_LOG_LEVEL_DEBUG is not set +# CONFIG_BOOTLOADER_LOG_LEVEL_VERBOSE is not set +CONFIG_BOOTLOADER_LOG_LEVEL=0 +CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_9V=y +# CONFIG_BOOTLOADER_FACTORY_RESET is not set +# CONFIG_BOOTLOADER_APP_TEST is not set +CONFIG_BOOTLOADER_WDT_ENABLE=y +# CONFIG_BOOTLOADER_WDT_DISABLE_IN_USER_CODE is not set +CONFIG_BOOTLOADER_WDT_TIME_MS=9000 +# CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE is not set +# CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP is not set +# CONFIG_BOOTLOADER_SKIP_VALIDATE_ON_POWER_ON is not set +# CONFIG_BOOTLOADER_SKIP_VALIDATE_ALWAYS is not set +CONFIG_BOOTLOADER_RESERVE_RTC_SIZE=0 +# CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC is not set +CONFIG_BOOTLOADER_FLASH_XMC_SUPPORT=y +# end of Bootloader config + +# +# Security features +# +CONFIG_SECURE_BOOT_SUPPORTS_RSA=y +CONFIG_SECURE_TARGET_HAS_SECURE_ROM_DL_MODE=y +# CONFIG_SECURE_SIGNED_APPS_NO_SECURE_BOOT is not set +# CONFIG_SECURE_BOOT is not set +# CONFIG_SECURE_FLASH_ENC_ENABLED is not set +# end of Security features + +# +# Boot ROM Behavior +# +CONFIG_BOOT_ROM_LOG_ALWAYS_ON=y +# CONFIG_BOOT_ROM_LOG_ALWAYS_OFF is not set +# CONFIG_BOOT_ROM_LOG_ON_GPIO_HIGH is not set +# CONFIG_BOOT_ROM_LOG_ON_GPIO_LOW is not set +# end of Boot ROM Behavior + +# +# Serial flasher config +# +CONFIG_ESPTOOLPY_BAUD_OTHER_VAL=115200 +# CONFIG_ESPTOOLPY_NO_STUB is not set +# CONFIG_ESPTOOLPY_FLASHMODE_QIO is not set +# CONFIG_ESPTOOLPY_FLASHMODE_QOUT is not set +CONFIG_ESPTOOLPY_FLASHMODE_DIO=y +# CONFIG_ESPTOOLPY_FLASHMODE_DOUT is not set +CONFIG_ESPTOOLPY_FLASH_SAMPLE_MODE_STR=y +CONFIG_ESPTOOLPY_FLASHMODE="dio" +CONFIG_ESPTOOLPY_FLASHFREQ_80M=y +# CONFIG_ESPTOOLPY_FLASHFREQ_40M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_26M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_20M is not set +CONFIG_ESPTOOLPY_FLASHFREQ="80m" +# CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set +CONFIG_ESPTOOLPY_FLASHSIZE_2MB=y +# CONFIG_ESPTOOLPY_FLASHSIZE_4MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set +CONFIG_ESPTOOLPY_FLASHSIZE="2MB" +CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y +CONFIG_ESPTOOLPY_BEFORE_RESET=y +# CONFIG_ESPTOOLPY_BEFORE_NORESET is not set +CONFIG_ESPTOOLPY_BEFORE="default_reset" +CONFIG_ESPTOOLPY_AFTER_RESET=y +# CONFIG_ESPTOOLPY_AFTER_NORESET is not set +CONFIG_ESPTOOLPY_AFTER="hard_reset" +# CONFIG_ESPTOOLPY_MONITOR_BAUD_CONSOLE is not set +# CONFIG_ESPTOOLPY_MONITOR_BAUD_9600B is not set +# CONFIG_ESPTOOLPY_MONITOR_BAUD_57600B is not set +CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B=y +# CONFIG_ESPTOOLPY_MONITOR_BAUD_230400B is not set +# CONFIG_ESPTOOLPY_MONITOR_BAUD_921600B is not set +# CONFIG_ESPTOOLPY_MONITOR_BAUD_2MB is not set +# CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER is not set +CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER_VAL=115200 +CONFIG_ESPTOOLPY_MONITOR_BAUD=115200 +# end of Serial flasher config + +# +# Partition Table +# +CONFIG_PARTITION_TABLE_SINGLE_APP=y +# CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE is not set +# CONFIG_PARTITION_TABLE_TWO_OTA is not set +# CONFIG_PARTITION_TABLE_CUSTOM is not set +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" +CONFIG_PARTITION_TABLE_FILENAME="partitions_singleapp.csv" +CONFIG_PARTITION_TABLE_OFFSET=0x8000 +CONFIG_PARTITION_TABLE_MD5=y +# end of Partition Table + +# +# Compiler options +# +# CONFIG_COMPILER_OPTIMIZATION_DEFAULT is not set +CONFIG_COMPILER_OPTIMIZATION_SIZE=y +# CONFIG_COMPILER_OPTIMIZATION_PERF is not set +# CONFIG_COMPILER_OPTIMIZATION_NONE is not set +# CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE=n +CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT=y +# CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE is not set +CONFIG_COMPILER_OPTIMIZATION_ASSERTION_LEVEL=2 +# CONFIG_COMPILER_OPTIMIZATION_CHECKS_SILENT is not set +CONFIG_COMPILER_HIDE_PATHS_MACROS=y +# CONFIG_COMPILER_CXX_EXCEPTIONS is not set +# CONFIG_COMPILER_CXX_RTTI is not set +CONFIG_COMPILER_STACK_CHECK_MODE_NONE=y +# CONFIG_COMPILER_STACK_CHECK_MODE_NORM is not set +# CONFIG_COMPILER_STACK_CHECK_MODE_STRONG is not set +# CONFIG_COMPILER_STACK_CHECK_MODE_ALL is not set +# CONFIG_COMPILER_WARN_WRITE_STRINGS is not set +# CONFIG_COMPILER_SAVE_RESTORE_LIBCALLS is not set +# CONFIG_COMPILER_DISABLE_GCC8_WARNINGS is not set +# CONFIG_COMPILER_DUMP_RTL_FILES is not set +# end of Compiler options + +# +# Component config +# + +# +# Application Level Tracing +# +# CONFIG_APPTRACE_DEST_JTAG is not set +CONFIG_APPTRACE_DEST_NONE=y +CONFIG_APPTRACE_LOCK_ENABLE=y +# end of Application Level Tracing + +# +# ESP-ASIO +# +# CONFIG_ASIO_SSL_SUPPORT is not set +# end of ESP-ASIO + +# +# Bluetooth +# +# CONFIG_BT_ENABLED is not set +# end of Bluetooth + +# +# CoAP Configuration +# +CONFIG_COAP_MBEDTLS_PSK=y +# CONFIG_COAP_MBEDTLS_PKI is not set +# CONFIG_COAP_MBEDTLS_DEBUG is not set +CONFIG_COAP_LOG_DEFAULT_LEVEL=0 +# end of CoAP Configuration + +# +# Driver configurations +# + +# +# ADC configuration +# +# CONFIG_ADC_FORCE_XPD_FSM is not set +CONFIG_ADC_DISABLE_DAC=y +# end of ADC configuration + +# +# MCPWM configuration +# +# CONFIG_MCPWM_ISR_IN_IRAM is not set +# end of MCPWM configuration + +# +# SPI configuration +# +# CONFIG_SPI_MASTER_IN_IRAM is not set +CONFIG_SPI_MASTER_ISR_IN_IRAM=y +# CONFIG_SPI_SLAVE_IN_IRAM is not set +CONFIG_SPI_SLAVE_ISR_IN_IRAM=y +# end of SPI configuration + +# +# TWAI configuration +# +# CONFIG_TWAI_ISR_IN_IRAM is not set +# end of TWAI configuration + +# +# UART configuration +# +# CONFIG_UART_ISR_IN_IRAM is not set +# end of UART configuration + +# +# GDMA Configuration +# +# CONFIG_GDMA_CTRL_FUNC_IN_IRAM is not set +# CONFIG_GDMA_ISR_IRAM_SAFE is not set +# end of GDMA Configuration +# end of Driver configurations + +# +# eFuse Bit Manager +# +# CONFIG_EFUSE_CUSTOM_TABLE is not set +# CONFIG_EFUSE_VIRTUAL is not set +CONFIG_EFUSE_MAX_BLK_LEN=256 +# end of eFuse Bit Manager + +# +# ESP-TLS +# +CONFIG_ESP_TLS_USING_MBEDTLS=y +CONFIG_ESP_TLS_USE_DS_PERIPHERAL=y +# CONFIG_ESP_TLS_SERVER is not set +# CONFIG_ESP_TLS_CLIENT_SESSION_TICKETS is not set +# CONFIG_ESP_TLS_PSK_VERIFICATION is not set +# CONFIG_ESP_TLS_INSECURE is not set +# end of ESP-TLS + +# +# ESP32C3-Specific +# +# CONFIG_ESP32C3_DEFAULT_CPU_FREQ_80 is not set +CONFIG_ESP32C3_DEFAULT_CPU_FREQ_160=y +CONFIG_ESP32C3_DEFAULT_CPU_FREQ_MHZ=160 +# CONFIG_ESP32C3_REV_MIN_0 is not set +# CONFIG_ESP32C3_REV_MIN_1 is not set +# CONFIG_ESP32C3_REV_MIN_2 is not set +CONFIG_ESP32C3_REV_MIN_3=y +CONFIG_ESP32C3_REV_MIN=3 +CONFIG_ESP32C3_DEBUG_OCDAWARE=y +# CONFIG_ESP32C3_DEBUG_STUBS_ENABLE is not set +CONFIG_ESP32C3_BROWNOUT_DET=y +CONFIG_ESP32C3_BROWNOUT_DET_LVL_SEL_7=y +# CONFIG_ESP32C3_BROWNOUT_DET_LVL_SEL_6 is not set +# CONFIG_ESP32C3_BROWNOUT_DET_LVL_SEL_5 is not set +# CONFIG_ESP32C3_BROWNOUT_DET_LVL_SEL_4 is not set +# CONFIG_ESP32C3_BROWNOUT_DET_LVL_SEL_3 is not set +# CONFIG_ESP32C3_BROWNOUT_DET_LVL_SEL_2 is not set +CONFIG_ESP32C3_BROWNOUT_DET_LVL=7 +CONFIG_ESP32C3_TIME_SYSCALL_USE_RTC_SYSTIMER=y +# CONFIG_ESP32C3_TIME_SYSCALL_USE_RTC is not set +# CONFIG_ESP32C3_TIME_SYSCALL_USE_SYSTIMER is not set +# CONFIG_ESP32C3_TIME_SYSCALL_USE_NONE is not set +CONFIG_ESP32C3_RTC_CLK_SRC_INT_RC=y +# CONFIG_ESP32C3_RTC_CLK_SRC_EXT_CRYS is not set +# CONFIG_ESP32C3_RTC_CLK_SRC_EXT_OSC is not set +# CONFIG_ESP32C3_RTC_CLK_SRC_INT_8MD256 is not set +CONFIG_ESP32C3_RTC_CLK_CAL_CYCLES=1024 +# CONFIG_ESP32C3_NO_BLOBS is not set +# end of ESP32C3-Specific + +# +# ADC-Calibration +# +# end of ADC-Calibration + +# +# Common ESP-related +# +CONFIG_ESP_ERR_TO_NAME_LOOKUP=y +# end of Common ESP-related + +# +# Ethernet +# +CONFIG_ETH_ENABLED=y +CONFIG_ETH_USE_SPI_ETHERNET=y +# CONFIG_ETH_SPI_ETHERNET_DM9051 is not set +# CONFIG_ETH_SPI_ETHERNET_W5500 is not set +# CONFIG_ETH_SPI_ETHERNET_KSZ8851SNL is not set +# CONFIG_ETH_USE_OPENETH is not set +# end of Ethernet + +# +# Event Loop Library +# +# CONFIG_ESP_EVENT_LOOP_PROFILING is not set +CONFIG_ESP_EVENT_POST_FROM_ISR=y +CONFIG_ESP_EVENT_POST_FROM_IRAM_ISR=y +# end of Event Loop Library + +# +# GDB Stub +# +CONFIG_ESP_GDBSTUB_ENABLED=y +CONFIG_ESP_GDBSTUB_SUPPORT_TASKS=y +CONFIG_ESP_GDBSTUB_MAX_TASKS=32 +# end of GDB Stub + +# +# ESP HTTP client +# +# CONFIG_ESP_HTTP_CLIENT_ENABLE_HTTPS is not set +# CONFIG_ESP_HTTP_CLIENT_ENABLE_BASIC_AUTH is not set +CONFIG_ESP_HTTP_CLIENT_ENABLE_DIGEST_AUTH=y +# end of ESP HTTP client + +# +# HTTP Server +# +CONFIG_HTTPD_MAX_REQ_HDR_LEN=512 +CONFIG_HTTPD_MAX_URI_LEN=512 +CONFIG_HTTPD_ERR_RESP_NO_DELAY=y +CONFIG_HTTPD_PURGE_BUF_LEN=32 +# CONFIG_HTTPD_LOG_PURGE_DATA is not set +# CONFIG_HTTPD_WS_SUPPORT is not set +# end of HTTP Server + +# +# ESP HTTPS OTA +# +# CONFIG_OTA_ALLOW_HTTP is not set +# end of ESP HTTPS OTA + +# +# ESP HTTPS server +# +# CONFIG_ESP_HTTPS_SERVER_ENABLE is not set +# end of ESP HTTPS server + +# +# Hardware Settings +# + +# +# MAC Config +# +CONFIG_ESP_MAC_ADDR_UNIVERSE_WIFI_STA=y +CONFIG_ESP_MAC_ADDR_UNIVERSE_WIFI_AP=y +CONFIG_ESP_MAC_ADDR_UNIVERSE_BT=y +CONFIG_ESP_MAC_ADDR_UNIVERSE_ETH=y +# CONFIG_ESP32C3_UNIVERSAL_MAC_ADDRESSES_TWO is not set +CONFIG_ESP32C3_UNIVERSAL_MAC_ADDRESSES_FOUR=y +CONFIG_ESP32C3_UNIVERSAL_MAC_ADDRESSES=4 +# end of MAC Config + +# +# Sleep Config +# +CONFIG_ESP_SLEEP_POWER_DOWN_FLASH=y +CONFIG_ESP_SLEEP_GPIO_RESET_WORKAROUND=y +# CONFIG_ESP_SLEEP_FLASH_LEAKAGE_WORKAROUND is not set +# end of Sleep Config +# end of Hardware Settings + +# +# IPC (Inter-Processor Call) +# +CONFIG_ESP_IPC_TASK_STACK_SIZE=1536 +# end of IPC (Inter-Processor Call) + +# +# LCD and Touch Panel +# + +# +# LCD Peripheral Configuration +# +CONFIG_LCD_PANEL_IO_FORMAT_BUF_SIZE=32 +# end of LCD Peripheral Configuration +# end of LCD and Touch Panel + +# +# ESP NETIF Adapter +# +CONFIG_ESP_NETIF_IP_LOST_TIMER_INTERVAL=120 +CONFIG_ESP_NETIF_TCPIP_LWIP=y +# CONFIG_ESP_NETIF_LOOPBACK is not set +CONFIG_ESP_NETIF_TCPIP_ADAPTER_COMPATIBLE_LAYER=y +# end of ESP NETIF Adapter + +# +# PHY +# +CONFIG_ESP_PHY_CALIBRATION_AND_DATA_STORAGE=y +# CONFIG_ESP_PHY_INIT_DATA_IN_PARTITION is not set +CONFIG_ESP_PHY_MAX_WIFI_TX_POWER=20 +CONFIG_ESP_PHY_MAX_TX_POWER=20 +# end of PHY + +# +# Power Management +# +# CONFIG_PM_ENABLE is not set +CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP=y +# end of Power Management + +# +# ESP System Settings +# +# CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT is not set +# CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT is not set +# CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT is not set +CONFIG_ESP_SYSTEM_PANIC_GDBSTUB=y +# CONFIG_ESP_SYSTEM_GDBSTUB_RUNTIME is not set +CONFIG_ESP_SYSTEM_SINGLE_CORE_MODE=y +CONFIG_ESP_SYSTEM_RTC_FAST_MEM_AS_HEAP_DEPCHECK=y +CONFIG_ESP_SYSTEM_ALLOW_RTC_FAST_MEM_AS_HEAP=y +# CONFIG_ESP_SYSTEM_USE_EH_FRAME is not set + +# +# Memory protection +# +CONFIG_ESP_SYSTEM_MEMPROT_DEPCHECK=y +CONFIG_ESP_SYSTEM_MEMPROT_FEATURE=y +CONFIG_ESP_SYSTEM_MEMPROT_FEATURE_LOCK=y +CONFIG_ESP_SYSTEM_MEMPROT_CPU_PREFETCH_PAD_SIZE=16 +CONFIG_ESP_SYSTEM_MEMPROT_MEM_ALIGN_SIZE=512 +# end of Memory protection + +CONFIG_ESP_SYSTEM_EVENT_QUEUE_SIZE=32 +CONFIG_ESP_SYSTEM_EVENT_TASK_STACK_SIZE=2304 +CONFIG_ESP_MAIN_TASK_STACK_SIZE=3584 +CONFIG_ESP_MAIN_TASK_AFFINITY_CPU0=y +# CONFIG_ESP_MAIN_TASK_AFFINITY_NO_AFFINITY is not set +CONFIG_ESP_MAIN_TASK_AFFINITY=0x0 +CONFIG_ESP_MINIMAL_SHARED_STACK_SIZE=2048 +CONFIG_ESP_CONSOLE_UART_DEFAULT=y +# CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG is not set +# CONFIG_ESP_CONSOLE_UART_CUSTOM is not set +# CONFIG_ESP_CONSOLE_NONE is not set +# CONFIG_ESP_CONSOLE_SECONDARY_NONE is not set +CONFIG_ESP_CONSOLE_SECONDARY_USB_SERIAL_JTAG=y +CONFIG_ESP_CONSOLE_UART=y +CONFIG_ESP_CONSOLE_UART_NUM=0 +CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200 +CONFIG_ESP_INT_WDT=y +CONFIG_ESP_INT_WDT_TIMEOUT_MS=300 +CONFIG_ESP_TASK_WDT=y +# CONFIG_ESP_TASK_WDT_PANIC is not set +CONFIG_ESP_TASK_WDT_TIMEOUT_S=5 +CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU0=y +# CONFIG_ESP_PANIC_HANDLER_IRAM is not set +CONFIG_ESP_SYSTEM_CHECK_INT_LEVEL_4=y +# end of ESP System Settings + +# +# High resolution timer (esp_timer) +# +# CONFIG_ESP_TIMER_PROFILING is not set +CONFIG_ESP_TIME_FUNCS_USE_RTC_TIMER=y +CONFIG_ESP_TIME_FUNCS_USE_ESP_TIMER=y +CONFIG_ESP_TIMER_TASK_STACK_SIZE=3584 +CONFIG_ESP_TIMER_INTERRUPT_LEVEL=1 +# CONFIG_ESP_TIMER_SUPPORTS_ISR_DISPATCH_METHOD is not set +CONFIG_ESP_TIMER_IMPL_SYSTIMER=y +# end of High resolution timer (esp_timer) + +# +# Wi-Fi +# +CONFIG_ESP32_WIFI_ENABLED=y +CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=10 +CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=32 +# CONFIG_ESP32_WIFI_STATIC_TX_BUFFER is not set +CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER=y +CONFIG_ESP32_WIFI_TX_BUFFER_TYPE=1 +CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=32 +# CONFIG_ESP32_WIFI_CSI_ENABLED is not set +CONFIG_ESP32_WIFI_AMPDU_TX_ENABLED=y +CONFIG_ESP32_WIFI_TX_BA_WIN=6 +CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED=y +CONFIG_ESP32_WIFI_RX_BA_WIN=6 +CONFIG_ESP32_WIFI_NVS_ENABLED=y +CONFIG_ESP32_WIFI_SOFTAP_BEACON_MAX_LEN=752 +CONFIG_ESP32_WIFI_MGMT_SBUF_NUM=32 +CONFIG_ESP32_WIFI_IRAM_OPT=y +CONFIG_ESP32_WIFI_RX_IRAM_OPT=y +CONFIG_ESP32_WIFI_ENABLE_WPA3_SAE=y +# CONFIG_ESP_WIFI_SLP_IRAM_OPT is not set +# CONFIG_ESP_WIFI_FTM_ENABLE is not set +# CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE is not set +# CONFIG_ESP_WIFI_EXTERNAL_COEXIST_ENABLE is not set +# CONFIG_ESP_WIFI_GCMP_SUPPORT is not set +# CONFIG_ESP_WIFI_GMAC_SUPPORT is not set +CONFIG_ESP_WIFI_SOFTAP_SUPPORT=y +# end of Wi-Fi + +# +# Core dump +# +# CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH is not set +CONFIG_ESP_COREDUMP_ENABLE_TO_UART=y +# CONFIG_ESP_COREDUMP_ENABLE_TO_NONE is not set +# CONFIG_ESP32_COREDUMP_DATA_FORMAT_BIN is not set +CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF=y +CONFIG_ESP_COREDUMP_CHECKSUM_CRC32=y +# CONFIG_ESP32_COREDUMP_CHECKSUM_SHA256 is not set +CONFIG_ESP_COREDUMP_ENABLE=y +CONFIG_ESP_COREDUMP_MAX_TASKS_NUM=64 +CONFIG_ESP_COREDUMP_UART_DELAY=0 +CONFIG_ESP_COREDUMP_STACK_SIZE=0 +CONFIG_ESP_COREDUMP_DECODE_INFO=y +# CONFIG_ESP_COREDUMP_DECODE_DISABLE is not set +CONFIG_ESP_COREDUMP_DECODE="info" +# end of Core dump + +# +# FAT Filesystem support +# +# CONFIG_FATFS_CODEPAGE_DYNAMIC is not set +CONFIG_FATFS_CODEPAGE_437=y +# CONFIG_FATFS_CODEPAGE_720 is not set +# CONFIG_FATFS_CODEPAGE_737 is not set +# CONFIG_FATFS_CODEPAGE_771 is not set +# CONFIG_FATFS_CODEPAGE_775 is not set +# CONFIG_FATFS_CODEPAGE_850 is not set +# CONFIG_FATFS_CODEPAGE_852 is not set +# CONFIG_FATFS_CODEPAGE_855 is not set +# CONFIG_FATFS_CODEPAGE_857 is not set +# CONFIG_FATFS_CODEPAGE_860 is not set +# CONFIG_FATFS_CODEPAGE_861 is not set +# CONFIG_FATFS_CODEPAGE_862 is not set +# CONFIG_FATFS_CODEPAGE_863 is not set +# CONFIG_FATFS_CODEPAGE_864 is not set +# CONFIG_FATFS_CODEPAGE_865 is not set +# CONFIG_FATFS_CODEPAGE_866 is not set +# CONFIG_FATFS_CODEPAGE_869 is not set +# CONFIG_FATFS_CODEPAGE_932 is not set +# CONFIG_FATFS_CODEPAGE_936 is not set +# CONFIG_FATFS_CODEPAGE_949 is not set +# CONFIG_FATFS_CODEPAGE_950 is not set +CONFIG_FATFS_CODEPAGE=437 +# CONFIG_FATFS_LFN_NONE is not set +CONFIG_FATFS_LFN_HEAP=y +# CONFIG_FATFS_LFN_STACK is not set +CONFIG_FATFS_MAX_LFN=255 +CONFIG_FATFS_API_ENCODING_ANSI_OEM=y +# CONFIG_FATFS_API_ENCODING_UTF_16 is not set +# CONFIG_FATFS_API_ENCODING_UTF_8 is not set +CONFIG_FATFS_FS_LOCK=0 +CONFIG_FATFS_TIMEOUT_MS=10000 +CONFIG_FATFS_PER_FILE_CACHE=y +# CONFIG_FATFS_USE_FASTSEEK is not set +# end of FAT Filesystem support + +# +# Modbus configuration +# +CONFIG_FMB_COMM_MODE_TCP_EN=y +CONFIG_FMB_TCP_PORT_DEFAULT=502 +CONFIG_FMB_TCP_PORT_MAX_CONN=5 +CONFIG_FMB_TCP_CONNECTION_TOUT_SEC=20 +CONFIG_FMB_COMM_MODE_RTU_EN=y +CONFIG_FMB_COMM_MODE_ASCII_EN=y +CONFIG_FMB_MASTER_TIMEOUT_MS_RESPOND=150 +CONFIG_FMB_MASTER_DELAY_MS_CONVERT=200 +CONFIG_FMB_QUEUE_LENGTH=20 +CONFIG_FMB_PORT_TASK_STACK_SIZE=4096 +CONFIG_FMB_SERIAL_BUF_SIZE=256 +CONFIG_FMB_SERIAL_ASCII_BITS_PER_SYMB=8 +CONFIG_FMB_SERIAL_ASCII_TIMEOUT_RESPOND_MS=1000 +CONFIG_FMB_PORT_TASK_PRIO=10 +CONFIG_FMB_PORT_TASK_AFFINITY=0x7FFFFFFF +CONFIG_FMB_CONTROLLER_SLAVE_ID_SUPPORT=y +CONFIG_FMB_CONTROLLER_SLAVE_ID=0x00112233 +CONFIG_FMB_CONTROLLER_NOTIFY_TIMEOUT=20 +CONFIG_FMB_CONTROLLER_NOTIFY_QUEUE_SIZE=20 +CONFIG_FMB_CONTROLLER_STACK_SIZE=4096 +CONFIG_FMB_EVENT_QUEUE_TIMEOUT=20 +# CONFIG_FMB_TIMER_PORT_ENABLED is not set +CONFIG_FMB_TIMER_GROUP=0 +CONFIG_FMB_TIMER_INDEX=0 +CONFIG_FMB_MASTER_TIMER_GROUP=0 +CONFIG_FMB_MASTER_TIMER_INDEX=0 +# CONFIG_FMB_TIMER_ISR_IN_IRAM is not set +# end of Modbus configuration + +# +# FreeRTOS +# +CONFIG_FREERTOS_UNICORE=y +CONFIG_FREERTOS_NO_AFFINITY=0x7FFFFFFF +CONFIG_FREERTOS_CORETIMER_0=y +# CONFIG_FREERTOS_CORETIMER_1 is not set +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +# CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION is not set +# CONFIG_FREERTOS_CHECK_STACKOVERFLOW_NONE is not set +CONFIG_FREERTOS_CHECK_STACKOVERFLOW_PTRVAL=y +# CONFIG_FREERTOS_CHECK_STACKOVERFLOW_CANARY is not set +# CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK is not set +CONFIG_FREERTOS_INTERRUPT_BACKTRACE=y +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +# CONFIG_FREERTOS_ASSERT_FAIL_ABORT is not set +CONFIG_FREERTOS_ASSERT_FAIL_PRINT_CONTINUE=y +# CONFIG_FREERTOS_ASSERT_DISABLE is not set +CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=1536 +CONFIG_FREERTOS_ISR_STACKSIZE=1536 +# CONFIG_FREERTOS_LEGACY_HOOKS is not set +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=16 +CONFIG_FREERTOS_SUPPORT_STATIC_ALLOCATION=y +# CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP is not set +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +# CONFIG_FREERTOS_USE_TRACE_FACILITY is not set +# CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS is not set +CONFIG_FREERTOS_TASK_FUNCTION_WRAPPER=y +CONFIG_FREERTOS_CHECK_MUTEX_GIVEN_BY_OWNER=y +# CONFIG_FREERTOS_CHECK_PORT_CRITICAL_COMPLIANCE is not set +# CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH is not set +CONFIG_FREERTOS_DEBUG_OCDAWARE=y +CONFIG_FREERTOS_ENABLE_TASK_SNAPSHOT=y +# CONFIG_FREERTOS_PLACE_SNAPSHOT_FUNS_INTO_FLASH is not set +# end of FreeRTOS + +# +# Hardware Abstraction Layer (HAL) and Low Level (LL) +# +CONFIG_HAL_ASSERTION_EQUALS_SYSTEM=y +# CONFIG_HAL_ASSERTION_DISABLE is not set +# CONFIG_HAL_ASSERTION_SILIENT is not set +# CONFIG_HAL_ASSERTION_ENABLE is not set +CONFIG_HAL_DEFAULT_ASSERTION_LEVEL=2 +# end of Hardware Abstraction Layer (HAL) and Low Level (LL) + +# +# Heap memory debugging +# +CONFIG_HEAP_POISONING_DISABLED=y +# CONFIG_HEAP_POISONING_LIGHT is not set +# CONFIG_HEAP_POISONING_COMPREHENSIVE is not set +CONFIG_HEAP_TRACING_OFF=y +# CONFIG_HEAP_TRACING_STANDALONE is not set +# CONFIG_HEAP_TRACING_TOHOST is not set +# CONFIG_HEAP_ABORT_WHEN_ALLOCATION_FAILS is not set +# end of Heap memory debugging + +# +# jsmn +# +# CONFIG_JSMN_PARENT_LINKS is not set +# CONFIG_JSMN_STRICT is not set +# end of jsmn + +# +# libsodium +# +# end of libsodium + +# +# Log output +# +CONFIG_LOG_DEFAULT_LEVEL_NONE=y +# CONFIG_LOG_DEFAULT_LEVEL_ERROR is not set +# CONFIG_LOG_DEFAULT_LEVEL_WARN is not set +# CONFIG_LOG_DEFAULT_LEVEL_INFO is not set +# CONFIG_LOG_DEFAULT_LEVEL_DEBUG is not set +# CONFIG_LOG_DEFAULT_LEVEL_VERBOSE is not set +CONFIG_LOG_DEFAULT_LEVEL=0 +# CONFIG_LOG_COLORS is not set +CONFIG_LOG_TIMESTAMP_SOURCE_RTOS=y +# CONFIG_LOG_TIMESTAMP_SOURCE_SYSTEM is not set +# end of Log output + +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif" +# CONFIG_LWIP_NETIF_API is not set +# CONFIG_LWIP_TCPIP_CORE_LOCKING is not set +CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y +# CONFIG_LWIP_L2_TO_L3_COPY is not set +# CONFIG_LWIP_IRAM_OPTIMIZATION is not set +CONFIG_LWIP_TIMERS_ONDEMAND=y +CONFIG_LWIP_MAX_SOCKETS=10 +# CONFIG_LWIP_USE_ONLY_LWIP_SELECT is not set +# CONFIG_LWIP_SO_LINGER is not set +CONFIG_LWIP_SO_REUSE=y +CONFIG_LWIP_SO_REUSE_RXTOALL=y +# CONFIG_LWIP_SO_RCVBUF is not set +# CONFIG_LWIP_NETBUF_RECVINFO is not set +CONFIG_LWIP_IP4_FRAG=y +CONFIG_LWIP_IP6_FRAG=y +# CONFIG_LWIP_IP4_REASSEMBLY is not set +# CONFIG_LWIP_IP6_REASSEMBLY is not set +# CONFIG_LWIP_IP_FORWARD is not set +# CONFIG_LWIP_STATS is not set +CONFIG_LWIP_ETHARP_TRUST_IP_MAC=y +CONFIG_LWIP_ESP_GRATUITOUS_ARP=y +CONFIG_LWIP_GARP_TMR_INTERVAL=60 +CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=32 +# CONFIG_LWIP_DHCP_DOES_ARP_CHECK is not set +# CONFIG_LWIP_DHCP_RESTORE_LAST_IP is not set +CONFIG_LWIP_DHCP_OPTIONS_LEN=68 + +# +# DHCP server +# +CONFIG_LWIP_DHCPS=y +CONFIG_LWIP_DHCPS_LEASE_UNIT=60 +CONFIG_LWIP_DHCPS_MAX_STATION_NUM=8 +# end of DHCP server + +# CONFIG_LWIP_AUTOIP is not set +CONFIG_LWIP_IPV6=y +# CONFIG_LWIP_IPV6_AUTOCONFIG is not set +CONFIG_LWIP_IPV6_NUM_ADDRESSES=3 +# CONFIG_LWIP_IPV6_FORWARD is not set +# CONFIG_LWIP_NETIF_STATUS_CALLBACK is not set +CONFIG_LWIP_NETIF_LOOPBACK=y +CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8 + +# +# TCP +# +CONFIG_LWIP_MAX_ACTIVE_TCP=16 +CONFIG_LWIP_MAX_LISTENING_TCP=16 +CONFIG_LWIP_TCP_HIGH_SPEED_RETRANSMISSION=y +CONFIG_LWIP_TCP_MAXRTX=12 +CONFIG_LWIP_TCP_SYNMAXRTX=12 +CONFIG_LWIP_TCP_MSS=1440 +CONFIG_LWIP_TCP_TMR_INTERVAL=250 +CONFIG_LWIP_TCP_MSL=60000 +CONFIG_LWIP_TCP_SND_BUF_DEFAULT=5744 +CONFIG_LWIP_TCP_WND_DEFAULT=5744 +CONFIG_LWIP_TCP_RECVMBOX_SIZE=6 +CONFIG_LWIP_TCP_QUEUE_OOSEQ=y +# CONFIG_LWIP_TCP_SACK_OUT is not set +# CONFIG_LWIP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES is not set +CONFIG_LWIP_TCP_OVERSIZE_MSS=y +# CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS is not set +# CONFIG_LWIP_TCP_OVERSIZE_DISABLE is not set +CONFIG_LWIP_TCP_RTO_TIME=3000 +# end of TCP + +# +# UDP +# +CONFIG_LWIP_MAX_UDP_PCBS=16 +CONFIG_LWIP_UDP_RECVMBOX_SIZE=6 +# end of UDP + +CONFIG_LWIP_TCPIP_TASK_STACK_SIZE=2560 +CONFIG_LWIP_TCPIP_TASK_AFFINITY_NO_AFFINITY=y +# CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU0 is not set +CONFIG_LWIP_TCPIP_TASK_AFFINITY=0x7FFFFFFF +# CONFIG_LWIP_PPP_SUPPORT is not set +CONFIG_LWIP_IPV6_MEMP_NUM_ND6_QUEUE=3 +CONFIG_LWIP_IPV6_ND6_NUM_NEIGHBORS=5 +# CONFIG_LWIP_SLIP_SUPPORT is not set + +# +# ICMP +# +CONFIG_LWIP_ICMP=y +# CONFIG_LWIP_MULTICAST_PING is not set +# CONFIG_LWIP_BROADCAST_PING is not set +# end of ICMP + +# +# LWIP RAW API +# +CONFIG_LWIP_MAX_RAW_PCBS=16 +# end of LWIP RAW API + +# +# SNTP +# +CONFIG_LWIP_SNTP_MAX_SERVERS=1 +# CONFIG_LWIP_DHCP_GET_NTP_SRV is not set +CONFIG_LWIP_SNTP_UPDATE_DELAY=3600000 +# end of SNTP + +CONFIG_LWIP_ESP_LWIP_ASSERT=y + +# +# Hooks +# +# CONFIG_LWIP_HOOK_TCP_ISN_NONE is not set +CONFIG_LWIP_HOOK_TCP_ISN_DEFAULT=y +# CONFIG_LWIP_HOOK_TCP_ISN_CUSTOM is not set +CONFIG_LWIP_HOOK_IP6_ROUTE_NONE=y +# CONFIG_LWIP_HOOK_IP6_ROUTE_DEFAULT is not set +# CONFIG_LWIP_HOOK_IP6_ROUTE_CUSTOM is not set +CONFIG_LWIP_HOOK_ND6_GET_GW_NONE=y +# CONFIG_LWIP_HOOK_ND6_GET_GW_DEFAULT is not set +# CONFIG_LWIP_HOOK_ND6_GET_GW_CUSTOM is not set +CONFIG_LWIP_HOOK_NETCONN_EXT_RESOLVE_NONE=y +# CONFIG_LWIP_HOOK_NETCONN_EXT_RESOLVE_DEFAULT is not set +# CONFIG_LWIP_HOOK_NETCONN_EXT_RESOLVE_CUSTOM is not set +# end of Hooks + +# CONFIG_LWIP_DEBUG is not set +# end of LWIP + +# +# mbedTLS +# +CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y +# CONFIG_MBEDTLS_DEFAULT_MEM_ALLOC is not set +# CONFIG_MBEDTLS_CUSTOM_MEM_ALLOC is not set +CONFIG_MBEDTLS_ASYMMETRIC_CONTENT_LEN=y +CONFIG_MBEDTLS_SSL_IN_CONTENT_LEN=16384 +CONFIG_MBEDTLS_SSL_OUT_CONTENT_LEN=4096 +# CONFIG_MBEDTLS_DYNAMIC_BUFFER is not set +# CONFIG_MBEDTLS_DEBUG is not set + +# +# Certificate Bundle +# +CONFIG_MBEDTLS_CERTIFICATE_BUNDLE=y +CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_FULL=y +# CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_CMN is not set +# CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_NONE is not set +# CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE is not set +# end of Certificate Bundle + +# CONFIG_MBEDTLS_ECP_RESTARTABLE is not set +# CONFIG_MBEDTLS_CMAC_C is not set +CONFIG_MBEDTLS_HARDWARE_AES=y +CONFIG_MBEDTLS_AES_USE_INTERRUPT=y +CONFIG_MBEDTLS_HARDWARE_MPI=y +CONFIG_MBEDTLS_HARDWARE_SHA=y +CONFIG_MBEDTLS_ROM_MD5=y +# CONFIG_MBEDTLS_ATCA_HW_ECDSA_SIGN is not set +# CONFIG_MBEDTLS_ATCA_HW_ECDSA_VERIFY is not set +CONFIG_MBEDTLS_HAVE_TIME=y +# CONFIG_MBEDTLS_HAVE_TIME_DATE is not set +CONFIG_MBEDTLS_ECDSA_DETERMINISTIC=y +CONFIG_MBEDTLS_SHA512_C=y +CONFIG_MBEDTLS_TLS_SERVER_AND_CLIENT=y +# CONFIG_MBEDTLS_TLS_SERVER_ONLY is not set +# CONFIG_MBEDTLS_TLS_CLIENT_ONLY is not set +# CONFIG_MBEDTLS_TLS_DISABLED is not set +CONFIG_MBEDTLS_TLS_SERVER=y +CONFIG_MBEDTLS_TLS_CLIENT=y +CONFIG_MBEDTLS_TLS_ENABLED=y + +# +# TLS Key Exchange Methods +# +# CONFIG_MBEDTLS_PSK_MODES is not set +CONFIG_MBEDTLS_KEY_EXCHANGE_RSA=y +CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_RSA=y +CONFIG_MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE=y +CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_RSA=y +CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA=y +CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA=y +CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_RSA=y +# end of TLS Key Exchange Methods + +CONFIG_MBEDTLS_SSL_RENEGOTIATION=y +# CONFIG_MBEDTLS_SSL_PROTO_SSL3 is not set +CONFIG_MBEDTLS_SSL_PROTO_TLS1=y +CONFIG_MBEDTLS_SSL_PROTO_TLS1_1=y +CONFIG_MBEDTLS_SSL_PROTO_TLS1_2=y +# CONFIG_MBEDTLS_SSL_PROTO_GMTSSL1_1 is not set +# CONFIG_MBEDTLS_SSL_PROTO_DTLS is not set +CONFIG_MBEDTLS_SSL_ALPN=y +CONFIG_MBEDTLS_CLIENT_SSL_SESSION_TICKETS=y +CONFIG_MBEDTLS_X509_CHECK_KEY_USAGE=y +CONFIG_MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE=y +CONFIG_MBEDTLS_SERVER_SSL_SESSION_TICKETS=y + +# +# Symmetric Ciphers +# +CONFIG_MBEDTLS_AES_C=y +# CONFIG_MBEDTLS_CAMELLIA_C is not set +# CONFIG_MBEDTLS_DES_C is not set +CONFIG_MBEDTLS_RC4_DISABLED=y +# CONFIG_MBEDTLS_RC4_ENABLED_NO_DEFAULT is not set +# CONFIG_MBEDTLS_RC4_ENABLED is not set +# CONFIG_MBEDTLS_BLOWFISH_C is not set +# CONFIG_MBEDTLS_XTEA_C is not set +CONFIG_MBEDTLS_CCM_C=y +CONFIG_MBEDTLS_GCM_C=y +# CONFIG_MBEDTLS_NIST_KW_C is not set +# end of Symmetric Ciphers + +# CONFIG_MBEDTLS_RIPEMD160_C is not set + +# +# Certificates +# +CONFIG_MBEDTLS_PEM_PARSE_C=y +CONFIG_MBEDTLS_PEM_WRITE_C=y +CONFIG_MBEDTLS_X509_CRL_PARSE_C=y +CONFIG_MBEDTLS_X509_CSR_PARSE_C=y +# end of Certificates + +CONFIG_MBEDTLS_ECP_C=y +CONFIG_MBEDTLS_ECDH_C=y +CONFIG_MBEDTLS_ECDSA_C=y +# CONFIG_MBEDTLS_ECJPAKE_C is not set +CONFIG_MBEDTLS_ECP_DP_SECP192R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP224R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP256R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP384R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP521R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP192K1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP224K1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP256K1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_BP256R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_BP384R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_BP512R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_CURVE25519_ENABLED=y +CONFIG_MBEDTLS_ECP_NIST_OPTIM=y +# CONFIG_MBEDTLS_POLY1305_C is not set +# CONFIG_MBEDTLS_CHACHA20_C is not set +# CONFIG_MBEDTLS_HKDF_C is not set +# CONFIG_MBEDTLS_THREADING_C is not set +CONFIG_MBEDTLS_LARGE_KEY_SOFTWARE_MPI=y +# CONFIG_MBEDTLS_SECURITY_RISKS is not set +# end of mbedTLS + +# +# mDNS +# +CONFIG_MDNS_MAX_SERVICES=10 +CONFIG_MDNS_TASK_PRIORITY=1 +CONFIG_MDNS_TASK_STACK_SIZE=4096 +# CONFIG_MDNS_TASK_AFFINITY_NO_AFFINITY is not set +CONFIG_MDNS_TASK_AFFINITY_CPU0=y +CONFIG_MDNS_TASK_AFFINITY=0x0 +CONFIG_MDNS_SERVICE_ADD_TIMEOUT_MS=2000 +# CONFIG_MDNS_STRICT_MODE is not set +CONFIG_MDNS_TIMER_PERIOD_MS=100 +# CONFIG_MDNS_NETWORKING_SOCKET is not set +CONFIG_MDNS_MULTIPLE_INSTANCE=y +# end of mDNS + +# +# ESP-MQTT Configurations +# +CONFIG_MQTT_PROTOCOL_311=y +CONFIG_MQTT_TRANSPORT_SSL=y +CONFIG_MQTT_TRANSPORT_WEBSOCKET=y +CONFIG_MQTT_TRANSPORT_WEBSOCKET_SECURE=y +# CONFIG_MQTT_MSG_ID_INCREMENTAL is not set +# CONFIG_MQTT_SKIP_PUBLISH_IF_DISCONNECTED is not set +# CONFIG_MQTT_REPORT_DELETED_MESSAGES is not set +# CONFIG_MQTT_USE_CUSTOM_CONFIG is not set +# CONFIG_MQTT_TASK_CORE_SELECTION_ENABLED is not set +# CONFIG_MQTT_CUSTOM_OUTBOX is not set +# end of ESP-MQTT Configurations + +# +# Newlib +# +CONFIG_NEWLIB_STDOUT_LINE_ENDING_CRLF=y +# CONFIG_NEWLIB_STDOUT_LINE_ENDING_LF is not set +# CONFIG_NEWLIB_STDOUT_LINE_ENDING_CR is not set +# CONFIG_NEWLIB_STDIN_LINE_ENDING_CRLF is not set +# CONFIG_NEWLIB_STDIN_LINE_ENDING_LF is not set +CONFIG_NEWLIB_STDIN_LINE_ENDING_CR=y +# CONFIG_NEWLIB_NANO_FORMAT is not set +# end of Newlib + +# +# NVS +# +# end of NVS + +# +# OpenSSL +# +# CONFIG_OPENSSL_DEBUG is not set +CONFIG_OPENSSL_ERROR_STACK=y +# CONFIG_OPENSSL_ASSERT_DO_NOTHING is not set +CONFIG_OPENSSL_ASSERT_EXIT=y +# end of OpenSSL + +# +# OpenThread +# +# CONFIG_OPENTHREAD_ENABLED is not set +# end of OpenThread + +# +# PThreads +# +CONFIG_PTHREAD_TASK_PRIO_DEFAULT=5 +CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072 +CONFIG_PTHREAD_STACK_MIN=768 +CONFIG_PTHREAD_TASK_CORE_DEFAULT=-1 +CONFIG_PTHREAD_TASK_NAME_DEFAULT="pthread" +# end of PThreads + +# +# SPI Flash driver +# +# CONFIG_SPI_FLASH_VERIFY_WRITE is not set +# CONFIG_SPI_FLASH_ENABLE_COUNTERS is not set +CONFIG_SPI_FLASH_ROM_DRIVER_PATCH=y +# CONFIG_SPI_FLASH_ROM_IMPL is not set +CONFIG_SPI_FLASH_DANGEROUS_WRITE_ABORTS=y +# CONFIG_SPI_FLASH_DANGEROUS_WRITE_FAILS is not set +# CONFIG_SPI_FLASH_DANGEROUS_WRITE_ALLOWED is not set +# CONFIG_SPI_FLASH_USE_LEGACY_IMPL is not set +# CONFIG_SPI_FLASH_SHARE_SPI1_BUS is not set +# CONFIG_SPI_FLASH_BYPASS_BLOCK_ERASE is not set +CONFIG_SPI_FLASH_YIELD_DURING_ERASE=y +CONFIG_SPI_FLASH_ERASE_YIELD_DURATION_MS=20 +CONFIG_SPI_FLASH_ERASE_YIELD_TICKS=1 +# CONFIG_SPI_FLASH_AUTO_SUSPEND is not set +CONFIG_SPI_FLASH_WRITE_CHUNK_SIZE=8192 +# CONFIG_SPI_FLASH_SIZE_OVERRIDE is not set +# CONFIG_SPI_FLASH_CHECK_ERASE_TIMEOUT_DISABLED is not set +# CONFIG_SPI_FLASH_OVERRIDE_CHIP_DRIVER_LIST is not set + +# +# Auto-detect flash chips +# +CONFIG_SPI_FLASH_SUPPORT_ISSI_CHIP=y +CONFIG_SPI_FLASH_SUPPORT_MXIC_CHIP=y +CONFIG_SPI_FLASH_SUPPORT_GD_CHIP=y +CONFIG_SPI_FLASH_SUPPORT_WINBOND_CHIP=y +CONFIG_SPI_FLASH_SUPPORT_BOYA_CHIP=y +# end of Auto-detect flash chips + +CONFIG_SPI_FLASH_ENABLE_ENCRYPTED_READ_WRITE=y +# end of SPI Flash driver + +# +# SPIFFS Configuration +# +CONFIG_SPIFFS_MAX_PARTITIONS=3 + +# +# SPIFFS Cache Configuration +# +CONFIG_SPIFFS_CACHE=y +CONFIG_SPIFFS_CACHE_WR=y +# CONFIG_SPIFFS_CACHE_STATS is not set +# end of SPIFFS Cache Configuration + +CONFIG_SPIFFS_PAGE_CHECK=y +CONFIG_SPIFFS_GC_MAX_RUNS=10 +# CONFIG_SPIFFS_GC_STATS is not set +CONFIG_SPIFFS_PAGE_SIZE=256 +CONFIG_SPIFFS_OBJ_NAME_LEN=32 +# CONFIG_SPIFFS_FOLLOW_SYMLINKS is not set +CONFIG_SPIFFS_USE_MAGIC=y +CONFIG_SPIFFS_USE_MAGIC_LENGTH=y +CONFIG_SPIFFS_META_LENGTH=4 +CONFIG_SPIFFS_USE_MTIME=y + +# +# Debug Configuration +# +# CONFIG_SPIFFS_DBG is not set +# CONFIG_SPIFFS_API_DBG is not set +# CONFIG_SPIFFS_GC_DBG is not set +# CONFIG_SPIFFS_CACHE_DBG is not set +# CONFIG_SPIFFS_CHECK_DBG is not set +# CONFIG_SPIFFS_TEST_VISUALISATION is not set +# end of Debug Configuration +# end of SPIFFS Configuration + +# +# TCP Transport +# + +# +# Websocket +# +CONFIG_WS_TRANSPORT=y +CONFIG_WS_BUFFER_SIZE=1024 +# end of Websocket +# end of TCP Transport + +# +# Unity unit testing library +# +CONFIG_UNITY_ENABLE_FLOAT=y +CONFIG_UNITY_ENABLE_DOUBLE=y +# CONFIG_UNITY_ENABLE_64BIT is not set +# CONFIG_UNITY_ENABLE_COLOR is not set +CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER=y +# CONFIG_UNITY_ENABLE_FIXTURE is not set +# CONFIG_UNITY_ENABLE_BACKTRACE_ON_FAIL is not set +# end of Unity unit testing library + +# +# Virtual file system +# +CONFIG_VFS_SUPPORT_IO=y +CONFIG_VFS_SUPPORT_DIR=y +CONFIG_VFS_SUPPORT_SELECT=y +CONFIG_VFS_SUPPRESS_SELECT_DEBUG_OUTPUT=y +CONFIG_VFS_SUPPORT_TERMIOS=y + +# +# Host File System I/O (Semihosting) +# +CONFIG_VFS_SEMIHOSTFS_MAX_MOUNT_POINTS=1 +CONFIG_VFS_SEMIHOSTFS_HOST_PATH_MAX_LEN=128 +# end of Host File System I/O (Semihosting) +# end of Virtual file system + +# +# Wear Levelling +# +# CONFIG_WL_SECTOR_SIZE_512 is not set +CONFIG_WL_SECTOR_SIZE_4096=y +CONFIG_WL_SECTOR_SIZE=4096 +# end of Wear Levelling + +# +# Wi-Fi Provisioning Manager +# +CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES=16 +CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT=30 +# end of Wi-Fi Provisioning Manager + +# +# Supplicant +# +CONFIG_WPA_MBEDTLS_CRYPTO=y +# CONFIG_WPA_WAPI_PSK is not set +# CONFIG_WPA_SUITE_B_192 is not set +# CONFIG_WPA_DEBUG_PRINT is not set +# CONFIG_WPA_TESTING_OPTIONS is not set +# CONFIG_WPA_WPS_STRICT is not set +# CONFIG_WPA_11KV_SUPPORT is not set +# end of Supplicant +# end of Component config + +# +# Compatibility options +# +# CONFIG_LEGACY_INCLUDE_COMMON_HEADERS is not set +# end of Compatibility options + +# Deprecated options for backward compatibility +CONFIG_TOOLPREFIX="riscv32-esp-elf-" +# CONFIG_LOG_BOOTLOADER_LEVEL_NONE is not set +# CONFIG_LOG_BOOTLOADER_LEVEL_ERROR is not set +# CONFIG_LOG_BOOTLOADER_LEVEL_WARN is not set +CONFIG_LOG_BOOTLOADER_LEVEL_INFO=y +# CONFIG_LOG_BOOTLOADER_LEVEL_DEBUG is not set +# CONFIG_LOG_BOOTLOADER_LEVEL_VERBOSE is not set +CONFIG_LOG_BOOTLOADER_LEVEL=3 +# CONFIG_APP_ROLLBACK_ENABLE is not set +# CONFIG_FLASH_ENCRYPTION_ENABLED is not set +# CONFIG_FLASHMODE_QIO is not set +# CONFIG_FLASHMODE_QOUT is not set +CONFIG_FLASHMODE_DIO=y +# CONFIG_FLASHMODE_DOUT is not set +# CONFIG_MONITOR_BAUD_9600B is not set +# CONFIG_MONITOR_BAUD_57600B is not set +CONFIG_MONITOR_BAUD_115200B=y +# CONFIG_MONITOR_BAUD_230400B is not set +# CONFIG_MONITOR_BAUD_921600B is not set +# CONFIG_MONITOR_BAUD_2MB is not set +# CONFIG_MONITOR_BAUD_OTHER is not set +CONFIG_MONITOR_BAUD_OTHER_VAL=115200 +CONFIG_MONITOR_BAUD=115200 +CONFIG_COMPILER_OPTIMIZATION_LEVEL_DEBUG=y +# CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE is not set +CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED=y +# CONFIG_OPTIMIZATION_ASSERTIONS_SILENT is not set +# CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED is not set +CONFIG_OPTIMIZATION_ASSERTION_LEVEL=2 +# CONFIG_CXX_EXCEPTIONS is not set +CONFIG_STACK_CHECK_NONE=y +# CONFIG_STACK_CHECK_NORM is not set +# CONFIG_STACK_CHECK_STRONG is not set +# CONFIG_STACK_CHECK_ALL is not set +# CONFIG_WARN_WRITE_STRINGS is not set +# CONFIG_DISABLE_GCC8_WARNINGS is not set +# CONFIG_ESP32_APPTRACE_DEST_TRAX is not set +CONFIG_ESP32_APPTRACE_DEST_NONE=y +CONFIG_ESP32_APPTRACE_LOCK_ENABLE=y +CONFIG_ADC2_DISABLE_DAC=y +# CONFIG_EVENT_LOOP_PROFILING is not set +CONFIG_POST_EVENTS_FROM_ISR=y +CONFIG_POST_EVENTS_FROM_IRAM_ISR=y +CONFIG_ESP_SYSTEM_PD_FLASH=y +CONFIG_ESP32C3_LIGHTSLEEP_GPIO_RESET_WORKAROUND=y +CONFIG_IPC_TASK_STACK_SIZE=1536 +CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE=y +# CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION is not set +CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER=20 +CONFIG_ESP32_PHY_MAX_TX_POWER=20 +CONFIG_ESP_SYSTEM_PM_POWER_DOWN_CPU=y +# CONFIG_ESP32S2_PANIC_PRINT_HALT is not set +CONFIG_ESP32S2_PANIC_PRINT_REBOOT=y +# CONFIG_ESP32S2_PANIC_SILENT_REBOOT is not set +# CONFIG_ESP32S2_PANIC_GDBSTUB is not set +CONFIG_ESP32S2_ALLOW_RTC_FAST_MEM_AS_HEAP=y +CONFIG_ESP32H2_MEMPROT_FEATURE=y +CONFIG_ESP32H2_MEMPROT_FEATURE_LOCK=y +CONFIG_SYSTEM_EVENT_QUEUE_SIZE=32 +CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE=2304 +CONFIG_MAIN_TASK_STACK_SIZE=3584 +CONFIG_CONSOLE_UART_DEFAULT=y +# CONFIG_CONSOLE_UART_CUSTOM is not set +# CONFIG_ESP_CONSOLE_UART_NONE is not set +CONFIG_CONSOLE_UART=y +CONFIG_CONSOLE_UART_NUM=0 +CONFIG_CONSOLE_UART_BAUDRATE=115200 +CONFIG_INT_WDT=y +CONFIG_INT_WDT_TIMEOUT_MS=300 +CONFIG_TASK_WDT=y +# CONFIG_TASK_WDT_PANIC is not set +CONFIG_TASK_WDT_TIMEOUT_S=5 +CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU0=y +CONFIG_TIMER_TASK_STACK_SIZE=3584 +# CONFIG_EXTERNAL_COEX_ENABLE is not set +# CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH is not set +# CONFIG_ESP32_ENABLE_COREDUMP_TO_UART is not set +CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE=y +CONFIG_MB_MASTER_TIMEOUT_MS_RESPOND=150 +CONFIG_MB_MASTER_DELAY_MS_CONVERT=200 +CONFIG_MB_QUEUE_LENGTH=20 +CONFIG_MB_SERIAL_TASK_STACK_SIZE=4096 +CONFIG_MB_SERIAL_BUF_SIZE=256 +CONFIG_MB_SERIAL_TASK_PRIO=10 +CONFIG_MB_CONTROLLER_SLAVE_ID_SUPPORT=y +CONFIG_MB_CONTROLLER_SLAVE_ID=0x00112233 +CONFIG_MB_CONTROLLER_NOTIFY_TIMEOUT=20 +CONFIG_MB_CONTROLLER_NOTIFY_QUEUE_SIZE=20 +CONFIG_MB_CONTROLLER_STACK_SIZE=4096 +CONFIG_MB_EVENT_QUEUE_TIMEOUT=20 +# CONFIG_MB_TIMER_PORT_ENABLED is not set +CONFIG_MB_TIMER_GROUP=0 +CONFIG_MB_TIMER_INDEX=0 +# CONFIG_ENABLE_STATIC_TASK_CLEAN_UP_HOOK is not set +CONFIG_TIMER_TASK_PRIORITY=1 +CONFIG_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_TIMER_QUEUE_LENGTH=10 +# CONFIG_L2_TO_L3_COPY is not set +# CONFIG_USE_ONLY_LWIP_SELECT is not set +CONFIG_ESP_GRATUITOUS_ARP=y +CONFIG_GARP_TMR_INTERVAL=60 +CONFIG_TCPIP_RECVMBOX_SIZE=32 +CONFIG_TCP_MAXRTX=12 +CONFIG_TCP_SYNMAXRTX=12 +CONFIG_TCP_MSS=1440 +CONFIG_TCP_MSL=60000 +CONFIG_TCP_SND_BUF_DEFAULT=5744 +CONFIG_TCP_WND_DEFAULT=5744 +CONFIG_TCP_RECVMBOX_SIZE=6 +CONFIG_TCP_QUEUE_OOSEQ=y +# CONFIG_ESP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES is not set +CONFIG_TCP_OVERSIZE_MSS=y +# CONFIG_TCP_OVERSIZE_QUARTER_MSS is not set +# CONFIG_TCP_OVERSIZE_DISABLE is not set +CONFIG_UDP_RECVMBOX_SIZE=6 +CONFIG_TCPIP_TASK_STACK_SIZE=3072 +CONFIG_TCPIP_TASK_AFFINITY_NO_AFFINITY=y +# CONFIG_TCPIP_TASK_AFFINITY_CPU0 is not set +CONFIG_TCPIP_TASK_AFFINITY=0x7FFFFFFF +# CONFIG_PPP_SUPPORT is not set +CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT=5 +CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072 +CONFIG_ESP32_PTHREAD_STACK_MIN=768 +CONFIG_ESP32_PTHREAD_TASK_CORE_DEFAULT=-1 +CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT="pthread" +CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS=y +# CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_FAILS is not set +# CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ALLOWED is not set +CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT=y +CONFIG_SUPPORT_TERMIOS=y +CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS=1 +CONFIG_SEMIHOSTFS_HOST_PATH_MAX_LEN=128 +# End of deprecated options diff --git a/build/devices/esp32/xsProj-esp32c3/sdkconfig.defaults.release b/build/devices/esp32/xsProj-esp32c3/sdkconfig.defaults.release new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/build/devices/esp32/xsProj-esp32c3/sdkconfig.defaults.release @@ -0,0 +1 @@ + diff --git a/build/devices/esp32/xsProj-esp32c3/sdkconfig.inst b/build/devices/esp32/xsProj-esp32c3/sdkconfig.inst new file mode 100644 index 00000000..c8421ac1 --- /dev/null +++ b/build/devices/esp32/xsProj-esp32c3/sdkconfig.inst @@ -0,0 +1,26 @@ +##### TEST INSTRUMENTATION +# +# ESP32-specific +# +CONFIG_ESP32_ENABLE_COREDUMP_TO_UART=y + +# +# ESP32-specific +# +CONFIG_CONSOLE_UART_DEFAULT=y +CONFIG_CONSOLE_UART_CUSTOM= +CONFIG_CONSOLE_UART_NONE= +CONFIG_CONSOLE_UART_NUM=0 + + +# +# Log output +# +CONFIG_LOG_DEFAULT_LEVEL_NONE= +CONFIG_LOG_DEFAULT_LEVEL_ERROR= +CONFIG_LOG_DEFAULT_LEVEL_WARN= +CONFIG_LOG_DEFAULT_LEVEL_INFO=y +CONFIG_LOG_DEFAULT_LEVEL_DEBUG= +CONFIG_LOG_DEFAULT_LEVEL_VERBOSE= +CONFIG_LOG_DEFAULT_LEVEL=3 + diff --git a/build/devices/esp32/xsProj-esp32c3/sdkconfig.release.part b/build/devices/esp32/xsProj-esp32c3/sdkconfig.release.part new file mode 100644 index 00000000..ebf421d5 --- /dev/null +++ b/build/devices/esp32/xsProj-esp32c3/sdkconfig.release.part @@ -0,0 +1,5 @@ +# +# Compiler options +# +CONFIG_OPTIMIZATION_LEVEL_DEBUG= +CONFIG_OPTIMIZATION_LEVEL_RELEASE=y diff --git a/build/devices/esp32/xsProj-esp32c3/versionCheck.py b/build/devices/esp32/xsProj-esp32c3/versionCheck.py new file mode 100644 index 00000000..f2e90c41 --- /dev/null +++ b/build/devices/esp32/xsProj-esp32c3/versionCheck.py @@ -0,0 +1,32 @@ + +import sys + +if len(sys.argv) < 3: + print("Not enough parameters") + sys.exit(1) + +given = sys.argv[1] +expected = sys.argv[2] + +g = given.split(".") +if len(g) < 3: + g.append(0) +e = expected.split(".") +if len(e) < 3: + e.append(0) + +if g[0] == e[0]: + if g[1] == e[1]: + if g[2] == e[2]: +# print("versions are the same.") + sys.exit(0) + else: +# print("major and minor versions are the same, it should work.") + sys.exit(0); + else: +# print("minor versions differ. Please update."); + sys.exit(1); +else: +# print("major versions differ. Please update."); + sys.exit(1); + diff --git a/modules/pins/digital/esp32/modGPIO.c b/modules/pins/digital/esp32/modGPIO.c index a710c5e7..692dde97 100644 --- a/modules/pins/digital/esp32/modGPIO.c +++ b/modules/pins/digital/esp32/modGPIO.c @@ -2,17 +2,17 @@ * Copyright (c) 2016-2017 Moddable Tech, Inc. * * This file is part of the Moddable SDK Runtime. - * + * * The Moddable SDK Runtime is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * + * * The Moddable SDK Runtime is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. - * + * * You should have received a copy of the GNU Lesser General Public License * along with the Moddable SDK Runtime. If not, see . * @@ -59,8 +59,10 @@ int modGPIOSetMode(modGPIOConfiguration config, uint32_t mode) switch (mode) { case kModGPIOOutput: case kModGPIOOutputOpenDrain: +#ifdef GPIO_NUM_34 if (config->pin >= GPIO_NUM_34) // pins 34-39 are input only return -1; +#endif gpio_pad_select_gpio(config->pin); gpio_set_direction(config->pin, (kModGPIOOutputOpenDrain == mode) ? GPIO_MODE_OUTPUT_OD : GPIO_MODE_OUTPUT); diff --git a/tools/mcconfig/make.esp32.mk b/tools/mcconfig/make.esp32.mk index 4db11da9..c17fbe18 100644 --- a/tools/mcconfig/make.esp32.mk +++ b/tools/mcconfig/make.esp32.mk @@ -2,17 +2,17 @@ # Copyright (c) 2016-2022 Moddable Tech, Inc. # # This file is part of the Moddable SDK Tools. -# +# # The Moddable SDK Tools is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. -# +# # The Moddable SDK Tools is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with the Moddable SDK Tools. If not, see . # @@ -29,10 +29,12 @@ EXPECTED_ESP_IDF ?= v4.4 ESP32_SUBCLASS ?= esp32 # $(warning ESP32_SUBCLASS $(ESP32_SUBCLASS)) -ifeq ($(ESP32_SUBCLASS),"esp32c3") +ifeq ("$(ESP32_SUBCLASS)","esp32c3") ESP_ARCH = riscv + GXX_PREFIX = riscv32-esp else ESP_ARCH = xtensa + GXX_PREFIX = xtensa-$(ESP32_SUBCLASS) endif ifeq ($(VERBOSE),1) @@ -64,7 +66,9 @@ ifeq ($(MAKEFLAGS_JOBS),) endif SDKCONFIG_H_DIR = $(BLD_DIR)/config - +ifeq ("$(ESP32_SUBCLASS)","esp32c3") + ESP32_TARGET = 4 +else ifeq ("$(ESP32_SUBCLASS)","esp32s3") ESP32_TARGET = 3 else @@ -74,7 +78,7 @@ else ESP32_TARGET = 1 endif endif - +endif INC_DIRS = \ $(IDF_PATH)/components \ @@ -93,6 +97,7 @@ INC_DIRS = \ $(IDF_PATH)/components/esp_event/include \ $(IDF_PATH)/components/esp_eth/include \ $(IDF_PATH)/components/esp_hw_support/include \ + $(IDF_PATH)/components/esp_hw_support/include/soc \ $(IDF_PATH)/components/esp_netif/include \ $(IDF_PATH)/components/esp_pm/include \ $(IDF_PATH)/components/esp_ringbuf/include \ @@ -101,8 +106,8 @@ INC_DIRS = \ $(IDF_PATH)/components/esp_system/include \ $(IDF_PATH)/components/esp_timer/include \ $(IDF_PATH)/components/esp_wifi/include \ - $(IDF_PATH)/components/xtensa/include \ - $(IDF_PATH)/components/xtensa/$(ESP32_SUBCLASS)/include \ + $(IDF_PATH)/components/$(ESP_ARCH)/include \ + $(IDF_PATH)/components/$(ESP_ARCH)/$(ESP32_SUBCLASS)/include \ $(IDF_PATH)/components/freertos \ $(IDF_PATH)/components/freertos/include \ $(IDF_PATH)/components/freertos/include/freertos \ @@ -133,7 +138,9 @@ INC_DIRS = \ $(IDF_PATH)/components/bt/host/nimble/nimble/porting/nimble/include \ $(IDF_PATH)/components/bt/host/nimble/nimble/porting/npl/freertos/include \ $(IDF_PATH)/components/bt/host/nimble/port/include \ + $(IDF_PATH)/components/soc/$(ESP32_SUBCLASS) \ $(IDF_PATH)/components/soc/$(ESP32_SUBCLASS)/include \ + $(IDF_PATH)/components/soc/$(ESP32_SUBCLASS)/include/soc \ $(IDF_PATH)/components/soc/include \ $(IDF_PATH)/components/soc/include/soc \ $(IDF_PATH)/components/spiffs/include \ @@ -147,7 +154,8 @@ INC_DIRS = \ $(IDF_PATH)/components/vfs/include # $(IDF_PATH)/components/$(ESP32_SUBCLASS)/include \ - +# $(IDF_PATH)/components/vfs/include + XS_OBJ = \ $(LIB_DIR)/xsAll.c.o \ $(LIB_DIR)/xsAPI.c.o \ @@ -208,12 +216,13 @@ XS_HEADERS = \ $(XS_DIR)/platforms/esp/xsPlatform.h HEADERS += $(XS_HEADERS) -CC = xtensa-$(ESP32_SUBCLASS)-elf-gcc -CPP = xtensa-$(ESP32_SUBCLASS)-elf-g++ -LD = $(CPP) -AR = xtensa-$(ESP32_SUBCLASS)-elf-ar -OBJCOPY = xtensa-$(ESP32_SUBCLASS)-elf-objcopy -OBJDUMP = xtensa-$(ESP32_SUBCLASS)-elf-objdump +CC = $(GXX_PREFIX)-elf-gcc +CPP = $(GXX_PREFIX)-elf-g++ +LD = $(CPP) +AR = $(GXX_PREFIX)-elf-ar +OBJCOPY = $(GXX_PREFIX)-elf-objcopy +OBJDUMP = $(GXX_PREFIX)-elf-objdump + ESPTOOL = $(IDF_PATH)/components/esptool_py/esptool/esptool.py AR_FLAGS = crs @@ -262,8 +271,6 @@ C_COMMON_FLAGS ?= -c -Os -g \ -Wl,-EL \ -fno-inline-functions \ -nostdlib \ - -mlongcalls \ - -mtext-section-literals \ -falign-functions=4 \ -MMD \ -fdata-sections \ @@ -276,6 +283,11 @@ C_COMMON_FLAGS ?= -c -Os -g \ -DESP_PLATFORM \ -MP +ifneq ("$(ESP32_SUBCLASS)","esp32c3") +C_COMMON_FLAGS += -mlongcalls \ + -mtext-section-literals +endif + C_FLAGS ?= $(C_COMMON_FLAGS) \ -Wno-implicit-function-declaration \ -std=gnu99 @@ -336,15 +348,15 @@ ifeq ($(DEBUG),1) ifeq ($(HOST_OS),Darwin) KILL_SERIAL_2_XSBUG = $(shell pkill serial2xsbug) DO_XSBUG = open -a $(BUILD_DIR)/bin/mac/release/xsbug.app -g - DO_LAUNCH = bash -c "serial2xsbug $(SERIAL2XSBUG_PORT) $(DEBUGGER_SPEED) 8N1 -elf $(PROJ_DIR)/build/xs_esp32.elf -bin xtensa-$(ESP32_SUBCLASS)-elf-gdb" + DO_LAUNCH = bash -c "serial2xsbug $(SERIAL2XSBUG_PORT) $(DEBUGGER_SPEED) 8N1 -elf $(PROJ_DIR)/build/xs_esp32.elf -bin $(GXX_PREFIX)-elf-gdb" else KILL_SERIAL_2_XSBUG = $(shell pkill serial2xsbug) DO_XSBUG = $(shell nohup $(BUILD_DIR)/bin/lin/release/xsbug > /dev/null 2>&1 &) DO_LAUNCH = bash -c "serial2xsbug $(SERIAL2XSBUG_PORT) $(DEBUGGER_SPEED) 8N1" endif else - KILL_SERIAL_2_XSBUG = - DO_XSBUG = + KILL_SERIAL_2_XSBUG = + DO_XSBUG = DO_LAUNCH = cd $(PROJ_DIR); $(RELEASE_LAUNCH_CMD) endif @@ -371,7 +383,7 @@ all: precursor cd $(PROJ_DIR); \ $(DO_LAUNCH) -deploy: +deploy: if ! test -e $(BIN_DIR)/xs_esp32.bin ; then (echo "Please build before deploy" && exit 1) fi @echo "# uploading to $(ESP32_SUBCLASS)" -cd $(PROJ_DIR) ; $(DEPLOY_CMD) | tee $(PROJ_DIR)/flashOutput @@ -417,7 +429,7 @@ clean: echo "# Clean project" -rm -rf $(BIN_DIR) 2>/dev/null -rm -rf $(TMP_DIR) 2>/dev/null - -rm -rf $(LIB_DIR) 2>/dev/null + -rm -rf $(LIB_DIR) 2>/dev/null $(SDKCONFIG_H): $(SDKCONFIG_FILE) $(PROJ_DIR_FILES) -rm $(PROJ_DIR)/sdkconfig 2>/dev/null @@ -425,8 +437,8 @@ $(SDKCONFIG_H): $(SDKCONFIG_FILE) $(PROJ_DIR_FILES) $(LIB_DIR): mkdir -p $(LIB_DIR) - -$(BIN_DIR)/xs_$(ESP32_SUBCLASS).a: $(SDK_OBJ) $(XS_OBJ) $(TMP_DIR)/xsPlatform.c.o $(TMP_DIR)/xsHost.c.o $(TMP_DIR)/xsHosts.c.o $(TMP_DIR)/mc.xs.c.o $(TMP_DIR)/mc.resources.c.o $(OBJECTS) + +$(BIN_DIR)/xs_$(ESP32_SUBCLASS).a: $(SDK_OBJ) $(XS_OBJ) $(TMP_DIR)/xsPlatform.c.o $(TMP_DIR)/xsHost.c.o $(TMP_DIR)/xsHosts.c.o $(TMP_DIR)/mc.xs.c.o $(TMP_DIR)/mc.resources.c.o $(OBJECTS) @echo "# ld xs_esp32.bin" echo "typedef struct { const char *date, *time, *src_version, *env_version;} _tBuildInfo; extern _tBuildInfo _BuildInfo;" > $(TMP_DIR)/buildinfo.h echo '#include "buildinfo.h"' > $(TMP_DIR)/buildinfo.c @@ -496,11 +508,11 @@ $(XS_OBJ): $(SDKCONFIG_H) $(XS_HEADERS) $(LIB_DIR)/xs%.c.o: xs%.c @echo "# cc" $(. * - * This file incorporates work covered by the following copyright and - * permission notice: + * This file incorporates work covered by the following copyright and + * permission notice: * * Copyright (C) 2010-2016 Marvell International Ltd. * Copyright (C) 2002-2010 Kinoma, Inc. @@ -71,10 +71,10 @@ #define mxExport extern #define mxImport extern #endif - #else + #else #error unknown Microsoft compiler #endif - #elif defined(__GNUC__) + #elif defined(__GNUC__) #define _setjmp(buffer) setjmp(buffer) @@ -84,7 +84,7 @@ #if defined(__linux__) #undef mxLinux #define mxLinux 1 - #define mxExport extern + #define mxExport extern #define mxImport extern #else #if defined(__APPLE__) @@ -109,10 +109,10 @@ #define mxImport extern #endif - #if defined(__ets__) - typedef uint32_t size_t; - #endif - #else +// #if defined(__ets__) +// typedef uint32_t size_t; +// #endif + #else #error unknown compiler #endif @@ -146,7 +146,7 @@ #ifndef XS_FUNCTION_ANALYZER_NORETURN #define XS_FUNCTION_ANALYZER_NORETURN #endif - + #endif /* !__XSPLATFORM__ */ #endif /* !INCLUDE_XSPLATFORM */ @@ -238,7 +238,7 @@ typedef txU4 xsUnsignedValue; #define xsTrue \ (fxBoolean(the, &the->scratch, 1), \ the->scratch) - + #define xsBoolean(_VALUE) \ (fxBoolean(the, &the->scratch, _VALUE), \ the->scratch) @@ -391,7 +391,7 @@ typedef txU4 xsIndex; fxPush(_THIS), \ fxEnumerate(the), \ fxPop()) - + #define xsHas(_THIS,_ID) \ (xsOverflow(-1), \ fxPush(_THIS), \ @@ -402,7 +402,7 @@ typedef txU4 xsIndex; fxPush(_THIS), \ fxPush(_AT), \ fxHasAt(the)) - + #define xsHasIndex(_THIS,_INDEX) \ (xsOverflow(-1), \ fxPush(_THIS), \ @@ -477,7 +477,7 @@ typedef txU4 xsIndex; fxDeleteAt(the), \ the->stack++) -#define XS_FRAME_COUNT 6 +#define XS_FRAME_COUNT 6 #define xsCall0(_THIS,_ID) \ (xsOverflow(-XS_FRAME_COUNT-0), \ @@ -883,12 +883,12 @@ typedef txU4 xsIndex; fxPush(_SLOT7), \ fxRunCount(the, 8), \ fxPop()) - + #define xsTest(_SLOT) \ (xsOverflow(-1), \ fxPush(_SLOT), \ fxRunTest(the)) - + /* Globals */ #define xsGlobal (the->stackTop[-1]) @@ -902,23 +902,23 @@ struct xsHostBuilderRecord { xsIntegerValue length; xsIdentifier id; }; - + #define xsNewHostConstructor(_CALLBACK,_LENGTH,_PROTOTYPE) \ (xsOverflow(-1), \ fxPush(_PROTOTYPE), \ fxNewHostConstructor(the, _CALLBACK, _LENGTH, xsNoID), \ fxPop()) - + #define xsNewHostConstructorObject(_CALLBACK,_LENGTH,_PROTOTYPE, _NAME) \ (xsOverflow(-1), \ fxPush(_PROTOTYPE), \ fxNewHostConstructor(the, _CALLBACK, _LENGTH, _NAME), \ fxPop()) - + #define xsNewHostFunction(_CALLBACK,_LENGTH) \ (fxNewHostFunction(the, _CALLBACK, _LENGTH, xsNoID), \ fxPop()) - + #define xsNewHostFunctionObject(_CALLBACK,_LENGTH, _NAME) \ (fxNewHostFunction(the, _CALLBACK, _LENGTH, _NAME), \ fxPop()) @@ -934,7 +934,7 @@ typedef void (*xsDestructor)(void*); #define xsNewHostObject(_DESTRUCTOR) \ (fxNewHostObject(the, _DESTRUCTOR), \ fxPop()) - + #define xsGetHostBufferLength(_SLOT) \ (the->scratch = (_SLOT), \ fxGetHostBufferLength(the, &(the->scratch))) @@ -958,7 +958,7 @@ typedef void (*xsDestructor)(void*); #define xsSetHostData(_SLOT,_DATA) \ (the->scratch = (_SLOT), \ fxSetHostData(the, &(the->scratch), _DATA)) - + #define xsGetHostDataValidate(_SLOT, validator) \ (the->scratch = (_SLOT), \ fxGetHostDataValidate(the, &(the->scratch), validator)) @@ -973,7 +973,7 @@ typedef void (*xsDestructor)(void*); #define xsGetHostHandle(_SLOT) \ (the->scratch = (_SLOT), \ fxGetHostHandle(the, &(the->scratch))) - + typedef void (*xsMarkRoot)(xsMachine*, xsSlot*); typedef void (*xsMarker)(xsMachine*, void*, xsMarkRoot); typedef void (*xsSweepRoot)(xsMachine*, xsSlot*); @@ -983,7 +983,7 @@ struct xsHostHooksStruct { xsMarker marker; xsSweeper sweeper; }; - + #define xsGetHostHooks(_SLOT) \ (the->scratch = (_SLOT), \ fxGetHostHooks(the, &(the->scratch))) @@ -1015,7 +1015,7 @@ struct xsHostHooksStruct { #else #define xsVar(_INDEX) (the->scope[-1 - (_INDEX)]) #endif - + /* Garbage Collector */ #define xsCollectGarbage() \ @@ -1127,7 +1127,7 @@ struct xsJumpRecord { #endif /* Debugger */ - + #ifdef mxDebug #define xsDebugger() \ fxDebugger(the,(char *)__FILE__,__LINE__) @@ -1150,7 +1150,7 @@ struct xsJumpRecord { fxBubble(the, 5, _BUFFER, _LENGTH, _ID) #define xsTraceRightBytes(_BUFFER,_LENGTH,_ID) \ fxBubble(the, 6, _BUFFER, _LENGTH, _ID) - + #define xsLog(...) \ fxReport(the, __VA_ARGS__) @@ -1198,21 +1198,21 @@ struct xsCreationRecord { #define xsCreateMachine(_CREATION,_NAME,_CONTEXT) \ fxCreateMachine(_CREATION, _NAME, _CONTEXT) - + #define xsDeleteMachine(_THE) \ fxDeleteMachine(_THE) - + #define xsCloneMachine(_CREATION,_MACHINE,_NAME,_CONTEXT) \ fxCloneMachine(_CREATION, _MACHINE, _NAME, _CONTEXT) - + #define xsPrepareMachine(_CREATION,_PREPARATION,_NAME, _CONTEXT, _ARCHIVE) \ fxPrepareMachine(_CREATION, _PREPARATION, _NAME, _CONTEXT, _ARCHIVE) #define xsShareMachine(_THE) \ fxShareMachine(_THE) -/* Context */ - +/* Context */ + #define xsGetContext(_THE) \ ((_THE)->context) @@ -1250,7 +1250,7 @@ struct xsCreationRecord { break; \ } while(1) -enum { +enum { xsNoID = -1, xsDefault = 0, xsDontDelete = 2, @@ -1262,7 +1262,7 @@ enum { xsChangeAll = 30 }; typedef unsigned char xsAttribute; - + #define xsArrayCacheBegin(_ARRAY) \ (fxPush(_ARRAY), \ fxArrayCacheBegin(the, the->stack), \ @@ -1469,7 +1469,7 @@ mxImport void* fxMarshall(xsMachine*, xsBooleanValue); mxImport xsBooleanValue fxIsProfiling(xsMachine*); mxImport void fxStartProfiling(xsMachine*); mxImport void fxStopProfiling(xsMachine*); - + mxImport void* fxGetArchiveCode(xsMachine*, void*, xsStringValue, size_t*); mxImport xsIntegerValue fxGetArchiveCodeCount(xsMachine*, void*); mxImport void* fxGetArchiveCodeName(xsMachine*, void*, xsIntegerValue); @@ -1492,4 +1492,3 @@ mxImport void fxAbort(xsMachine* the, int status); #endif /* !__XSALL__ */ #endif /* __XS__ */ - diff --git a/xs/platforms/esp/xsHost.c b/xs/platforms/esp/xsHost.c index 0b87160b..652d46e8 100644 --- a/xs/platforms/esp/xsHost.c +++ b/xs/platforms/esp/xsHost.c @@ -2,22 +2,22 @@ * Copyright (c) 2016-2022 Moddable Tech, Inc. * * This file is part of the Moddable SDK Runtime. - * + * * The Moddable SDK Runtime is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * + * * The Moddable SDK Runtime is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. - * + * * You should have received a copy of the GNU Lesser General Public License * along with the Moddable SDK Runtime. If not, see . * - * This file incorporates work covered by the following copyright and - * permission notice: + * This file incorporates work covered by the following copyright and + * permission notice: * * Copyright (C) 2010-2016 Marvell International Ltd. * Copyright (C) 2002-2010 Kinoma, Inc. @@ -808,7 +808,7 @@ void espInitInstrumentation(txMachine *the) #if kTargetCPUCount > 1 modInstrumentationSetCallback(CPU1, modInstrumentationCPU1); #endif - + timer_config_t config = { .divider = 16, .counter_dir = TIMER_COUNT_UP, @@ -872,6 +872,10 @@ void espSampleInstrumentation(modTimer timer, void *refcon, int refconSize) #if INSTRUMENT_CPULOAD void IRAM_ATTR timer_group0_isr(void *para) { +#if kCPUESP32C3 + TIMERG0.int_st_timers.t0_int_st = 1; + TIMERG0.hw_timer[TIMER_0].config.tx_alarm_en = TIMER_ALARM_EN; +#else #if kCPUESP32S3 TIMERG0.int_st_timers.t0_int_st = 1; TIMERG0.hw_timer[TIMER_0].config.tn_alarm_en = TIMER_ALARM_EN; @@ -879,7 +883,7 @@ void IRAM_ATTR timer_group0_isr(void *para) TIMERG0.kESP32TimerDef.t0 = 1; TIMERG0.hw_timer[TIMER_0].config.alarm_en = TIMER_ALARM_EN; #endif - +#endif gCPUCounts[0 + (xTaskGetCurrentTaskHandleForCPU(0) == gIdles[0])] += 1; #if kTargetCPUCount > 1 gCPUCounts[2 + (xTaskGetCurrentTaskHandleForCPU(1) == gIdles[1])] += 1; @@ -1357,7 +1361,7 @@ static txBoolean spiWrite(void *dst, size_t offset, void *buffer, size_t size) void *modInstallMods(void *preparationIn, uint8_t *status) { - txPreparation *preparation = preparationIn; + txPreparation *preparation = preparationIn; spi_flash_mmap_handle_t handle; void *result = NULL; @@ -1403,7 +1407,7 @@ static txBoolean spiWrite(void *dst, size_t offset, void *buffer, size_t size) void *modInstallMods(void *preparationIn, uint8_t *status) { - txPreparation *preparation = preparationIn; + txPreparation *preparation = preparationIn; if (fxMapArchive(C_NULL, preparation, (void *)kModulesStart, kFlashSectorSize, spiRead, spiWrite)) return kModulesStart; diff --git a/xs/platforms/esp/xsHost.h b/xs/platforms/esp/xsHost.h index 874c7091..8cb3ac4f 100644 --- a/xs/platforms/esp/xsHost.h +++ b/xs/platforms/esp/xsHost.h @@ -2,17 +2,17 @@ * Copyright (c) 2016-2022 Moddable Tech, Inc. * * This file is part of the Moddable SDK Runtime. - * + * * The Moddable SDK Runtime is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * + * * The Moddable SDK Runtime is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. - * + * * You should have received a copy of the GNU Lesser General Public License * along with the Moddable SDK Runtime. If not, see . * @@ -181,8 +181,8 @@ extern int modTimersNext(void); #else #define modCriticalSectionDeclare extern portMUX_TYPE gCriticalMux; - #define modCriticalSectionBegin() vPortEnterCritical(&gCriticalMux) - #define modCriticalSectionEnd() vPortExitCritical(&gCriticalMux) + #define modCriticalSectionBegin() portENTER_CRITICAL(&gCriticalMux) + #define modCriticalSectionEnd() portEXIT_CRITICAL(&gCriticalMux) #endif /* @@ -331,7 +331,7 @@ void selectionSort(void *base, size_t num, size_t width, int (*compare )(const v #define c_strtod strtod #define c_strtol strtol #define c_strtoul strtoul - + /* DATE */ #if ESP32 @@ -355,10 +355,10 @@ void selectionSort(void *base, size_t num, size_t width, int (*compare )(const v #endif /* ERROR */ - + #define C_ENOMEM ENOMEM #define C_EINVAL EINVAL - + /* MATH */ #include @@ -516,7 +516,11 @@ uint8_t modSPIErase(uint32_t offset, uint32_t size); /* CPU */ -#if ESP32 == 3 +#if ESP32 == 4 + #define kCPUESP32C3 1 + #define kTargetCPUCount 1 + #define kESP32TimerDef int_clr +#elif ESP32 == 3 #define kCPUESP32S3 1 #define kTargetCPUCount 2 #define kESP32TimerDef int_clr @@ -524,7 +528,7 @@ uint8_t modSPIErase(uint32_t offset, uint32_t size); #define kCPUESP32S2 1 #define kTargetCPUCount 1 #define kESP32TimerDef int_clr -#elif ESP32 == 1 +#elif ESP32 == 1 #define kTargetCPUCount 2 #define kESP32TimerDef int_clr_timers #else diff --git a/xs/sources/xsDebug.c b/xs/sources/xsDebug.c index 9f747485..551fb228 100644 --- a/xs/sources/xsDebug.c +++ b/xs/sources/xsDebug.c @@ -2,22 +2,22 @@ * Copyright (c) 2016-2017 Moddable Tech, Inc. * * This file is part of the Moddable SDK Runtime. - * + * * The Moddable SDK Runtime is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * + * * The Moddable SDK Runtime is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. - * + * * You should have received a copy of the GNU Lesser General Public License * along with the Moddable SDK Runtime. If not, see . * - * This file incorporates work covered by the following copyright and - * permission notice: + * This file incorporates work covered by the following copyright and + * permission notice: * * Copyright (C) 2010-2016 Marvell International Ltd. * Copyright (C) 2002-2010 Kinoma, Inc. @@ -95,7 +95,7 @@ static void fxReportException(txMachine* the, txString thePath, txInteger theLin ((('0' <= c) && (c <= '9')) || (('A' <= c) && (c <= 'Z')) || (('a' <= c) && (c <= 'z')) || (c == '.') || (c == '-') || (c == '_') || (c == ':')) #define mxIsSpace(c) \ ((c == ' ') || (c == '\n') || (c == '\r') || (c == '\t')) - + enum { XS_BODY_STATE = 0, XS_CR_STATE, @@ -182,11 +182,11 @@ void fxClearBreakpoint(txMachine* the, txString thePath, txInteger theLine) if (!c_strcmp(thePath, "exceptions")) { the->breakOnExceptionsFlag = 0; return; - } + } if (!c_strcmp(thePath, "start")) { the->breakOnStartFlag = 0; return; - } + } if ((theLine <= 0) || (0x00007FFF < theLine)) return; path = fxFindName(the, thePath); @@ -327,26 +327,26 @@ void fxDebugParse(txMachine* the) c = *string++; switch (the->debugState) { case XS_BODY_STATE: - if (c == '<') + if (c == '<') the->debugState = XS_TAG_STATE; - else if (c == '\r') + else if (c == '\r') the->debugState = XS_CR_STATE; break; - + case XS_CR_STATE: - if (c == '\n') + if (c == '\n') the->debugState = XS_LF_STATE; else the->debugState = XS_ERROR_STATE; break; - + case XS_LF_STATE: - if (c == '<') + if (c == '<') the->debugState = XS_TAG_STATE; - else if (c == '\r') + else if (c == '\r') the->debugState = XS_CR_STATE; break; - + case XS_TAG_STATE: if (c == '/') the->debugState = XS_END_TAG_STATE; @@ -391,7 +391,7 @@ void fxDebugParse(txMachine* the) else if (!mxIsSpace(c)) the->debugState = XS_ERROR_STATE; break; - + case XS_ATTRIBUTE_NAME_STATE: if (mxIsNextLetter(c)) { if (the->nameIndex < 255) { @@ -464,7 +464,7 @@ void fxDebugParse(txMachine* the) the->debugState = XS_START_TAG_SPACE_STATE; } break; - + case XS_EMPTY_TAG_STATE: if (c == '>') { the->debugState = XS_BODY_STATE; @@ -474,7 +474,7 @@ void fxDebugParse(txMachine* the) else the->debugState = XS_ERROR_STATE; break; - + case XS_END_TAG_STATE: if (mxIsFirstLetter(c)) { the->debugState = XS_END_TAG_NAME_STATE; @@ -490,7 +490,7 @@ void fxDebugParse(txMachine* the) the->nameBuffer[the->nameIndex] = c; the->nameIndex++; } - else + else the->debugState = XS_ERROR_STATE; break; } @@ -517,39 +517,39 @@ void fxDebugParse(txMachine* the) else the->debugState = XS_ERROR_STATE; break; - + case XS_START_CDATA_STATE_1: - if (c == '[') + if (c == '[') the->debugState = XS_START_CDATA_STATE_2; else the->debugState = XS_ERROR_STATE; break; case XS_START_CDATA_STATE_2: - if (c == 'C') + if (c == 'C') the->debugState = XS_START_CDATA_STATE_3; else the->debugState = XS_ERROR_STATE; break; case XS_START_CDATA_STATE_3: - if (c == 'D') + if (c == 'D') the->debugState = XS_START_CDATA_STATE_4; else the->debugState = XS_ERROR_STATE; break; case XS_START_CDATA_STATE_4: - if (c == 'A') + if (c == 'A') the->debugState = XS_START_CDATA_STATE_5; else the->debugState = XS_ERROR_STATE; break; case XS_START_CDATA_STATE_5: - if (c == 'T') + if (c == 'T') the->debugState = XS_START_CDATA_STATE_6; else the->debugState = XS_ERROR_STATE; break; case XS_START_CDATA_STATE_6: - if (c == 'A') + if (c == 'A') the->debugState = XS_START_CDATA_STATE_7; else the->debugState = XS_ERROR_STATE; @@ -561,7 +561,7 @@ void fxDebugParse(txMachine* the) the->debugState = XS_ERROR_STATE; break; case XS_CDATA_STATE: - if (c == ']') + if (c == ']') the->debugState = XS_END_CDATA_STATE_1; else if (c == 0) { fxDebugScriptCDATA(the, 0xF4); @@ -573,7 +573,7 @@ void fxDebugParse(txMachine* the) fxDebugScriptCDATA(the, c); break; case XS_END_CDATA_STATE_1: - if (c == ']') + if (c == ']') the->debugState = XS_END_CDATA_STATE_2; else { fxDebugScriptCDATA(the, ']'); @@ -593,7 +593,7 @@ void fxDebugParse(txMachine* the) the->debugState = XS_CDATA_STATE; } break; - + case XS_ERROR_STATE: // fprintf(stderr, "\nERROR: %c\n", c); break; @@ -1296,7 +1296,7 @@ void fxEchoProperty(txMachine* the, txSlot* theProperty, txInspectorNameList* th fxEchoString(the, the->nameBuffer); } fxEcho(the, "\""); - + switch (theProperty->kind) { case XS_UNDEFINED_KIND: fxEcho(the, " value=\"undefined\"/>"); @@ -1441,13 +1441,13 @@ void fxEchoPropertyHost(txMachine* the, txInspectorNameList* theList, txSlot* th hostInspector->kind = XS_HOST_INSPECTOR_KIND; hostInspector->value.hostInspector.cache = cache; hostInspector->value.hostInspector.instance = theInstance; - if (hostInspectors->value.list.first) + if (hostInspectors->value.list.first) hostInspectors->value.list.last->next = hostInspector; else hostInspectors->value.list.first = hostInspector; hostInspectors->value.list.last = hostInspector; mxPop(); - + aParent = theInstance; while (aParent && (aParent->next->kind == XS_HOST_KIND)) { txSlot* aParentProperty = aParent->next; @@ -1526,7 +1526,7 @@ void fxEchoPropertyInstance(txMachine* the, txInspectorNameList* theList, txStri fxEcho(the, " name=\""); fxEchoString(the, buffer); fxEcho(the, "\""); - + if (instanceInspector) { if (instanceInspector->value.instanceInspector.link) { txInspectorNameLink* link = theList->first; @@ -1551,12 +1551,12 @@ void fxEchoPropertyInstance(txMachine* the, txInspectorNameList* theList, txStri theList->first = &link; theList->last = &link; instanceInspector->value.instanceInspector.link = &link; - + fxEchoAddress(the, theInstance); fxEcho(the, ">"); fxEchoInstance(the, theInstance, theList); fxEcho(the, ""); - + instanceInspector->value.instanceInspector.link = C_NULL; if (link.previous) link.previous->next = C_NULL; @@ -1899,11 +1899,11 @@ void fxSetBreakpoint(txMachine* the, txString thePath, txInteger theLine) if (!c_strcmp(thePath, "exceptions")) { the->breakOnExceptionsFlag = 1; return; - } + } if (!c_strcmp(thePath, "start")) { the->breakOnStartFlag = 1; return; - } + } if ((theLine <= 0) || (0x00007FFF < theLine)) return; path = fxNewNameC(the, thePath); @@ -2027,7 +2027,7 @@ void fxBubble(txMachine* the, txInteger flags, void* message, txInteger length, while (byteLength) { txU1 byte = c_read8(bytes); fxEchoCharacter(the, gxHexaDigits[(byte & 0xF0) >> 4]); - fxEchoCharacter(the, gxHexaDigits[(byte & 0x0F)]); + fxEchoCharacter(the, gxHexaDigits[(byte & 0x0F)]); bytes++; byteLength--; } @@ -2248,7 +2248,7 @@ void fxVReportWarning(void* console, txString thePath, txInteger theLine, txStri #endif } -#ifdef mxInstrument +#ifdef mxInstrument #define xsInstrumentCount 11 static char* const xsInstrumentNames[xsInstrumentCount] ICACHE_XS6STRING_ATTR = { "Chunk used", @@ -2293,9 +2293,9 @@ void fxDescribeInstrumentation(txMachine* the, txInteger count, txString* names, } for (i = 0; i < xsInstrumentCount; i++, j++) { fxEcho(the, ""); } fxEcho(the, ""); diff --git a/xs/sources/xsSnapshot.c b/xs/sources/xsSnapshot.c index 0ea0b155..ba0db184 100644 --- a/xs/sources/xsSnapshot.c +++ b/xs/sources/xsSnapshot.c @@ -51,7 +51,6 @@ static void fxUnprojectTable(txMachine* the, txSnapshot* snapshot, txSlot* table static void fxWriteChunk(txMachine* the, txSnapshot* snapshot, txSlot* slot); static void fxWriteChunkArray(txMachine* the, txSnapshot* snapshot, txSlot* address, txSize length, txFlag flag); -static void fxWriteChunkBigInt(txMachine* the, txSnapshot* snapshot, void* address, txSize size); static void fxWriteChunkData(txMachine* the, txSnapshot* snapshot, void* address); static void fxWriteChunkTable(txMachine* the, txSnapshot* snapshot, txSlot** address, txSize length); static void fxWriteChunkZero(txMachine* the, txSnapshot* snapshot, txSize size); @@ -1200,7 +1199,7 @@ void fxWriteChunk(txMachine* the, txSnapshot* snapshot, txSlot* slot) fxWriteChunkData(the, snapshot, slot->value.string); break; case XS_BIGINT_KIND: - fxWriteChunkBigInt(the, snapshot, slot->value.bigint.data, slot->value.bigint.size); + fxWriteChunkData(the, snapshot, slot->value.bigint.data); break; case XS_ARGUMENTS_SLOPPY_KIND: case XS_ARGUMENTS_STRICT_KIND: @@ -1270,20 +1269,6 @@ void fxWriteChunkArray(txMachine* the, txSnapshot* snapshot, txSlot* address, tx } } -void fxWriteChunkBigInt(txMachine* the, txSnapshot* snapshot, void* address, txSize size) -{ - txChunk* chunk = (txChunk*)(((txByte*)(address)) - sizeof(txChunk)); - if (chunk->size & mxChunkFlag) { - txByte* temporary = chunk->temporary; - size <<= 2; - chunk->size &= ~mxChunkFlag; - chunk->temporary = C_NULL; - mxThrowIf((*snapshot->write)(snapshot->stream, chunk, sizeof(txChunk) + size)); - chunk->temporary = temporary; - fxWriteChunkZero(the, snapshot, chunk->size - sizeof(txChunk) - size); - } -} - void fxWriteChunkData(txMachine* the, txSnapshot* snapshot, void* address) { txChunk* chunk = (txChunk*)(((txByte*)(address)) - sizeof(txChunk));