forked from test34/can_wizard
v1.0.0
size and perfomance optimizations, twai in isr, littlefs tweaking, less bootloader logs, app now fits on 1 MB flash chips
This commit is contained in:
parent
87f5a42a91
commit
c1c1e16448
4 changed files with 22 additions and 4 deletions
|
@ -1,6 +1,7 @@
|
||||||
# The following lines of boilerplate have to be in your project's CMakeLists
|
# The following lines of boilerplate have to be in your project's CMakeLists
|
||||||
# in this exact order for cmake to work correctly
|
# in this exact order for cmake to work correctly
|
||||||
cmake_minimum_required(VERSION 3.16)
|
cmake_minimum_required(VERSION 3.16)
|
||||||
|
set(PROJECT_VER "v1.0.0")
|
||||||
|
|
||||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||||
project(can_wizard)
|
project(can_wizard)
|
||||||
|
|
|
@ -13,7 +13,7 @@ static const twai_general_config_t default_g_config = {
|
||||||
.rx_queue_len = 10,
|
.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,
|
.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,
|
.clkout_divider = 0,
|
||||||
.intr_flags = ESP_INTR_FLAG_LEVEL1,
|
.intr_flags = ESP_INTR_FLAG_IRAM,
|
||||||
};
|
};
|
||||||
|
|
||||||
// functions
|
// functions
|
||||||
|
|
|
@ -2,6 +2,6 @@
|
||||||
# Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap
|
# Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap
|
||||||
nvs, data, nvs, 0x9000, 0x6000,
|
nvs, data, nvs, 0x9000, 0x6000,
|
||||||
phy_init, data, phy, 0xf000, 0x1000,
|
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
|
# rename subtype to littlefs after updating to v5.2
|
||||||
storage, data, spiffs, , 0xF0000,
|
storage, data, spiffs, , 0x20000,
|
||||||
|
|
|
|
@ -1,9 +1,11 @@
|
||||||
# Part table + fs
|
# Part table + fs + flash
|
||||||
CONFIG_PARTITION_TABLE_CUSTOM=y
|
CONFIG_PARTITION_TABLE_CUSTOM=y
|
||||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv"
|
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv"
|
||||||
CONFIG_PARTITION_TABLE_FILENAME="partitions.csv"
|
CONFIG_PARTITION_TABLE_FILENAME="partitions.csv"
|
||||||
|
CONFIG_ESPTOOLPY_FLASHSIZE_1MB=y
|
||||||
CONFIG_ESPTOOLPY_HEADER_FLASHSIZE_UPDATE=y
|
CONFIG_ESPTOOLPY_HEADER_FLASHSIZE_UPDATE=y
|
||||||
|
|
||||||
|
|
||||||
# UART
|
# UART
|
||||||
CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG=y
|
CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG=y
|
||||||
CONFIG_ESP_CONSOLE_SECONDARY_NONE=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_INIT=y
|
||||||
CONFIG_ESP_TASK_WDT_TIMEOUT_S=15
|
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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue