diff --git a/CMakeLists.txt b/CMakeLists.txt index 43bedeb..1ab854c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,7 @@ # The following lines of boilerplate have to be in your project's CMakeLists # in this exact order for cmake to work correctly cmake_minimum_required(VERSION 3.16) +set(PROJECT_VER "v1.0.0") include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(can_wizard) diff --git a/main/cmd_can.h b/main/cmd_can.h index 1e4528c..f499663 100644 --- a/main/cmd_can.h +++ b/main/cmd_can.h @@ -13,7 +13,7 @@ static const twai_general_config_t default_g_config = { .rx_queue_len = 10, .alerts_enabled = TWAI_ALERT_ERR_ACTIVE | TWAI_ALERT_BUS_RECOVERED | TWAI_ALERT_BUS_ERROR | TWAI_ALERT_ERR_PASS | TWAI_ALERT_BUS_OFF, .clkout_divider = 0, - .intr_flags = ESP_INTR_FLAG_LEVEL1, + .intr_flags = ESP_INTR_FLAG_IRAM, }; // functions diff --git a/partitions.csv b/partitions.csv index 942d31a..04ec0af 100644 --- a/partitions.csv +++ b/partitions.csv @@ -2,6 +2,6 @@ # Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap nvs, data, nvs, 0x9000, 0x6000, phy_init, data, phy, 0xf000, 0x1000, -factory, app, factory, 0x10000, 1M, +factory, app, factory, 0x10000, 0x60000, # rename subtype to littlefs after updating to v5.2 -storage, data, spiffs, , 0xF0000, +storage, data, spiffs, , 0x20000, diff --git a/sdkconfig.defaults b/sdkconfig.defaults index 44a53d7..3dbba4f 100644 --- a/sdkconfig.defaults +++ b/sdkconfig.defaults @@ -1,9 +1,11 @@ -# Part table + fs +# Part table + fs + flash CONFIG_PARTITION_TABLE_CUSTOM=y CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" CONFIG_PARTITION_TABLE_FILENAME="partitions.csv" +CONFIG_ESPTOOLPY_FLASHSIZE_1MB=y CONFIG_ESPTOOLPY_HEADER_FLASHSIZE_UPDATE=y + # UART CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG=y CONFIG_ESP_CONSOLE_SECONDARY_NONE=y @@ -28,3 +30,18 @@ CONFIG_ESP_TASK_WDT_EN=y CONFIG_ESP_TASK_WDT_INIT=y CONFIG_ESP_TASK_WDT_TIMEOUT_S=15 +# LittleFS +CONFIG_LITTLEFS_FLUSH_FILE_EVERY_WRITE=y +CONFIG_LITTLEFS_USE_MTIME=n + +# Compiling and logs +CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE=y +CONFIG_BOOTLOADER_LOG_LEVEL_ERROR=y +CONFIG_BOOTLOADER_LOG_LEVEL=1 +CONFIG_COMPILER_OPTIMIZATION_PERF=y +CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT=y +CONFIG_COMPILER_OPTIMIZATION_CHECKS_SILENT=y + +# TWAI +CONFIG_TWAI_ISR_IN_IRAM=y +