Skip to content

Commit

Permalink
use cmake build system
Browse files Browse the repository at this point in the history
  • Loading branch information
256dpi committed Apr 6, 2022
1 parent 4161c68 commit 2ebba6b
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 58 deletions.
15 changes: 6 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,23 @@ update:
install:
export IDF_TOOLS_PATH=$(shell pwd)/test/tools; cd test/esp-idf; ./install.sh esp32

defconfig:
export IDF_TOOLS_PATH=$(shell pwd)/test/tools; . test/esp-idf/export.sh; cd test; make defconfig

menuconfig:
export IDF_TOOLS_PATH=$(shell pwd)/test/tools; . test/esp-idf/export.sh; cd test; make menuconfig
export IDF_TOOLS_PATH=$(shell pwd)/test/tools; . test/esp-idf/export.sh; cd test; idf.py menuconfig

erase:
export IDF_TOOLS_PATH=$(shell pwd)/test/tools; . test/esp-idf/export.sh; cd test; make erase_flash
export IDF_TOOLS_PATH=$(shell pwd)/test/tools; . test/esp-idf/export.sh; cd test; idf.py erase-flash

clean:
export IDF_TOOLS_PATH=$(shell pwd)/test/tools; . test/esp-idf/export.sh; cd test; make clean
export IDF_TOOLS_PATH=$(shell pwd)/test/tools; . test/esp-idf/export.sh; cd test; idf.py clean

build:
export IDF_TOOLS_PATH=$(shell pwd)/test/tools; . test/esp-idf/export.sh; cd test; make
export IDF_TOOLS_PATH=$(shell pwd)/test/tools; . test/esp-idf/export.sh; cd test; idf.py build

flash:
export IDF_TOOLS_PATH=$(shell pwd)/test/tools; . test/esp-idf/export.sh; cd test; make flash
export IDF_TOOLS_PATH=$(shell pwd)/test/tools; . test/esp-idf/export.sh; cd test; idf.py flash

monitor:
export IDF_TOOLS_PATH=$(shell pwd)/test/tools; . test/esp-idf/export.sh; cd test; make monitor
export IDF_TOOLS_PATH=$(shell pwd)/test/tools; . test/esp-idf/export.sh; cd test; idf.py monitor

simple-monitor:
@clear
Expand Down
3 changes: 3 additions & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
cmake_minimum_required(VERSION 3.5)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(esp-mqtt)
1 change: 1 addition & 0 deletions test/main/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
idf_component_register(SRCS "main.c" INCLUDE_DIRS "" EMBED_FILES server_root_cert.pem)
61 changes: 12 additions & 49 deletions test/sdkconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Automatically generated file. DO NOT EDIT.
# Espressif IoT Development Framework (ESP-IDF) Project Configuration
#
CONFIG_IDF_CMAKE=y
CONFIG_IDF_TARGET_ARCH_XTENSA=y
CONFIG_IDF_TARGET="esp32"
CONFIG_IDF_TARGET_ESP32=y
Expand All @@ -11,8 +12,6 @@ CONFIG_IDF_FIRMWARE_CHIP_ID=0x0000
# SDK tool configuration
#
CONFIG_SDK_TOOLPREFIX="xtensa-esp32-elf-"
CONFIG_SDK_PYTHON="python"
CONFIG_SDK_MAKE_WARN_UNDEFINED_VARIABLES=y
# CONFIG_SDK_TOOLCHAIN_SUPPORTS_TIME_WIDE_64_BITS is not set
# end of SDK tool configuration

Expand Down Expand Up @@ -78,15 +77,7 @@ CONFIG_BOOTLOADER_FLASH_XMC_SUPPORT=y
#
# Serial flasher config
#
CONFIG_ESPTOOLPY_PORT="/dev/cu.SLAB_USBtoUART"
# CONFIG_ESPTOOLPY_BAUD_115200B is not set
# CONFIG_ESPTOOLPY_BAUD_230400B is not set
CONFIG_ESPTOOLPY_BAUD_921600B=y
# CONFIG_ESPTOOLPY_BAUD_2MB is not set
# CONFIG_ESPTOOLPY_BAUD_OTHER is not set
CONFIG_ESPTOOLPY_BAUD_OTHER_VAL=115200
CONFIG_ESPTOOLPY_BAUD=921600
CONFIG_ESPTOOLPY_COMPRESSED=y
# CONFIG_ESPTOOLPY_NO_STUB is not set
# CONFIG_ESPTOOLPY_FLASHMODE_QIO is not set
# CONFIG_ESPTOOLPY_FLASHMODE_QOUT is not set
Expand Down Expand Up @@ -149,6 +140,7 @@ CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE=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
Expand Down Expand Up @@ -266,16 +258,6 @@ CONFIG_EFUSE_CODE_SCHEME_COMPAT_3_4=y
CONFIG_EFUSE_MAX_BLK_LEN=192
# end of eFuse Bit Manager

#
# esp-mqtt
#
CONFIG_ESP_MQTT_ENABLED=y
CONFIG_ESP_MQTT_TASK_STACK_SIZE=9216
CONFIG_ESP_MQTT_TASK_STACK_PRIORITY=5
CONFIG_ESP_MQTT_EVENT_QUEUE_SIZE=64
CONFIG_ESP_MQTT_TLS_ENABLE=y
# end of esp-mqtt

#
# ESP-TLS
#
Expand Down Expand Up @@ -338,33 +320,6 @@ CONFIG_ESP32_XTAL_FREQ=0
CONFIG_ESP32_DPORT_DIS_INTERRUPT_LVL=5
# end of ESP32-specific

CONFIG_ESP32C3_DEBUG_OCDAWARE=y
CONFIG_ESP32C3_BROWNOUT_DET=y
CONFIG_ESP32H2_DEBUG_OCDAWARE=y
CONFIG_ESP32H2_BROWNOUT_DET=y
CONFIG_ESP32H2_LIGHTSLEEP_GPIO_RESET_WORKAROUND=y

#
# Cache config
#
# end of Cache config

CONFIG_ESP32S2_TRACEMEM_RESERVE_DRAM=0x0
CONFIG_ESP32S2_ULP_COPROC_RESERVE_MEM=0
CONFIG_ESP32S2_DEBUG_OCDAWARE=y
CONFIG_ESP32S2_BROWNOUT_DET=y

#
# Cache config
#
# end of Cache config

CONFIG_ESP32S3_TRACEMEM_RESERVE_DRAM=0x0
CONFIG_ESP32S3_ULP_COPROC_RESERVE_MEM=0
CONFIG_ESP32S3_DEBUG_OCDAWARE=y
CONFIG_ESP32S3_BROWNOUT_DET=y
CONFIG_ESP32S3_DEEP_SLEEP_WAKEUP_DELAY=2000

#
# ADC-Calibration
#
Expand Down Expand Up @@ -1252,6 +1207,16 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# CONFIG_WPA_WPS_STRICT is not set
# CONFIG_WPA_11KV_SUPPORT is not set
# end of Supplicant

#
# esp-mqtt
#
CONFIG_ESP_MQTT_ENABLED=y
CONFIG_ESP_MQTT_TASK_STACK_SIZE=9216
CONFIG_ESP_MQTT_TASK_STACK_PRIORITY=5
CONFIG_ESP_MQTT_EVENT_QUEUE_SIZE=64
CONFIG_ESP_MQTT_TLS_ENABLE=y
# end of esp-mqtt
# end of Component config

#
Expand All @@ -1262,8 +1227,6 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y

# Deprecated options for backward compatibility
CONFIG_TOOLPREFIX="xtensa-esp32-elf-"
CONFIG_PYTHON="python"
CONFIG_MAKE_WARN_UNDEFINED_VARIABLES=y
# CONFIG_LOG_BOOTLOADER_LEVEL_NONE is not set
# CONFIG_LOG_BOOTLOADER_LEVEL_ERROR is not set
# CONFIG_LOG_BOOTLOADER_LEVEL_WARN is not set
Expand Down

0 comments on commit 2ebba6b

Please sign in to comment.