Skip to content

Commit

Permalink
Add temporary config for wt32-eth01
Browse files Browse the repository at this point in the history
  • Loading branch information
zwiebert committed Sep 19, 2024
1 parent 9a2c7b7 commit bc1725d
Show file tree
Hide file tree
Showing 3 changed files with 101 additions and 0 deletions.
41 changes: 41 additions & 0 deletions configs/esp32-wt32-eth01/CMakeLists.txt
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)
8 changes: 8 additions & 0 deletions configs/esp32-wt32-eth01/partitions.csv
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,
52 changes: 52 additions & 0 deletions configs/esp32-wt32-eth01/sdkconfig.defaults
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

0 comments on commit bc1725d

Please sign in to comment.