-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
101 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# 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_NAME "tronferno-mcu") | ||
|
||
file(GLOB external_components ${CMAKE_CURRENT_LIST_DIR}/../../external/*/components ${CMAKE_CURRENT_LIST_DIR}/../../external/*/external/*/components) | ||
set(EXTRA_COMPONENT_DIRS ${CMAKE_CURRENT_LIST_DIR}/../../components ${external_components}) | ||
|
||
set(COMPONENTS tronferno | ||
bootloader | ||
esptool_py | ||
partition_table | ||
soc log spi_flash micro-ecc efuse driver esp_rom) | ||
|
||
#set environment variables to be used in components | ||
set(comp_compile_feats cxx_std_20) | ||
set(comp_compile_opts "$<$<COMPILE_LANGUAGE:CXX>:-fpermissive>" -Wno-missing-field-initializers) | ||
|
||
include($ENV{IDF_PATH}/tools/cmake/project.cmake) | ||
|
||
add_compile_definitions(MCU_ESP32 MCU_TYPE="esp32") | ||
add_compile_options(-include esp_attr.h) | ||
add_link_options(-Wl,--demangle) | ||
#add_compile_definitions(MQTT_SUPPORTED_FEATURE_TRANSPORT_ERR_REPORTING) | ||
|
||
if(DEFINED ENV{DISTRO}) | ||
add_compile_definitions(DISTRIBUTION) | ||
endif() | ||
if(DEFINED ENV{FLAVOR_LAN}) | ||
add_compile_definitions(FLAVOR_LAN) | ||
endif() | ||
|
||
function(component_compile_features) | ||
target_compile_features(${COMPONENT_LIB} PRIVATE ${ARGV}) | ||
endfunction() | ||
|
||
project(tronferno-mcu esptool_py) | ||
|
||
|
||
include(CTest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# 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, 0x6000, | ||
phy_init, data, phy, 0xf000, 0x1000, | ||
otadata, data, ota, 0x10000, 0x2000, | ||
storage, data, spiffs, 0x12000, 0xee000, | ||
ota_0, app, ota_0, 0x100000, 0x180000, | ||
ota_1, app, ota_1, 0x280000, 0x180000, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
CONFIG_BOOTLOADER_LOG_LEVEL=2 | ||
CONFIG_BOOTLOADER_LOG_LEVEL_INFO=n | ||
CONFIG_BOOTLOADER_LOG_LEVEL_WARN=y | ||
CONFIG_BOOTLOADER_SPI_WP_PIN=7 | ||
CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT=y | ||
CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE=y | ||
CONFIG_COMPILER_OPTIMIZATION_PERF=y | ||
CONFIG_ESP32_DEFAULT_CPU_FREQ_160= | ||
CONFIG_ESP32_DEFAULT_CPU_FREQ_240=y | ||
CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ=240 | ||
CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_1=y | ||
CONFIG_ESP_MAC_ADDR_UNIVERSE_ETH=y | ||
CONFIG_ESP_MAIN_TASK_STACK_SIZE=4096 | ||
CONFIG_ESP_SYSTEM_EVENT_TASK_STACK_SIZE=2048 | ||
CONFIG_ESPTOOLPY_FLASHSIZE_2MB= | ||
CONFIG_ESPTOOLPY_FLASHSIZE="4MB" | ||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y | ||
CONFIG_ETH_DMA_BUFFER_SIZE=512 | ||
CONFIG_ETH_DMA_RX_BUFFER_NUM=10 | ||
CONFIG_ETH_DMA_TX_BUFFER_NUM=10 | ||
CONFIG_ETH_ENABLED=y | ||
CONFIG_ETH_PHY_INTERFACE_RMII=y | ||
CONFIG_ETH_RMII_CLK_OUT_GPIO=17 | ||
CONFIG_ETH_RMII_CLK_OUTPUT=y | ||
CONFIG_ETH_USE_ESP32_EMAC=y | ||
CONFIG_ETH_USE_SPI_ETHERNET=y | ||
CONFIG_FREERTOS_CHECK_STACKOVERFLOW_CANARY= | ||
CONFIG_FREERTOS_CHECK_STACKOVERFLOW_PTRVAL=y | ||
CONFIG_FREERTOS_HZ=1000 | ||
CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=1024 | ||
CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=3 | ||
CONFIG_HTTPD_MAX_REQ_HDR_LEN=1024 | ||
CONFIG_HTTPD_MAX_URI_LEN=128 | ||
CONFIG_HTTPD_WS_SUPPORT=y | ||
CONFIG_LWIP_ETHARP_TRUST_IP_MAC=y | ||
CONFIG_LWIP_MAX_SOCKETS=12 | ||
CONFIG_LWIP_SO_REUSE_RXTOALL=y | ||
CONFIG_LWIP_SO_REUSE=y | ||
CONFIG_LWIP_DHCP_GET_NTP_SRV=y | ||
CONFIG_MBEDTLS_HARDWARE_MPI=y | ||
CONFIG_MBEDTLS_MPI_USE_INTERRUPT=y | ||
CONFIG_PARTITION_TABLE_CUSTOM=y | ||
CONFIG_PARTITION_TABLE_FILENAME="partitions.csv" | ||
CONFIG_PARTITION_TABLE_SINGLE_APP= | ||
CONFIG_SPIFFS_CACHE= | ||
CONFIG_SPIFFS_USE_MTIME= | ||
CONFIG_LWIP_LOCAL_HOSTNAME="tronferno" | ||
CONFIG_GPTIMER_ISR_IRAM_SAFE=y | ||
CONFIG_GPTIMER_CTRL_FUNC_IN_IRAM=y | ||
CONFIG_APP_HTTP_ENABLE=1 | ||
CONFIG_LOG_COLORS=n | ||
CONFIG_LOG_TIMESTAMP_SOURCE_RTOS=y |