components: use new component registration api

This commit is contained in:
Renz Christian Bagaporo 2019-04-28 15:38:23 +08:00
parent e8582e9aa4
commit 9eccd7c082
99 changed files with 810 additions and 1008 deletions

View file

@ -1,16 +1,16 @@
set(COMPONENT_SRCS "app_trace.c" set(srcs "app_trace.c"
"app_trace_util.c" "app_trace_util.c"
"host_file_io.c" "host_file_io.c"
"gcov/gcov_rtio.c") "gcov/gcov_rtio.c")
set(COMPONENT_ADD_INCLUDEDIRS "include") set(include_dirs "include")
if(CONFIG_SYSVIEW_ENABLE) if(CONFIG_SYSVIEW_ENABLE)
list(APPEND COMPONENT_ADD_INCLUDEDIRS list(APPEND include_dirs
sys_view/Config sys_view/Config
sys_view/SEGGER sys_view/SEGGER
sys_view/Sample/OS) sys_view/Sample/OS)
list(APPEND COMPONENT_SRCS "sys_view/SEGGER/SEGGER_SYSVIEW.c" list(APPEND srcs "sys_view/SEGGER/SEGGER_SYSVIEW.c"
"sys_view/Sample/Config/SEGGER_SYSVIEW_Config_FreeRTOS.c" "sys_view/Sample/Config/SEGGER_SYSVIEW_Config_FreeRTOS.c"
"sys_view/Sample/OS/SEGGER_SYSVIEW_FreeRTOS.c" "sys_view/Sample/OS/SEGGER_SYSVIEW_FreeRTOS.c"
"sys_view/esp32/SEGGER_RTT_esp32.c" "sys_view/esp32/SEGGER_RTT_esp32.c"
@ -19,14 +19,13 @@ if(CONFIG_SYSVIEW_ENABLE)
endif() endif()
if(CONFIG_HEAP_TRACING_TOHOST) if(CONFIG_HEAP_TRACING_TOHOST)
list(APPEND COMPONENT_SRCS "heap_trace_tohost.c") list(APPEND srcs "heap_trace_tohost.c")
endif() endif()
set(COMPONENT_REQUIRES) idf_component_register(SRCS "${srcs}"
set(COMPONENT_PRIV_REQUIRES heap soc) INCLUDE_DIRS "${include_dirs}"
set(COMPONENT_ADD_LDFRAGMENTS linker.lf) PRIV_REQUIRES soc
LDFRAGMENTS linker.lf)
register_component()
# disable --coverage for this component, as it is used as transport # disable --coverage for this component, as it is used as transport
# for gcov # for gcov

View file

@ -1,6 +1,3 @@
set(COMPONENT_SRCDIRS ".") idf_component_register(SRC_DIRS "."
set(COMPONENT_ADD_INCLUDEDIRS ".") INCLUDE_DIRS "."
REQUIRES unity)
set(COMPONENT_REQUIRES unity)
register_component()

View file

@ -1,10 +1,6 @@
set(COMPONENT_SRCS "esp_ota_ops.c" idf_component_register(SRCS "esp_ota_ops.c" "esp_app_desc.c"
"esp_app_desc.c") INCLUDE_DIRS "include"
set(COMPONENT_ADD_INCLUDEDIRS "include") REQUIRES spi_flash partition_table bootloader_support)
set(COMPONENT_REQUIRES spi_flash partition_table bootloader_support)
register_component()
# esp_app_desc structure is added as an undefined symbol because otherwise the # esp_app_desc structure is added as an undefined symbol because otherwise the
# linker will ignore this structure as it has no other files depending on it. # linker will ignore this structure as it has no other files depending on it.

View file

@ -1,6 +1,3 @@
set(COMPONENT_SRCDIRS ".") idf_component_register(SRC_DIRS "."
set(COMPONENT_ADD_INCLUDEDIRS ".") INCLUDE_DIRS "."
REQUIRES unity test_utils app_update bootloader_support nvs_flash)
set(COMPONENT_REQUIRES unity test_utils app_update bootloader_support nvs_flash)
register_component()

View file

@ -1,6 +1,3 @@
set(COMPONENT_ADD_INCLUDEDIRS asio/asio/include port/include) idf_component_register(SRCS "asio/asio/src/asio.cpp"
set(COMPONENT_SRCS "asio/asio/src/asio.cpp") INCLUDE_DIRS "asio/asio/include" "port/include"
REQUIRES lwip)
set(COMPONENT_REQUIRES lwip)
register_component()

View file

@ -1,4 +1,4 @@
register_component() idf_component_register()
# Do not generate flash file when building bootloader or is in early expansion of the build # Do not generate flash file when building bootloader or is in early expansion of the build
if(BOOTLOADER_BUILD) if(BOOTLOADER_BUILD)

View file

@ -1,4 +1,3 @@
# only compile the "micro-ecc/uECC.c" source file # only compile the "micro-ecc/uECC.c" source file
set(COMPONENT_SRCS "micro-ecc/uECC.c") idf_component_register(SRCS "micro-ecc/uECC.c"
set(COMPONENT_ADD_INCLUDEDIRS micro-ecc) INCLUDE_DIRS micro-ecc)
register_component()

View file

@ -1,7 +1,5 @@
set(COMPONENT_SRCS "bootloader_start.c") idf_component_register(SRCS "bootloader_start.c"
set(COMPONENT_ADD_INCLUDEDIRS "") REQUIRES bootloader bootloader_support)
set(COMPONENT_REQUIRES bootloader bootloader_support)
register_component()
idf_build_get_property(target IDF_TARGET) idf_build_get_property(target IDF_TARGET)
set(scripts "${target}.bootloader.ld" set(scripts "${target}.bootloader.ld"

View file

@ -1,4 +1,4 @@
set(COMPONENT_SRCS "src/bootloader_clock.c" set(srcs "src/bootloader_clock.c"
"src/bootloader_common.c" "src/bootloader_common.c"
"src/bootloader_flash.c" "src/bootloader_flash.c"
"src/bootloader_random.c" "src/bootloader_random.c"
@ -8,14 +8,14 @@ set(COMPONENT_SRCS "src/bootloader_clock.c"
"src/flash_qio_mode.c") "src/flash_qio_mode.c")
if(BOOTLOADER_BUILD) if(BOOTLOADER_BUILD)
set(COMPONENT_ADD_INCLUDEDIRS "include include_bootloader") set(include_dirs "include" "include_bootloader")
set(COMPONENT_REQUIRES soc) #unfortunately the header directly uses SOC registers set(requires soc) #unfortunately the header directly uses SOC registers
set(COMPONENT_PRIV_REQUIRES micro-ecc spi_flash efuse) set(priv_requires micro-ecc spi_flash efuse)
list(APPEND COMPONENT_SRCS "src/bootloader_init.c" list(APPEND srcs "src/bootloader_init.c"
"src/${IDF_TARGET}/bootloader_sha.c" "src/${IDF_TARGET}/bootloader_sha.c"
"src/${IDF_TARGET}/flash_encrypt.c" "src/${IDF_TARGET}/flash_encrypt.c"
"src/${IDF_TARGET}/secure_boot_signatures.c" "src/${IDF_TARGET}/secure_boot_signatures.c"
"src/${IDF_TARGET}/secure_boot.c") "src/${IDF_TARGET}/secure_boot.c")
if(CONFIG_SECURE_SIGNED_APPS) if(CONFIG_SECURE_SIGNED_APPS)
get_filename_component(secure_boot_verification_key get_filename_component(secure_boot_verification_key
@ -45,18 +45,23 @@ if(BOOTLOADER_BUILD)
DEPENDS "${orig_secure_boot_verification_key}" DEPENDS "${orig_secure_boot_verification_key}"
VERBATIM) VERBATIM)
endif() endif()
set(COMPONENT_EMBED_FILES "${secure_boot_verification_key}") set(embed_files "${secure_boot_verification_key}")
set_property(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" set_property(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES
"${secure_boot_verification_key}") "${secure_boot_verification_key}")
endif() endif()
else() else()
list(APPEND COMPONENT_SRCS "src/idf/bootloader_sha.c" list(APPEND srcs "src/idf/bootloader_sha.c"
"src/idf/secure_boot_signatures.c") "src/idf/secure_boot_signatures.c")
set(COMPONENT_ADD_INCLUDEDIRS "include") set(include_dirs "include")
set(COMPONENT_PRIV_INCLUDEDIRS "include_bootloader") set(priv_include_dirs "include_bootloader")
set(COMPONENT_REQUIRES soc) #unfortunately the header directly uses SOC registers set(requires soc) #unfortunately the header directly uses SOC registers
set(COMPONENT_PRIV_REQUIRES spi_flash mbedtls efuse) set(priv_requires spi_flash mbedtls efuse)
endif() endif()
register_component() idf_component_register(SRCS "${srcs}"
INCLUDE_DIRS "${include_dirs}"
PRIV_INCLUDE_DIRS "${priv_include_dirs}"
REQUIRES "${requires}"
PRIV_REQUIRES "${priv_requires}"
EMBED_FILES "${embed_files}")

View file

@ -1,6 +1,3 @@
set(COMPONENT_SRCDIRS ".") idf_component_register(SRC_DIRS "."
set(COMPONENT_ADD_INCLUDEDIRS ".") INCLUDE_DIRS "."
REQUIRES unity bootloader_support app_update)
set(COMPONENT_REQUIRES unity bootloader_support app_update)
register_component()

View file

@ -1,11 +1,11 @@
if(CONFIG_BT_ENABLED) if(CONFIG_BT_ENABLED)
set(COMPONENT_SRCS "bt.c") set(srcs "bt.c")
set(COMPONENT_ADD_INCLUDEDIRS include) set(include_dirs include)
if(CONFIG_BT_BLUEDROID_ENABLED) if(CONFIG_BT_BLUEDROID_ENABLED)
list(APPEND COMPONENT_PRIV_INCLUDEDIRS list(APPEND priv_include_dirs
bluedroid/bta/include bluedroid/bta/include
bluedroid/bta/ar/include bluedroid/bta/ar/include
bluedroid/bta/av/include bluedroid/bta/av/include
@ -41,9 +41,9 @@ if(CONFIG_BT_ENABLED)
bluedroid/stack/include bluedroid/stack/include
bluedroid/common/include) bluedroid/common/include)
list(APPEND COMPONENT_ADD_INCLUDEDIRS bluedroid/api/include/api) list(APPEND include_dirs bluedroid/api/include/api)
list(APPEND COMPONENT_SRCS "bluedroid/api/esp_a2dp_api.c" list(APPEND srcs "bluedroid/api/esp_a2dp_api.c"
"bluedroid/api/esp_avrc_api.c" "bluedroid/api/esp_avrc_api.c"
"bluedroid/api/esp_blufi_api.c" "bluedroid/api/esp_blufi_api.c"
"bluedroid/api/esp_bt_device.c" "bluedroid/api/esp_bt_device.c"
@ -287,9 +287,10 @@ if(CONFIG_BT_ENABLED)
endif() endif()
# requirements can't depend on config # requirements can't depend on config
set(COMPONENT_PRIV_REQUIRES nvs_flash soc) idf_component_register(SRCS "${srcs}"
INCLUDE_DIRS "${include_dirs}"
register_component() PRIV_INCLUDE_DIRS "${priv_include_dirs}"
REQUIRES nvs_flash soc)
if(CONFIG_BT_ENABLED) if(CONFIG_BT_ENABLED)
if(GCC_NOT_5_2_0) if(GCC_NOT_5_2_0)

View file

@ -1,7 +1,5 @@
if(CONFIG_BT_ENABLED OR CMAKE_BUILD_EARLY_EXPANSION) if(CONFIG_BT_ENABLED OR CMAKE_BUILD_EARLY_EXPANSION)
set(COMPONENT_SRCDIRS ".") idf_component_register(SRC_DIRS "."
set(COMPONENT_ADD_INCLUDEDIRS ".") INCLUDE_DIRS "."
set(COMPONENT_REQUIRES unity nvs_flash bt) REQUIRES unity nvs_flash bt)
endif()
register_component()
endif()

View file

@ -1,6 +1,6 @@
set(COMPONENT_ADD_INCLUDEDIRS port/include port/include/coap libcoap/include libcoap/include/coap2) set(include_dirs port/include port/include/coap libcoap/include libcoap/include/coap2)
set(COMPONENT_SRCS "libcoap/src/address.c" set(srcs "libcoap/src/address.c"
"libcoap/src/async.c" "libcoap/src/async.c"
"libcoap/src/block.c" "libcoap/src/block.c"
"libcoap/src/coap_event.c" "libcoap/src/coap_event.c"
@ -22,7 +22,9 @@ set(COMPONENT_SRCS "libcoap/src/address.c"
set(COMPONENT_REQUIRES lwip) set(COMPONENT_REQUIRES lwip)
register_component() idf_component_register(SRCS "${srcs}"
INCLUDE_DIRS "${include_dirs}"
REQUIRES lwip)
# Silence format truncation warning, until it is fixed upstream # Silence format truncation warning, until it is fixed upstream
set_source_files_properties(libcoap/src/coap_debug.c PROPERTIES COMPILE_FLAGS -Wno-format-truncation) set_source_files_properties(libcoap/src/coap_debug.c PROPERTIES COMPILE_FLAGS -Wno-format-truncation)

View file

@ -1,7 +1,6 @@
set(COMPONENT_ADD_INCLUDEDIRS .) idf_component_register(SRCS "commands.c"
set(COMPONENT_SRCS "commands.c" "split_argv.c"
"split_argv.c" "argtable3/argtable3.c"
"argtable3/argtable3.c" "linenoise/linenoise.c"
"linenoise/linenoise.c") INCLUDE_DIRS "."
register_component() REQUIRES vfs)

View file

@ -1,6 +1,5 @@
set(COMPONENT_SRCS "cxx_exception_stubs.cpp" idf_component_register(SRCS "cxx_exception_stubs.cpp"
"cxx_guards.cpp") "cxx_guards.cpp")
register_component()
target_link_libraries(${COMPONENT_LIB} PUBLIC stdc++ gcc) target_link_libraries(${COMPONENT_LIB} PUBLIC stdc++ gcc)
target_link_libraries(${COMPONENT_LIB} INTERFACE "-u __cxa_guard_dummy") target_link_libraries(${COMPONENT_LIB} INTERFACE "-u __cxa_guard_dummy")

View file

@ -1,6 +1,3 @@
set(COMPONENT_SRCDIRS ".") idf_component_register(SRC_DIRS "."
set(COMPONENT_ADD_INCLUDEDIRS ".") INCLUDE_DIRS "."
REQUIRES unity)
set(COMPONENT_REQUIRES unity)
register_component()

View file

@ -1,33 +1,32 @@
set(COMPONENT_SRCS "can.c" set(srcs "can.c"
"gpio.c" "gpio.c"
"i2c.c" "i2c.c"
"i2s.c" "i2s.c"
"ledc.c" "ledc.c"
"mcpwm.c" "mcpwm.c"
"pcnt.c" "pcnt.c"
"periph_ctrl.c" "periph_ctrl.c"
"rmt.c" "rmt.c"
"rtc_module.c" "rtc_module.c"
"sdio_slave.c" "sdio_slave.c"
"sdmmc_host.c" "sdmmc_host.c"
"sdmmc_transaction.c" "sdmmc_transaction.c"
"sdspi_crc.c" "sdspi_crc.c"
"sdspi_host.c" "sdspi_host.c"
"sdspi_transaction.c" "sdspi_transaction.c"
"sigmadelta.c" "sigmadelta.c"
"spi_common.c" "spi_common.c"
"spi_master.c" "spi_master.c"
"spi_slave.c" "spi_slave.c"
"timer.c" "timer.c"
"uart.c") "uart.c")
set(COMPONENT_ADD_INCLUDEDIRS "include")
set(COMPONENT_PRIV_INCLUDEDIRS "include/driver")
set(COMPONENT_REQUIRES esp_ringbuf soc) #cannot totally hide soc headers, since there are a lot arguments in the driver are chip-dependent
register_component()
idf_component_register(SRCS "${srcs}"
INCLUDE_DIRS "include"
PRIV_INCLUDE_DIRS "include/driver"
REQUIRES esp_ringbuf soc) #cannot totally hide soc headers, since there are a lot arguments in the driver are chip-dependent
if(GCC_NOT_5_2_0) if(GCC_NOT_5_2_0)
# uses C11 atomic feature # uses C11 atomic feature
set_source_files_properties(spi_master.c PROPERTIES COMPILE_FLAGS -std=gnu11) set_source_files_properties(spi_master.c PROPERTIES COMPILE_FLAGS -std=gnu11)
endif() endif()

View file

@ -1,6 +1,3 @@
set(COMPONENT_SRCDIRS ". param_test") idf_component_register(SRC_DIRS "." "param_test"
set(COMPONENT_ADD_INCLUDEDIRS "include param_test/include") INCLUDE_DIRS "include" "param_test/include"
REQUIRES unity test_utils driver nvs_flash)
set(COMPONENT_REQUIRES unity test_utils driver nvs_flash)
register_component()

View file

@ -3,16 +3,17 @@ idf_build_get_property(soc_name IDF_TARGET)
if(EXISTS "${COMPONENT_DIR}/${soc_name}") if(EXISTS "${COMPONENT_DIR}/${soc_name}")
include(${COMPONENT_DIR}/${soc_name}/sources.cmake) include(${COMPONENT_DIR}/${soc_name}/sources.cmake)
spaces2list(EFUSE_SOC_SRCS) spaces2list(EFUSE_SOC_SRCS)
add_prefix(COMPONENT_SRCS "${soc_name}/" ${EFUSE_SOC_SRCS}) add_prefix(srcs "${soc_name}/" ${EFUSE_SOC_SRCS})
set(COMPONENT_ADD_INCLUDEDIRS include ${soc_name}/include) set(include_dirs include ${soc_name}/include)
endif() endif()
list(APPEND COMPONENT_SRCS "src/esp_efuse_api.c" list(APPEND srcs "src/esp_efuse_api.c"
"src/esp_efuse_fields.c" "src/esp_efuse_fields.c"
"src/esp_efuse_utility.c") "src/esp_efuse_utility.c")
set(COMPONENT_PRIV_REQUIRES bootloader_support soc) idf_component_register(SRCS "${srcs}"
register_component() PRIV_REQUIRES bootloader_support soc
INCLUDE_DIRS "${include_dirs}")
set(GEN_EFUSE_TABLE_ARG --max_blk_len ${CONFIG_EFUSE_MAX_BLK_LEN}) set(GEN_EFUSE_TABLE_ARG --max_blk_len ${CONFIG_EFUSE_MAX_BLK_LEN})

View file

@ -1,6 +1,3 @@
set(COMPONENT_SRCDIRS ".") idf_component_register(SRC_DIRS "."
set(COMPONENT_ADD_INCLUDEDIRS "." "include") INCLUDE_DIRS "." "include"
REQUIRES unity test_utils efuse bootloader_support)
set(COMPONENT_REQUIRES unity test_utils efuse bootloader_support)
register_component()

View file

@ -1,7 +1,4 @@
set(COMPONENT_SRCS "esp_tls.c") idf_component_register(SRCS "esp_tls.c"
set(COMPONENT_ADD_INCLUDEDIRS ".") INCLUDE_DIRS "."
REQUIRES mbedtls
set(COMPONENT_REQUIRES mbedtls) PRIV_REQUIRES lwip nghttp)
set(COMPONENT_PRIV_REQUIRES lwip nghttp)
register_component()

View file

@ -1,50 +1,49 @@
require_idf_targets(esp32)
if(BOOTLOADER_BUILD) if(BOOTLOADER_BUILD)
# For bootloader, all we need from esp32 is headers # For bootloader, all we need from esp32 is headers
set(COMPONENT_ADD_INCLUDEDIRS include) idf_component_register(INCLUDE_DIRS include)
register_component()
target_linker_script(${COMPONENT_LIB} INTERFACE "ld/esp32.peripherals.ld") target_linker_script(${COMPONENT_LIB} INTERFACE "ld/esp32.peripherals.ld")
else() else()
# Regular app build # Regular app build
set(srcs "brownout.c"
"cache_err_int.c"
"cache_sram_mmu.c"
"clk.c"
"cpu_start.c"
"crosscore_int.c"
"dport_access.c"
"dport_panic_highint_hdl.S"
"esp_adapter.c"
"esp_timer_esp32.c"
"esp_himem.c"
"gdbstub.c"
"hw_random.c"
"int_wdt.c"
"intr_alloc.c"
"panic.c"
"pm_esp32.c"
"pm_trace.c"
"reset_reason.c"
"sleep_modes.c"
"spiram.c"
"spiram_psram.c"
"system_api.c"
"task_wdt.c")
set(include_dirs "include")
set(COMPONENT_SRCS "brownout.c" set(requires driver esp_event efuse soc) #unfortunately rom/uart uses SOC registers directly
"cache_err_int.c"
"cache_sram_mmu.c"
"clk.c"
"cpu_start.c"
"crosscore_int.c"
"dport_access.c"
"dport_panic_highint_hdl.S"
"esp_adapter.c"
"esp_timer_esp32.c"
"esp_himem.c"
"gdbstub.c"
"hw_random.c"
"int_wdt.c"
"intr_alloc.c"
"panic.c"
"pm_esp32.c"
"pm_trace.c"
"reset_reason.c"
"sleep_modes.c"
"spiram.c"
"spiram_psram.c"
"system_api.c"
"task_wdt.c")
set(COMPONENT_ADD_INCLUDEDIRS "include")
set(COMPONENT_REQUIRES driver esp_event efuse soc) #unfortunately rom/uart uses SOC registers directly
# driver is a public requirement because esp_sleep.h uses gpio_num_t & touch_pad_t # driver is a public requirement because esp_sleep.h uses gpio_num_t & touch_pad_t
# app_update is added here because cpu_start.c uses esp_ota_get_app_description() function. # app_update is added here because cpu_start.c uses esp_ota_get_app_description() function.
set(COMPONENT_PRIV_REQUIRES set(priv_requires app_trace app_update bootloader_support log mbedtls nvs_flash pthread
app_trace app_update bootloader_support log mbedtls nvs_flash pthread
smartconfig_ack spi_flash vfs wpa_supplicant espcoredump esp_common esp_wifi) smartconfig_ack spi_flash vfs wpa_supplicant espcoredump esp_common esp_wifi)
set(fragments linker.lf ld/esp32_fragments.lf)
set(COMPONENT_ADD_LDFRAGMENTS linker.lf ld/esp32_fragments.lf) idf_component_register(SRCS "${srcs}"
INCLUDE_DIRS "${include_dirs}"
register_component() LDFRAGMENTS "${fragments}"
REQUIRES "${requires}"
PRIV_REQUIRES "${priv_requires}"
REQUIRED_IDF_TARGETS esp32)
target_linker_script(${COMPONENT_LIB} INTERFACE "${CMAKE_CURRENT_BINARY_DIR}/esp32_out.ld") target_linker_script(${COMPONENT_LIB} INTERFACE "${CMAKE_CURRENT_BINARY_DIR}/esp32_out.ld")

View file

@ -1,9 +1,6 @@
set(COMPONENT_SRCDIRS ".") idf_component_register(SRC_DIRS "."
set(COMPONENT_ADD_INCLUDEDIRS ". ${CMAKE_CURRENT_BINARY_DIR}") INCLUDE_DIRS "." "${CMAKE_CURRENT_BINARY_DIR}"
REQUIRES unity test_utils nvs_flash ulp esp_common)
set(COMPONENT_REQUIRES unity test_utils nvs_flash ulp esp_common)
register_component()
add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/test_tjpgd_logo.h" add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/test_tjpgd_logo.h"
COMMAND xxd -i "logo.jpg" "${CMAKE_CURRENT_BINARY_DIR}/test_tjpgd_logo.h" COMMAND xxd -i "logo.jpg" "${CMAKE_CURRENT_BINARY_DIR}/test_tjpgd_logo.h"

View file

@ -1,6 +1,3 @@
set(COMPONENT_SRCS "esp_adc_cal.c") idf_component_register(SRCS "esp_adc_cal.c"
set(COMPONENT_ADD_INCLUDEDIRS "include") INCLUDE_DIRS "include"
REQUIRES driver)
set(COMPONENT_REQUIRES)
register_component()

View file

@ -1,27 +1,19 @@
if(BOOTLOADER_BUILD) if(BOOTLOADER_BUILD)
# For bootloader, all we need from esp_common is headers # For bootloader, all we need from esp_common is headers
set(COMPONENT_ADD_INCLUDEDIRS include) idf_component_register(INCLUDE_DIRS include)
set(COMPONENT_REQUIRES ${IDF_COMPONENTS})
set(COMPONENT_SRCS )
register_component()
set_property(TARGET ${COMPONENT_LIB} APPEND PROPERTY INTERFACE_LINK_LIBRARIES "-Wl,--gc-sections") set_property(TARGET ${COMPONENT_LIB} APPEND PROPERTY INTERFACE_LINK_LIBRARIES "-Wl,--gc-sections")
else() else()
# Regular app build # Regular app build
set(COMPONENT_SRCS idf_component_register(SRCS "src/dbg_stubs.c"
"src/dbg_stubs.c" "src/esp_err_to_name.c"
"src/esp_err_to_name.c" "src/esp_timer.c"
"src/esp_timer.c" "src/ets_timer_legacy.c"
"src/ets_timer_legacy.c" "src/freertos_hooks.c"
"src/freertos_hooks.c" "src/ipc.c"
"src/ipc.c" "src/pm_locks.c"
"src/pm_locks.c" "src/stack_check.c"
"src/stack_check.c") INCLUDE_DIRS include
set(COMPONENT_ADD_INCLUDEDIRS "include") PRIV_REQUIRES soc)
set(COMPONENT_PRIV_INCLUDEDIRS)
set(COMPONENT_REQUIRES)
set(COMPONENT_PRIV_REQUIRES soc)
register_component()
set_source_files_properties( set_source_files_properties(
"src/stack_check.c" "src/stack_check.c"

View file

@ -1,19 +1,13 @@
set(COMPONENT_SRCS "default_event_loop.c" idf_component_register(SRCS "default_event_loop.c"
"esp_event.c" "esp_event.c"
"esp_event_private.c" "esp_event_private.c"
"event_loop_legacy.c" "event_loop_legacy.c"
"event_send.c") "event_send.c"
INCLUDE_DIRS "include"
set(COMPONENT_ADD_INCLUDEDIRS "include") PRIV_INCLUDE_DIRS "private_include"
set(COMPONENT_PRIV_INCLUDEDIRS "private_include") REQUIRES log tcpip_adapter
PRIV_REQUIRES ethernet
set(COMPONENT_REQUIRES log tcpip_adapter) LDFRAGMENTS linker.lf)
set(COMPONENT_PRIV_REQUIRES ethernet)
set(COMPONENT_REQUIRES log tcpip_adapter ethernet)
set(COMPONENT_ADD_LDFRAGMENTS linker.lf)
register_component()
if(GCC_NOT_5_2_0 AND CONFIG_ESP_EVENT_LOOP_PROFILING) if(GCC_NOT_5_2_0 AND CONFIG_ESP_EVENT_LOOP_PROFILING)
# uses C11 atomic feature # uses C11 atomic feature

View file

@ -1,5 +1,3 @@
set(COMPONENT_SRCDIRS ".") idf_component_register(SRC_DIRS "."
set(COMPONENT_PRIV_INCLUDEDIRS "../private_include" ".") PRIV_INCLUDE_DIRS "../private_include" "."
set(COMPONENT_PRIV_REQUIRES unity test_utils esp_event driver) REQUIRES unity test_utils esp_event driver)
register_component()

View file

@ -1,11 +1,8 @@
set(COMPONENT_SRCS "esp_http_client.c" idf_component_register(SRCS "esp_http_client.c"
"lib/http_auth.c" "lib/http_auth.c"
"lib/http_header.c" "lib/http_header.c"
"lib/http_utils.c") "lib/http_utils.c"
set(COMPONENT_ADD_INCLUDEDIRS "include") INCLUDE_DIRS "include"
set(COMPONENT_PRIV_INCLUDEDIRS "lib/include") PRIV_INCLUDE_DIRS "lib/include"
REQUIRES nghttp
set(COMPONENT_REQUIRES "nghttp") PRIV_REQUIRES mbedtls lwip esp-tls tcp_transport)
set(COMPONENT_PRIV_REQUIRES "mbedtls" "lwip" "esp-tls" "tcp_transport")
register_component()

View file

@ -1,6 +1,3 @@
set(COMPONENT_SRCDIRS ".") idf_component_register(SRC_DIRS "."
set(COMPONENT_ADD_INCLUDEDIRS ".") INCLUDE_DIRS "."
REQUIRES unity test_utils esp_http_client)
set(COMPONENT_REQUIRES unity test_utils esp_http_client)
register_component()

View file

@ -1,13 +1,10 @@
set(COMPONENT_ADD_INCLUDEDIRS include) idf_component_register(SRCS "src/httpd_main.c"
set(COMPONENT_PRIV_INCLUDEDIRS src/port/esp32 src/util) "src/httpd_parse.c"
set(COMPONENT_SRCS "src/httpd_main.c" "src/httpd_sess.c"
"src/httpd_parse.c" "src/httpd_txrx.c"
"src/httpd_sess.c" "src/httpd_uri.c"
"src/httpd_txrx.c" "src/util/ctrl_sock.c"
"src/httpd_uri.c" INCLUDE_DIRS "include"
"src/util/ctrl_sock.c") PRIV_INCLUDE_DIRS "src/port/esp32" "src/util"
REQUIRES nghttp
set(COMPONENT_REQUIRES nghttp) # for http_parser.h PRIV_REQUIRES lwip) # for http_parser.h
set(COMPONENT_PRIV_REQUIRES lwip)
register_component()

View file

@ -1,6 +1,3 @@
set(COMPONENT_SRCDIRS ".") idf_component_register(SRC_DIRS "."
set(COMPONENT_ADD_INCLUDEDIRS ".") INCLUDE_DIRS "."
REQUIRES unity test_utils esp_http_server)
set(COMPONENT_REQUIRES unity test_utils esp_http_server)
register_component()

View file

@ -1,7 +1,4 @@
set(COMPONENT_ADD_INCLUDEDIRS include) idf_component_register(SRCS "src/esp_https_ota.c"
set(COMPONENT_SRCS "src/esp_https_ota.c") INCLUDE_DIRS "include"
REQUIRES esp_http_client
set(COMPONENT_REQUIRES esp_http_client) PRIV_REQUIRES log app_update)
set(COMPONENT_PRIV_REQUIRES log app_update)
register_component()

View file

@ -1,7 +1,4 @@
set(COMPONENT_ADD_INCLUDEDIRS include) idf_component_register(SRCS "src/https_server.c"
set(COMPONENT_SRCS "src/https_server.c") INCLUDE_DIRS "include"
REQUIRES esp_http_server openssl
set(COMPONENT_REQUIRES esp_http_server openssl) PRIV_REQUIRES lwip)
set(COMPONENT_PRIV_REQUIRES lwip)
register_component()

View file

@ -1,7 +1,3 @@
set(COMPONENT_ADD_INCLUDEDIRS "include") idf_component_register(SRCS "ringbuf.c"
set(COMPONENT_SRCS "ringbuf.c") INCLUDE_DIRS "include"
set(COMPONENT_ADD_LDFRAGMENTS linker.lf) LDFRAGMENTS linker.lf)
set(COMPONENT_REQUIRES)
register_component()

View file

@ -1,6 +1,3 @@
set(COMPONENT_SRCDIRS ".") idf_component_register(SRC_DIRS "."
set(COMPONENT_ADD_INCLUDEDIRS ".") INCLUDE_DIRS "."
REQUIRES unity test_utils)
set(COMPONENT_REQUIRES unity test_utils)
register_component()

View file

@ -1,9 +1,6 @@
if(BOOTLOADER_BUILD) if(BOOTLOADER_BUILD)
# For bootloader, all we need is headers # For bootloader, all we need is headers
set(COMPONENT_ADD_INCLUDEDIRS "include") idf_component_register(INCLUDE_DIRS include)
set(COMPONENT_REQUIRES ${IDF_COMPONENTS})
set(COMPONENT_SRCS)
register_component()
set(scripts set(scripts
"esp32/ld/esp32.rom.ld" "esp32/ld/esp32.rom.ld"
"esp32/ld/esp32.rom.newlib-funcs.ld" "esp32/ld/esp32.rom.newlib-funcs.ld"
@ -12,10 +9,8 @@ if(BOOTLOADER_BUILD)
target_linker_script(${COMPONENT_LIB} INTERFACE "${scripts}") target_linker_script(${COMPONENT_LIB} INTERFACE "${scripts}")
else() else()
# Regular app build # Regular app build
set(COMPONENT_SRCS "esp_rom.c") idf_component_register(SRCS "esp_rom.c"
set(COMPONENT_ADD_INCLUDEDIRS "include") INCLUDE_DIRS include)
register_component()
set(scripts set(scripts
"esp32/ld/esp32.rom.ld" "esp32/ld/esp32.rom.ld"

View file

@ -1,7 +1,7 @@
idf_build_get_property(idf_target IDF_TARGET) idf_build_get_property(idf_target IDF_TARGET)
idf_build_get_property(build_dir BUILD_DIR) idf_build_get_property(build_dir BUILD_DIR)
set(COMPONENT_SRCS set(srcs
"src/coexist.c" "src/coexist.c"
"src/fast_crypto_ops.c" "src/fast_crypto_ops.c"
"src/lib_printf.c" "src/lib_printf.c"
@ -9,15 +9,16 @@ set(COMPONENT_SRCS
"src/phy_init.c" "src/phy_init.c"
"src/restore.c" "src/restore.c"
"src/wifi_init.c") "src/wifi_init.c")
set(COMPONENT_ADD_INCLUDEDIRS "include" "${idf_target}/include")
set(COMPONENT_PRIV_INCLUDEDIRS)
set(COMPONENT_PRIV_REQUIRES wpa_supplicant nvs_flash)
if(NOT CONFIG_ESP32_NO_BLOBS) if(NOT CONFIG_ESP32_NO_BLOBS)
set(COMPONENT_ADD_LDFRAGMENTS "linker.lf") set(ldfragments "linker.lf")
endif() endif()
register_component() idf_component_register(SRCS "${srcs}"
INCLUDE_DIRS "include" "${idf_target}/include"
PRIV_REQUIRES wpa_supplicant nvs_flash
LDFRAGMENTS "${ldfragments}")
target_link_libraries(${COMPONENT_LIB} PUBLIC "-L ${CMAKE_CURRENT_SOURCE_DIR}/lib_${idf_target}") target_link_libraries(${COMPONENT_LIB} PUBLIC "-L ${CMAKE_CURRENT_SOURCE_DIR}/lib_${idf_target}")
if(NOT CONFIG_ESP32_NO_BLOBS) if(NOT CONFIG_ESP32_NO_BLOBS)

View file

@ -1,9 +1,6 @@
set(COMPONENT_SRCDIRS ".") idf_component_register(SRCDIRS "."
set(COMPONENT_ADD_INCLUDEDIRS ". ${CMAKE_CURRENT_BINARY_DIR}") INCLUDE_DIRS "." "${CMAKE_CURRENT_BINARY_DIR}"
REQUIRES unity test_utils nvs_flash ulp esp_common)
set(COMPONENT_REQUIRES unity test_utils nvs_flash ulp esp_common)
register_component()
idf_component_get_property(esp_wifi_dir esp_wifi COMPONENT_DIR) idf_component_get_property(esp_wifi_dir esp_wifi COMPONENT_DIR)

View file

@ -1,10 +1,8 @@
set(COMPONENT_PRIV_INCLUDEDIRS "include_core_dump") idf_component_register(SRCS "src/core_dump_common.c"
set(COMPONENT_ADD_INCLUDEDIRS "include") "src/core_dump_flash.c"
set(COMPONENT_PRIV_REQUIRES spi_flash soc) "src/core_dump_port.c"
set(COMPONENT_ADD_LDFRAGMENTS linker.lf) "src/core_dump_uart.c"
set(COMPONENT_SRCS "src/core_dump_common.c" INCLUDE_DIRS "include"
"src/core_dump_flash.c" PRIV_INCLUDE_DIRS "include_core_dump"
"src/core_dump_port.c" LDFRAGMENTS linker.lf
"src/core_dump_uart.c") PRIV_REQUIRES spi_flash soc)
register_component()

View file

@ -1,8 +1,7 @@
if(TESTS_ALL EQUAL 1) if(TESTS_ALL EQUAL 1)
message("not linking coredump test from CI.") message("not linking coredump test from CI.")
else() else()
set(COMPONENT_SRCDIRS ".") idf_component_register(SRC_DIRS "."
set(COMPONENT_ADD_INCLUDEDIRS ".") INCLUDE_DIRS "."
set(COMPONENT_REQUIRES unity nvs_flash) REQUIRES unity nvs_flash)
register_component()
endif() endif()

View file

@ -1,5 +1,4 @@
set(COMPONENT_PRIV_REQUIRES bootloader) idf_component_register(REQUIRES bootloader)
register_component()
string(REPLACE ";" " " ESPTOOLPY_FLASH_PROJECT_OPTIONS "${ESPTOOLPY_ELF2IMAGE_FLASH_OPTIONS}") string(REPLACE ";" " " ESPTOOLPY_FLASH_PROJECT_OPTIONS "${ESPTOOLPY_ELF2IMAGE_FLASH_OPTIONS}")
set(ESPTOOLPY_FLASH_PROJECT_OPTIONS set(ESPTOOLPY_FLASH_PROJECT_OPTIONS

View file

@ -1,12 +1,8 @@
set(COMPONENT_SRCS "emac_dev.c" idf_component_register(SRCS "emac_dev.c"
"emac_main.c" "emac_main.c"
"eth_phy/phy_common.c" "eth_phy/phy_common.c"
"eth_phy/phy_lan8720.c" "eth_phy/phy_lan8720.c"
"eth_phy/phy_tlk110.c" "eth_phy/phy_tlk110.c"
"eth_phy/phy_ip101.c") "eth_phy/phy_ip101.c"
set(COMPONENT_ADD_INCLUDEDIRS "include") INCLUDE_DIRS "include"
PRIV_REQUIRES tcpip_adapter esp_event soc)
set(COMPONENT_REQUIRES)
set(COMPONENT_PRIV_REQUIRES tcpip_adapter esp_event soc)
register_component()

View file

@ -1,5 +1,3 @@
set(COMPONENT_SRCDIRS ".") idf_component_register(SRC_DIRS "."
set(COMPONENT_ADD_INCLUDEDIRS ".") INCLUDE_DIRS "."
set(COMPONENT_REQUIRES unity ethernet) REQUIRES unity ethernet)
register_component()

View file

@ -1,11 +1,10 @@
set(COMPONENT_ADD_INCLUDEDIRS expat/expat/lib port/include) idf_component_register(SRCS "expat/expat/lib/loadlibrary.c"
set(COMPONENT_SRCS "expat/expat/lib/loadlibrary.c" "expat/expat/lib/xmlparse.c"
"expat/expat/lib/xmlparse.c" "expat/expat/lib/xmlrole.c"
"expat/expat/lib/xmlrole.c" "expat/expat/lib/xmltok.c"
"expat/expat/lib/xmltok.c" "expat/expat/lib/xmltok_impl.c"
"expat/expat/lib/xmltok_impl.c" "expat/expat/lib/xmltok_ns.c"
"expat/expat/lib/xmltok_ns.c") INCLUDE_DIRS expat/expat/lib port/include)
register_component()
target_compile_definitions(${COMPONENT_LIB} PRIVATE HAVE_EXPAT_CONFIG_H) target_compile_definitions(${COMPONENT_LIB} PRIVATE HAVE_EXPAT_CONFIG_H)
target_compile_definitions(${COMPONENT_LIB} PRIVATE HAVE_GETRANDOM) target_compile_definitions(${COMPONENT_LIB} PRIVATE HAVE_GETRANDOM)

View file

@ -1,5 +1,3 @@
set(COMPONENT_SRCDIRS ".") idf_component_register(SRC_DIRS "."
set(COMPONENT_ADD_INCLUDEDIRS ".") INCLUDE_DIRS "."
set(COMPONENT_REQUIRES unity expat) REQUIRES unity expat)
register_component()

View file

@ -1,15 +1,14 @@
set(COMPONENT_SRCS "src/diskio.c" set(srcs "src/diskio.c"
"src/diskio_rawflash.c" "src/diskio_rawflash.c"
"src/diskio_sdmmc.c" "src/diskio_sdmmc.c"
"src/diskio_wl.c" "src/diskio_wl.c"
"src/ff.c" "src/ff.c"
"src/ffsystem.c" "src/ffsystem.c"
"src/ffunicode.c" "src/ffunicode.c"
"src/vfs_fat.c" "src/vfs_fat.c"
"src/vfs_fat_sdmmc.c" "src/vfs_fat_sdmmc.c"
"src/vfs_fat_spiflash.c") "src/vfs_fat_spiflash.c")
set(COMPONENT_ADD_INCLUDEDIRS src)
idf_component_register(SRCS "${srcs}"
set(COMPONENT_REQUIRES wear_levelling sdmmc) INCLUDE_DIRS src
REQUIRES wear_levelling sdmmc)
register_component()

View file

@ -1,8 +1,4 @@
set(COMPONENT_SRCDIRS ".") idf_component_register(SRC_DIRS "."
set(COMPONENT_ADD_INCLUDEDIRS ".") INCLUDE_DIRS "."
REQUIRES unity test_utils vfs fatfs
set(COMPONENT_REQUIRES unity test_utils vfs fatfs) EMBED_TXTFILES fatfs.img)
set(COMPONENT_EMBED_TXTFILES fatfs.img)
register_component()

View file

@ -1,41 +1,43 @@
# The following five lines of boilerplate have to be in your project's # The following five lines of boilerplate have to be in your project's
# CMakeLists in this exact order for cmake to work correctly # CMakeLists in this exact order for cmake to work correctly
set(COMPONENT_SRCS "common/esp_modbus_master.c" set(srcs "common/esp_modbus_master.c"
"common/esp_modbus_slave.c" "common/esp_modbus_slave.c"
"modbus/mb.c" "modbus/mb.c"
"modbus/mb_m.c" "modbus/mb_m.c"
"modbus/ascii/mbascii.c" "modbus/ascii/mbascii.c"
"modbus/rtu/mbrtu_m.c" "modbus/rtu/mbrtu_m.c"
"modbus/rtu/mbrtu.c" "modbus/rtu/mbrtu.c"
"modbus/rtu/mbcrc.c" "modbus/rtu/mbcrc.c"
"modbus/tcp/mbtcp.c" "modbus/tcp/mbtcp.c"
"port/port.c" "port/port.c"
"port/portevent.c" "port/portevent.c"
"port/portevent_m.c" "port/portevent_m.c"
"port/portother.c" "port/portother.c"
"port/portother_m.c" "port/portother_m.c"
"port/portserial.c" "port/portserial.c"
"port/portserial_m.c" "port/portserial_m.c"
"port/porttimer.c" "port/porttimer.c"
"port/porttimer_m.c" "port/porttimer_m.c"
"modbus/functions/mbfunccoils.c" "modbus/functions/mbfunccoils.c"
"modbus/functions/mbfunccoils_m.c" "modbus/functions/mbfunccoils_m.c"
"modbus/functions/mbfuncdiag.c" "modbus/functions/mbfuncdiag.c"
"modbus/functions/mbfuncdisc.c" "modbus/functions/mbfuncdisc.c"
"modbus/functions/mbfuncdisc_m.c" "modbus/functions/mbfuncdisc_m.c"
"modbus/functions/mbfuncholding.c" "modbus/functions/mbfuncholding.c"
"modbus/functions/mbfuncholding_m.c" "modbus/functions/mbfuncholding_m.c"
"modbus/functions/mbfuncinput.c" "modbus/functions/mbfuncinput.c"
"modbus/functions/mbfuncinput_m.c" "modbus/functions/mbfuncinput_m.c"
"modbus/functions/mbfuncother.c" "modbus/functions/mbfuncother.c"
"modbus/functions/mbutils.c" "modbus/functions/mbutils.c"
"serial_slave/modbus_controller/mbc_serial_slave.c" "serial_slave/modbus_controller/mbc_serial_slave.c"
"serial_master/modbus_controller/mbc_serial_master.c") "serial_master/modbus_controller/mbc_serial_master.c")
set(COMPONENT_ADD_INCLUDEDIRS common/include) set(include_dirs common/include)
set(COMPONENT_PRIV_INCLUDEDIRS common port modbus modbus/ascii modbus/functions set(priv_include_dirs common port modbus modbus/ascii modbus/functions
modbus/rtu modbus/tcp modbus/include) modbus/rtu modbus/tcp modbus/include)
list(APPEND COMPONENT_PRIV_INCLUDEDIRS serial_slave/port serial_slave/modbus_controller list(APPEND priv_include_dirs serial_slave/port serial_slave/modbus_controller
serial_master/port serial_master/modbus_controller) serial_master/port serial_master/modbus_controller)
set(COMPONENT_REQUIRES "driver")
register_component() idf_component_register(SRCS "${srcs}"
INCLUDE_DIRS "${include_dirs}"
PRIV_INCLUDE_DIRS "${priv_include_dirs}"
REQUIRES driver)

View file

@ -1,29 +1,27 @@
set(COMPONENT_ADD_INCLUDEDIRS include) set(srcs "croutine.c"
set(COMPONENT_PRIV_INCLUDEDIRS include/freertos .) "event_groups.c"
set(COMPONENT_SRCS "croutine.c" "FreeRTOS-openocd.c"
"event_groups.c" "list.c"
"FreeRTOS-openocd.c" "port.c"
"list.c" "portasm.S"
"port.c" "queue.c"
"portasm.S" "tasks.c"
"queue.c" "timers.c"
"tasks.c" "xtensa_context.S"
"timers.c" "xtensa_init.c"
"xtensa_context.S" "xtensa_intr.c"
"xtensa_init.c" "xtensa_intr_asm.S"
"xtensa_intr.c" "xtensa_overlay_os_hook.c"
"xtensa_intr_asm.S" "xtensa_vector_defaults.S"
"xtensa_overlay_os_hook.c" "xtensa_vectors.S")
"xtensa_vector_defaults.S"
"xtensa_vectors.S")
# app_trace is required by FreeRTOS headers only when CONFIG_SYSVIEW_ENABLE=y, # app_trace is required by FreeRTOS headers only when CONFIG_SYSVIEW_ENABLE=y,
# but requirements can't depend on config options, so always require it. # but requirements can't depend on config options, so always require it.
set(COMPONENT_REQUIRES app_trace) idf_component_register(SRCS "${srcs}"
set(COMPONENT_PRIV_REQUIRES esp_common soc) INCLUDE_DIRS include
set(COMPONENT_ADD_LDFRAGMENTS linker.lf) PRIV_INCLUDE_DIRS include/freertos .
LDFRAGMENTS linker.lf
register_component() REQUIRES app_trace
PRIV_REQUIRES soc)
target_link_libraries(${COMPONENT_LIB} INTERFACE "-Wl,--undefined=uxTopUsedPriority") target_link_libraries(${COMPONENT_LIB} INTERFACE "-Wl,--undefined=uxTopUsedPriority")

View file

@ -1,6 +1,3 @@
set(COMPONENT_SRCDIRS ".") idf_component_register(SRC_DIRS "."
set(COMPONENT_ADD_INCLUDEDIRS ".") INCLUDE_DIRS "."
REQUIRES unity test_utils)
set(COMPONENT_REQUIRES unity test_utils)
register_component()

View file

@ -1,23 +1,23 @@
set(COMPONENT_SRCS "heap_caps.c" set(srcs "heap_caps.c"
"heap_caps_init.c" "heap_caps_init.c"
"multi_heap.c") "multi_heap.c")
if(NOT CONFIG_HEAP_POISONING_DISABLED) if(NOT CONFIG_HEAP_POISONING_DISABLED)
list(APPEND COMPONENT_SRCS "multi_heap_poisoning.c") list(APPEND srcs "multi_heap_poisoning.c")
endif() endif()
if(CONFIG_HEAP_TASK_TRACKING) if(CONFIG_HEAP_TASK_TRACKING)
list(APPEND COMPONENT_SRCS "heap_task_info.c") list(APPEND srcs "heap_task_info.c")
endif() endif()
if(CONFIG_HEAP_TRACING_STANDALONE) if(CONFIG_HEAP_TRACING_STANDALONE)
list(APPEND COMPONENT_SRCS "heap_trace_standalone.c") list(APPEND srcs "heap_trace_standalone.c")
endif() endif()
set(COMPONENT_ADD_INCLUDEDIRS "include") idf_component_register(SRCS "${srcs}"
set(COMPONENT_ADD_LDFRAGMENTS linker.lf) INCLUDE_DIRS include
set(COMPONENT_PRIV_REQUIRES soc) LDFRAGMENTS linker.lf
register_component() PRIV_REQUIRES soc)
if(CONFIG_HEAP_TRACING) if(CONFIG_HEAP_TRACING)
set(WRAP_FUNCTIONS set(WRAP_FUNCTIONS

View file

@ -1,6 +1,3 @@
set(COMPONENT_SRCDIRS ".") idf_component_register(SRC_DIRS "."
set(COMPONENT_ADD_INCLUDEDIRS ".") INCLUDE_DIRS "."
REQUIRES unity test_utils heap)
set(COMPONENT_REQUIRES unity test_utils heap)
register_component()

View file

@ -1,2 +1 @@
set(COMPONENT_ADD_INCLUDEDIRS "include") idf_component_register(INCLUDE_DIRS include)
register_component()

View file

@ -1,3 +1,2 @@
set(COMPONENT_SRCS "src/jsmn.c") idf_component_register(SRCS "src/jsmn.c"
set(COMPONENT_ADD_INCLUDEDIRS "include") INCLUDE_DIRS "include")
register_component()

View file

@ -1,5 +1,4 @@
set(COMPONENT_SRCS "cJSON/cJSON.c" idf_component_register(SRCS "cJSON/cJSON.c"
"cJSON/cJSON_Utils.c" "cJSON/cJSON_Utils.c"
"cJSON/test.c") "cJSON/test.c"
set(COMPONENT_ADD_INCLUDEDIRS cJSON) INCLUDE_DIRS cJSON)
register_component()

View file

@ -1,7 +1,7 @@
set(SRC libsodium/src/libsodium) set(SRC libsodium/src/libsodium)
# Derived from libsodium/src/libsodium/Makefile.am # Derived from libsodium/src/libsodium/Makefile.am
# (ignoring the !MINIMAL set) # (ignoring the !MINIMAL set)
set(COMPONENT_SRCS "${SRC}/crypto_aead/chacha20poly1305/sodium/aead_chacha20poly1305.c" set(srcs "${SRC}/crypto_aead/chacha20poly1305/sodium/aead_chacha20poly1305.c"
"${SRC}/crypto_aead/xchacha20poly1305/sodium/aead_xchacha20poly1305.c" "${SRC}/crypto_aead/xchacha20poly1305/sodium/aead_xchacha20poly1305.c"
"${SRC}/crypto_auth/crypto_auth.c" "${SRC}/crypto_auth/crypto_auth.c"
"${SRC}/crypto_auth/hmacsha256/auth_hmacsha256.c" "${SRC}/crypto_auth/hmacsha256/auth_hmacsha256.c"
@ -116,18 +116,19 @@ set(COMPONENT_SRCS "${SRC}/crypto_aead/chacha20poly1305/sodium/aead_chacha20poly
"port/randombytes_esp32.c") "port/randombytes_esp32.c")
if(CONFIG_LIBSODIUM_USE_MBEDTLS_SHA) if(CONFIG_LIBSODIUM_USE_MBEDTLS_SHA)
list(APPEND COMPONENT_SRCS "port/crypto_hash_mbedtls/crypto_hash_sha256_mbedtls.c" list(APPEND srcs "port/crypto_hash_mbedtls/crypto_hash_sha256_mbedtls.c"
"port/crypto_hash_mbedtls/crypto_hash_sha512_mbedtls.c") "port/crypto_hash_mbedtls/crypto_hash_sha512_mbedtls.c")
else() else()
list(APPEND COMPONENT_SRCS "${SRC}/crypto_hash/sha256/cp/hash_sha256_cp.c" list(APPEND srcs "${SRC}/crypto_hash/sha256/cp/hash_sha256_cp.c"
"${SRC}/crypto_hash/sha512/cp/hash_sha512_cp.c") "${SRC}/crypto_hash/sha512/cp/hash_sha512_cp.c")
endif() endif()
set(COMPONENT_ADD_INCLUDEDIRS ${SRC}/include port_include) set(include_dirs ${SRC}/include port_include)
set(COMPONENT_PRIV_INCLUDEDIRS ${SRC}/include/sodium port_include/sodium port) set(priv_include_dirs ${SRC}/include/sodium port_include/sodium port)
idf_component_register(SRCS "${srcs}"
set(COMPONENT_REQUIRES mbedtls) INCLUDE_DIRS "${include_dirs}"
register_component() PRIV_INCLUDE_DIRS "${priv_include_dirs}"
REQUIRES mbedtls)
target_compile_definitions(${COMPONENT_LIB} PRIVATE target_compile_definitions(${COMPONENT_LIB} PRIVATE
CONFIGURED CONFIGURED

View file

@ -2,11 +2,7 @@ if(TESTS_ALL EQUAL 1)
message("not linking libsodium tests, use '-T libsodium' to test it") message("not linking libsodium tests, use '-T libsodium' to test it")
else() else()
get_filename_component(LS_TESTDIR "${CMAKE_CURRENT_LIST_DIR}/../libsodium/test/default" ABSOLUTE) get_filename_component(LS_TESTDIR "${CMAKE_CURRENT_LIST_DIR}/../libsodium/test/default" ABSOLUTE)
set(COMPONENT_ADD_INCLUDEDIRS "." "${LS_TESTDIR}/../quirks")
set(COMPONENT_REQUIRES unity libsodium)
set(TEST_CASES "chacha20;aead_chacha20poly1305;box;box2;ed25519_convert;sign;hash") set(TEST_CASES "chacha20;aead_chacha20poly1305;box;box2;ed25519_convert;sign;hash")
foreach(test_case ${TEST_CASES}) foreach(test_case ${TEST_CASES})
@ -14,9 +10,9 @@ else()
list(APPEND TEST_CASES_FILES ${test_case_file}) list(APPEND TEST_CASES_FILES ${test_case_file})
endforeach() endforeach()
set(COMPONENT_SRCS "${TEST_CASES_FILES};test_sodium.c") idf_component_register(SRCS "${TEST_CASES_FILES}" "test_sodium.c"
INCLUDE_DIRS "." "${LS_TESTDIR}/../quirks"
register_component() REQUIRES unity libsodium)
# The libsodium test suite is designed to be run each test case as an executable on a desktop computer and uses # The libsodium test suite is designed to be run each test case as an executable on a desktop computer and uses
# filesytem to write & then compare contents of each file. # filesytem to write & then compare contents of each file.

View file

@ -1,4 +1,3 @@
set(COMPONENT_SRCS "log.c") idf_component_register(SRCS "log.c"
set(COMPONENT_ADD_INCLUDEDIRS "include") INCLUDE_DIRS "include"
set(COMPONENT_PRIV_REQUIRES soc) PRIV_REQUIRES soc)
register_component()

View file

@ -1,4 +1,4 @@
set(COMPONENT_ADD_INCLUDEDIRS set(include_dirs
include/apps include/apps
include/apps/sntp include/apps/sntp
lwip/src/include lwip/src/include
@ -6,92 +6,92 @@ set(COMPONENT_ADD_INCLUDEDIRS
port/esp32/include/arch port/esp32/include/arch
) )
set(COMPONENT_SRCS "apps/dhcpserver/dhcpserver.c" set(srcs "apps/dhcpserver/dhcpserver.c"
"apps/ping/esp_ping.c" "apps/ping/esp_ping.c"
"apps/ping/ping.c" "apps/ping/ping.c"
"apps/sntp/sntp.c" "apps/sntp/sntp.c"
"lwip/src/api/api_lib.c" "lwip/src/api/api_lib.c"
"lwip/src/api/api_msg.c" "lwip/src/api/api_msg.c"
"lwip/src/api/err.c" "lwip/src/api/err.c"
"lwip/src/api/netbuf.c" "lwip/src/api/netbuf.c"
"lwip/src/api/netdb.c" "lwip/src/api/netdb.c"
"lwip/src/api/netifapi.c" "lwip/src/api/netifapi.c"
"lwip/src/api/sockets.c" "lwip/src/api/sockets.c"
"lwip/src/api/tcpip.c" "lwip/src/api/tcpip.c"
"lwip/src/apps/sntp/sntp.c" "lwip/src/apps/sntp/sntp.c"
"lwip/src/core/def.c" "lwip/src/core/def.c"
"lwip/src/core/dns.c" "lwip/src/core/dns.c"
"lwip/src/core/inet_chksum.c" "lwip/src/core/inet_chksum.c"
"lwip/src/core/init.c" "lwip/src/core/init.c"
"lwip/src/core/ip.c" "lwip/src/core/ip.c"
"lwip/src/core/mem.c" "lwip/src/core/mem.c"
"lwip/src/core/memp.c" "lwip/src/core/memp.c"
"lwip/src/core/netif.c" "lwip/src/core/netif.c"
"lwip/src/core/pbuf.c" "lwip/src/core/pbuf.c"
"lwip/src/core/raw.c" "lwip/src/core/raw.c"
"lwip/src/core/stats.c" "lwip/src/core/stats.c"
"lwip/src/core/sys.c" "lwip/src/core/sys.c"
"lwip/src/core/tcp.c" "lwip/src/core/tcp.c"
"lwip/src/core/tcp_in.c" "lwip/src/core/tcp_in.c"
"lwip/src/core/tcp_out.c" "lwip/src/core/tcp_out.c"
"lwip/src/core/timeouts.c" "lwip/src/core/timeouts.c"
"lwip/src/core/udp.c" "lwip/src/core/udp.c"
"lwip/src/core/ipv4/autoip.c" "lwip/src/core/ipv4/autoip.c"
"lwip/src/core/ipv4/dhcp.c" "lwip/src/core/ipv4/dhcp.c"
"lwip/src/core/ipv4/etharp.c" "lwip/src/core/ipv4/etharp.c"
"lwip/src/core/ipv4/icmp.c" "lwip/src/core/ipv4/icmp.c"
"lwip/src/core/ipv4/igmp.c" "lwip/src/core/ipv4/igmp.c"
"lwip/src/core/ipv4/ip4.c" "lwip/src/core/ipv4/ip4.c"
"lwip/src/core/ipv4/ip4_addr.c" "lwip/src/core/ipv4/ip4_addr.c"
"lwip/src/core/ipv4/ip4_frag.c" "lwip/src/core/ipv4/ip4_frag.c"
"lwip/src/core/ipv6/dhcp6.c" "lwip/src/core/ipv6/dhcp6.c"
"lwip/src/core/ipv6/ethip6.c" "lwip/src/core/ipv6/ethip6.c"
"lwip/src/core/ipv6/icmp6.c" "lwip/src/core/ipv6/icmp6.c"
"lwip/src/core/ipv6/inet6.c" "lwip/src/core/ipv6/inet6.c"
"lwip/src/core/ipv6/ip6.c" "lwip/src/core/ipv6/ip6.c"
"lwip/src/core/ipv6/ip6_addr.c" "lwip/src/core/ipv6/ip6_addr.c"
"lwip/src/core/ipv6/ip6_frag.c" "lwip/src/core/ipv6/ip6_frag.c"
"lwip/src/core/ipv6/mld6.c" "lwip/src/core/ipv6/mld6.c"
"lwip/src/core/ipv6/nd6.c" "lwip/src/core/ipv6/nd6.c"
"lwip/src/netif/ethernet.c" "lwip/src/netif/ethernet.c"
"lwip/src/netif/ethernetif.c" "lwip/src/netif/ethernetif.c"
"lwip/src/netif/lowpan6.c" "lwip/src/netif/lowpan6.c"
"lwip/src/netif/slipif.c" "lwip/src/netif/slipif.c"
"lwip/src/netif/ppp/auth.c" "lwip/src/netif/ppp/auth.c"
"lwip/src/netif/ppp/ccp.c" "lwip/src/netif/ppp/ccp.c"
"lwip/src/netif/ppp/chap-md5.c" "lwip/src/netif/ppp/chap-md5.c"
"lwip/src/netif/ppp/chap-new.c" "lwip/src/netif/ppp/chap-new.c"
"lwip/src/netif/ppp/chap_ms.c" "lwip/src/netif/ppp/chap_ms.c"
"lwip/src/netif/ppp/demand.c" "lwip/src/netif/ppp/demand.c"
"lwip/src/netif/ppp/eap.c" "lwip/src/netif/ppp/eap.c"
"lwip/src/netif/ppp/ecp.c" "lwip/src/netif/ppp/ecp.c"
"lwip/src/netif/ppp/eui64.c" "lwip/src/netif/ppp/eui64.c"
"lwip/src/netif/ppp/fsm.c" "lwip/src/netif/ppp/fsm.c"
"lwip/src/netif/ppp/ipcp.c" "lwip/src/netif/ppp/ipcp.c"
"lwip/src/netif/ppp/ipv6cp.c" "lwip/src/netif/ppp/ipv6cp.c"
"lwip/src/netif/ppp/lcp.c" "lwip/src/netif/ppp/lcp.c"
"lwip/src/netif/ppp/magic.c" "lwip/src/netif/ppp/magic.c"
"lwip/src/netif/ppp/mppe.c" "lwip/src/netif/ppp/mppe.c"
"lwip/src/netif/ppp/multilink.c" "lwip/src/netif/ppp/multilink.c"
"lwip/src/netif/ppp/ppp.c" "lwip/src/netif/ppp/ppp.c"
"lwip/src/netif/ppp/pppapi.c" "lwip/src/netif/ppp/pppapi.c"
"lwip/src/netif/ppp/pppcrypt.c" "lwip/src/netif/ppp/pppcrypt.c"
"lwip/src/netif/ppp/pppoe.c" "lwip/src/netif/ppp/pppoe.c"
"lwip/src/netif/ppp/pppol2tp.c" "lwip/src/netif/ppp/pppol2tp.c"
"lwip/src/netif/ppp/pppos.c" "lwip/src/netif/ppp/pppos.c"
"lwip/src/netif/ppp/upap.c" "lwip/src/netif/ppp/upap.c"
"lwip/src/netif/ppp/utils.c" "lwip/src/netif/ppp/utils.c"
"lwip/src/netif/ppp/vj.c" "lwip/src/netif/ppp/vj.c"
"port/esp32/vfs_lwip.c" "port/esp32/vfs_lwip.c"
"port/esp32/debug/lwip_debug.c" "port/esp32/debug/lwip_debug.c"
"port/esp32/freertos/sys_arch.c" "port/esp32/freertos/sys_arch.c"
"port/esp32/netif/dhcp_state.c" "port/esp32/netif/dhcp_state.c"
"port/esp32/netif/ethernetif.c" "port/esp32/netif/ethernetif.c"
"port/esp32/netif/nettestif.c" "port/esp32/netif/nettestif.c"
"port/esp32/netif/wlanif.c") "port/esp32/netif/wlanif.c")
if(CONFIG_LWIP_PPP_SUPPORT) if(CONFIG_LWIP_PPP_SUPPORT)
list(APPEND COMPONENT_SRCS "lwip/src/netif/ppp/auth.c" list(APPEND srcs "lwip/src/netif/ppp/auth.c"
"lwip/src/netif/ppp/ccp.c" "lwip/src/netif/ppp/ccp.c"
"lwip/src/netif/ppp/chap-md5.c" "lwip/src/netif/ppp/chap-md5.c"
"lwip/src/netif/ppp/chap-new.c" "lwip/src/netif/ppp/chap-new.c"
@ -123,12 +123,11 @@ if(CONFIG_LWIP_PPP_SUPPORT)
"lwip/src/netif/ppp/polarssl/sha1.c") "lwip/src/netif/ppp/polarssl/sha1.c")
endif() endif()
set(COMPONENT_REQUIRES vfs esp_wifi) idf_component_register(SRCS "${srcs}"
set(COMPONENT_PRIV_REQUIRES ethernet tcpip_adapter nvs_flash) INCLUDE_DIRS "${include_dirs}"
LDFRAGMENTS linker.lf
set(COMPONENT_ADD_LDFRAGMENTS linker.lf) REQUIRES vfs esp_wifi
PRIV_REQUIRES ethernet tcpip_adapter nvs_flash)
register_component()
# lots of LWIP source files evaluate macros that check address of stack variables # lots of LWIP source files evaluate macros that check address of stack variables
target_compile_options(${COMPONENT_LIB} PRIVATE -Wno-address) target_compile_options(${COMPONENT_LIB} PRIVATE -Wno-address)

View file

@ -1,8 +1,6 @@
set(COMPONENT_ADD_INCLUDEDIRS "port/include" "mbedtls/include") idf_component_register(SRCS "mbedtls.c"
set(COMPONENT_SRCS "mbedtls.c") INCLUDE_DIRS "port/include" "mbedtls/include"
set(COMPONENT_REQUIRES lwip) REQUIRES lwip)
register_component()
# Only build mbedtls libraries # Only build mbedtls libraries
set(ENABLE_TESTING CACHE BOOL OFF) set(ENABLE_TESTING CACHE BOOL OFF)

View file

@ -1,9 +1,6 @@
set(COMPONENT_SRCDIRS ".") idf_component_register(SRC_DIRS "."
set(COMPONENT_ADD_INCLUDEDIRS ".") INCLUDE_DIRS "."
REQUIRES unity test_utils mbedtls)
set(COMPONENT_REQUIRES unity test_utils mbedtls)
register_component()
idf_component_get_property(mbedtls mbedtls COMPONENT_LIB) idf_component_get_property(mbedtls mbedtls COMPONENT_LIB)
target_compile_definitions(${mbedtls} PUBLIC "-DMBEDTLS_DEPRECATED_WARNING") target_compile_definitions(${mbedtls} PUBLIC "-DMBEDTLS_DEPRECATED_WARNING")

View file

@ -1,9 +1,7 @@
set(COMPONENT_SRCS "mdns.c" idf_component_register(SRCS "mdns.c"
"mdns_console.c" "mdns_console.c"
"mdns_networking.c") "mdns_networking.c"
set(COMPONENT_ADD_INCLUDEDIRS "include") INCLUDE_DIRS "include"
set(COMPONENT_PRIV_INCLUDEDIRS "private_include") PRIV_INCLUDE_DIRS "private_include"
set(COMPONENT_REQUIRES lwip mbedtls console tcpip_adapter) REQUIRES lwip mbedtls console tcpip_adapter)
register_component()

View file

@ -1,3 +1,2 @@
set(COMPONENT_SRCDIRS ".") idf_component_register(SRC_DIRS "."
set(COMPONENT_PRIV_REQUIRES unity test_utils mdns) PRIV_REQUIRES unity test_utils mdns)
register_component()

View file

@ -1,10 +1,7 @@
set(COMPONENT_ADD_INCLUDEDIRS esp-mqtt/include) idf_component_register(SRCS "esp-mqtt/mqtt_client.c"
set(COMPONENT_PRIV_INCLUDEDIRS "esp-mqtt/lib/include") "esp-mqtt/lib/mqtt_msg.c"
set(COMPONENT_SRCS "esp-mqtt/mqtt_client.c" "esp-mqtt/lib/mqtt_outbox.c"
"esp-mqtt/lib/mqtt_msg.c" "esp-mqtt/lib/platform_esp32_idf.c"
"esp-mqtt/lib/mqtt_outbox.c" INCLUDE_DIRS esp-mqtt/include
"esp-mqtt/lib/platform_esp32_idf.c") PRIV_INCLUDE_DIRS "esp-mqtt/lib/include"
REQUIRES lwip nghttp mbedtls tcp_transport)
set(COMPONENT_REQUIRES lwip nghttp mbedtls tcp_transport)
register_component()

View file

@ -1,20 +1,20 @@
set(COMPONENT_SRCS "heap.c" set(srcs "heap.c"
"locks.c" "locks.c"
"poll.c" "poll.c"
"pthread.c" "pthread.c"
"random.c" "random.c"
"reent_init.c" "reent_init.c"
"select.c" "select.c"
"syscall_table.c" "syscall_table.c"
"syscalls.c" "syscalls.c"
"termios.c" "termios.c"
"time.c" "time.c"
"utime.c") "utime.c")
set(COMPONENT_ADD_INCLUDEDIRS platform_include) set(include_dirs platform_include)
if(GCC_NOT_5_2_0) if(GCC_NOT_5_2_0)
if(CONFIG_SPIRAM_CACHE_WORKAROUND) if(CONFIG_SPIRAM_CACHE_WORKAROUND)
set(COMPONENT_ADD_LDFRAGMENTS esp32-spiram-rom-functions-c.lf) set(ldfragments esp32-spiram-rom-functions-c.lf)
endif() endif()
# Forces the linker to include locks, heap, and syscalls from this component, # Forces the linker to include locks, heap, and syscalls from this component,
@ -27,20 +27,21 @@ else()
# Remove this section when GCC 5.2.0 is no longer supported # Remove this section when GCC 5.2.0 is no longer supported
# 'include' and 'lib' directories should also be removed. # 'include' and 'lib' directories should also be removed.
# An if statement about LIB_PATH below should also be removed. # An if statement about LIB_PATH below should also be removed.
list(APPEND COMPONENT_ADD_INCLUDEDIRS include) list(APPEND include_dirs include)
set(LIB_PATH ${CMAKE_CURRENT_SOURCE_DIR}/lib) set(LIB_PATH ${CMAKE_CURRENT_SOURCE_DIR}/lib)
if(CONFIG_SPIRAM_CACHE_WORKAROUND) if(CONFIG_SPIRAM_CACHE_WORKAROUND)
set(COMPONENT_ADD_LDFRAGMENTS esp32-spiram-rom-functions-psram-workaround.lf) set(ldfragments esp32-spiram-rom-functions-psram-workaround.lf)
endif() endif()
endif() endif()
set(COMPONENT_REQUIRES vfs) # for sys/ioctl.h list(APPEND ldfragments newlib.lf)
set(COMPONENT_PRIV_REQUIRES soc)
list(APPEND COMPONENT_ADD_LDFRAGMENTS newlib.lf) idf_component_register(SRCS "${srcs}"
INCLUDE_DIRS "${include_dirs}"
register_component() REQUIRES vfs
PRIV_REQUIRES soc
LDFRAGMENTS "${ldfragments}")
if(LIB_PATH) if(LIB_PATH)
target_link_libraries(${COMPONENT_LIB} INTERFACE "-L ${LIB_PATH}") target_link_libraries(${COMPONENT_LIB} INTERFACE "-L ${LIB_PATH}")

View file

@ -1,6 +1,3 @@
set(COMPONENT_SRCDIRS ".") idf_component_register(SRC_DIRS "."
set(COMPONENT_ADD_INCLUDEDIRS ".") INCLUDE_DIRS "."
REQUIRES unity test_utils)
set(COMPONENT_REQUIRES unity test_utils)
register_component()

View file

@ -1,28 +1,28 @@
set(COMPONENT_ADD_INCLUDEDIRS port/include nghttp2/lib/includes) set(srcs "nghttp2/lib/nghttp2_buf.c"
set(COMPONENT_SRCS "nghttp2/lib/nghttp2_buf.c" "nghttp2/lib/nghttp2_callbacks.c"
"nghttp2/lib/nghttp2_callbacks.c" "nghttp2/lib/nghttp2_debug.c"
"nghttp2/lib/nghttp2_debug.c" "nghttp2/lib/nghttp2_frame.c"
"nghttp2/lib/nghttp2_frame.c" "nghttp2/lib/nghttp2_hd.c"
"nghttp2/lib/nghttp2_hd.c" "nghttp2/lib/nghttp2_hd_huffman.c"
"nghttp2/lib/nghttp2_hd_huffman.c" "nghttp2/lib/nghttp2_hd_huffman_data.c"
"nghttp2/lib/nghttp2_hd_huffman_data.c" "nghttp2/lib/nghttp2_helper.c"
"nghttp2/lib/nghttp2_helper.c" "nghttp2/lib/nghttp2_http.c"
"nghttp2/lib/nghttp2_http.c" "nghttp2/lib/nghttp2_map.c"
"nghttp2/lib/nghttp2_map.c" "nghttp2/lib/nghttp2_mem.c"
"nghttp2/lib/nghttp2_mem.c" "nghttp2/lib/nghttp2_npn.c"
"nghttp2/lib/nghttp2_npn.c" "nghttp2/lib/nghttp2_option.c"
"nghttp2/lib/nghttp2_option.c" "nghttp2/lib/nghttp2_outbound_item.c"
"nghttp2/lib/nghttp2_outbound_item.c" "nghttp2/lib/nghttp2_pq.c"
"nghttp2/lib/nghttp2_pq.c" "nghttp2/lib/nghttp2_priority_spec.c"
"nghttp2/lib/nghttp2_priority_spec.c" "nghttp2/lib/nghttp2_queue.c"
"nghttp2/lib/nghttp2_queue.c" "nghttp2/lib/nghttp2_rcbuf.c"
"nghttp2/lib/nghttp2_rcbuf.c" "nghttp2/lib/nghttp2_session.c"
"nghttp2/lib/nghttp2_session.c" "nghttp2/lib/nghttp2_stream.c"
"nghttp2/lib/nghttp2_stream.c" "nghttp2/lib/nghttp2_submit.c"
"nghttp2/lib/nghttp2_submit.c" "nghttp2/lib/nghttp2_version.c"
"nghttp2/lib/nghttp2_version.c" "port/http_parser.c")
"port/http_parser.c")
register_component() idf_component_register(SRCS "${srcs}"
INCLUDE_DIRS port/include nghttp2/lib/includes)
target_compile_definitions(${COMPONENT_LIB} PUBLIC "-DHAVE_CONFIG_H") target_compile_definitions(${COMPONENT_LIB} PUBLIC "-DHAVE_CONFIG_H")

View file

@ -1,13 +1,10 @@
set(COMPONENT_SRCS "src/nvs_api.cpp" idf_component_register(SRCS "src/nvs_api.cpp"
"src/nvs_encr.cpp" "src/nvs_encr.cpp"
"src/nvs_item_hash_list.cpp" "src/nvs_item_hash_list.cpp"
"src/nvs_ops.cpp" "src/nvs_ops.cpp"
"src/nvs_page.cpp" "src/nvs_page.cpp"
"src/nvs_pagemanager.cpp" "src/nvs_pagemanager.cpp"
"src/nvs_storage.cpp" "src/nvs_storage.cpp"
"src/nvs_types.cpp") "src/nvs_types.cpp"
set(COMPONENT_ADD_INCLUDEDIRS include) REQUIRES spi_flash mbedtls
INCLUDE_DIRS include)
set(COMPONENT_REQUIRES spi_flash mbedtls)
register_component()

View file

@ -1,6 +1,3 @@
set(COMPONENT_SRCDIRS ".") idf_component_register(SRCS "."
set(COMPONENT_ADD_INCLUDEDIRS ".") INCLUDE_DIRS "."
REQUIRES unity test_utils nvs_flash bootloader_support)
set(COMPONENT_REQUIRES unity test_utils nvs_flash bootloader_support)
register_component()

View file

@ -1,14 +1,11 @@
set(COMPONENT_ADD_INCLUDEDIRS include) idf_component_register(SRCS "library/ssl_cert.c"
set(COMPONENT_PRIV_INCLUDEDIRS include/internal include/platform include/openssl) "library/ssl_lib.c"
set(COMPONENT_SRCS "library/ssl_cert.c" "library/ssl_methods.c"
"library/ssl_lib.c" "library/ssl_pkey.c"
"library/ssl_methods.c" "library/ssl_stack.c"
"library/ssl_pkey.c" "library/ssl_x509.c"
"library/ssl_stack.c" "platform/ssl_pm.c"
"library/ssl_x509.c" "platform/ssl_port.c"
"platform/ssl_pm.c" REQUIRES mbedtls
"platform/ssl_port.c") INCLUDE_DIRS include
PRIV_INCLUDE_DIRS include/internal include/platform include/openssl)
set(COMPONENT_REQUIRES mbedtls)
register_component()

View file

@ -1,4 +1,4 @@
register_config_only_component() idf_component_register()
if(BOOTLOADER_BUILD) if(BOOTLOADER_BUILD)
return() return()

View file

@ -1,6 +1,3 @@
set(COMPONENT_SRCDIRS ".") idf_component_register(SRC_DIRS "."
set(COMPONENT_ADD_INCLUDEDIRS ".") INCLUDE_DIRS "."
REQUIRES unity test_utils)
set(COMPONENT_REQUIRES unity test_utils)
register_component()

View file

@ -1,4 +1,2 @@
set(COMPONENT_ADD_INCLUDEDIRS protobuf-c) idf_component_register(SRCS "protobuf-c/protobuf-c/protobuf-c.c"
set(COMPONENT_SRCS "protobuf-c/protobuf-c/protobuf-c.c") INCLUDE_DIRS protobuf-c)
register_component()

View file

@ -1,25 +1,26 @@
set(COMPONENT_ADD_INCLUDEDIRS include/common set(include_dirs include/common
include/security include/security
include/transports) include/transports)
set(COMPONENT_PRIV_INCLUDEDIRS proto-c src/common src/simple_ble) set(priv_include_dirs proto-c src/common src/simple_ble)
set(COMPONENT_SRCS "src/common/protocomm.c" set(srcs "src/common/protocomm.c"
"src/security/security0.c" "src/security/security0.c"
"src/security/security1.c" "src/security/security1.c"
"proto-c/constants.pb-c.c" "proto-c/constants.pb-c.c"
"proto-c/sec0.pb-c.c" "proto-c/sec0.pb-c.c"
"proto-c/sec1.pb-c.c" "proto-c/sec1.pb-c.c"
"proto-c/session.pb-c.c" "proto-c/session.pb-c.c"
"src/transports/protocomm_console.c" "src/transports/protocomm_console.c"
"src/transports/protocomm_httpd.c") "src/transports/protocomm_httpd.c")
set(COMPONENT_PRIV_REQUIRES protobuf-c mbedtls console esp_http_server bt)
if(CONFIG_BT_ENABLED) if(CONFIG_BT_ENABLED)
if(CONFIG_BT_BLUEDROID_ENABLED) if(CONFIG_BT_BLUEDROID_ENABLED)
list(APPEND COMPONENT_SRCS list(APPEND srcs
"src/simple_ble/simple_ble.c" "src/simple_ble/simple_ble.c"
"src/transports/protocomm_ble.c") "src/transports/protocomm_ble.c")
endif() endif()
endif() endif()
register_component() idf_component_register(SRCS "${srcs}"
INCLUDE_DIRS "${include_dirs}"
PRIV_INCLUDE_DIRS "${priv_include_dirs}"
PRIV_REQUIRES protobuf-c mbedtls console esp_http_server bt)

View file

@ -1,7 +1,4 @@
set(COMPONENT_SRCDIRS ".") idf_component_register(SRC_DIRS "."
set(COMPONENT_ADD_INCLUDEDIRS ".") INCLUDE_DIRS "."
set(COMPONENT_PRIV_INCLUDEDIRS "../proto-c/") PRIV_INCLUDE_DIRS "../proto-c/"
REQUIRES unity mbedtls protocomm protobuf-c)
set(COMPONENT_REQUIRES unity mbedtls protocomm protobuf-c)
register_component()

View file

@ -1,8 +1,7 @@
set(COMPONENT_SRCS "pthread.c" idf_component_register(SRCS "pthread.c"
"pthread_cond_var.c" "pthread_cond_var.c"
"pthread_local_storage.c") "pthread_local_storage.c"
set(COMPONENT_ADD_INCLUDEDIRS "include") INCLUDE_DIRS include)
register_component()
if(CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP) if(CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP)
target_link_libraries(${COMPONENT_LIB} "-Wl,--wrap=vPortCleanUpTCB") target_link_libraries(${COMPONENT_LIB} "-Wl,--wrap=vPortCleanUpTCB")

View file

@ -1,6 +1,3 @@
set(COMPONENT_SRCDIRS ".") idf_component_register(SRC_DIRS "."
set(COMPONENT_ADD_INCLUDEDIRS ".") INCLUDE_DIRS "."
REQUIRES unity test_utils pthread)
set(COMPONENT_REQUIRES unity test_utils pthread)
register_component()

View file

@ -1,10 +1,9 @@
set(COMPONENT_SRCS "sdmmc_cmd.c" idf_component_register(SRCS "sdmmc_cmd.c"
"sdmmc_common.c" "sdmmc_common.c"
"sdmmc_init.c" "sdmmc_init.c"
"sdmmc_io.c" "sdmmc_io.c"
"sdmmc_mmc.c" "sdmmc_mmc.c"
"sdmmc_sd.c") "sdmmc_sd.c"
set(COMPONENT_ADD_INCLUDEDIRS "include") INCLUDE_DIRS include
set(COMPONENT_REQUIRES driver) REQUIRES driver
set(COMPONENT_PRIV_REQUIRES soc) PRIV_REQUIRES soc)
register_component()

View file

@ -1,6 +1,3 @@
set(COMPONENT_SRCDIRS ".") idf_component_register(SRC_DIRS "."
set(COMPONENT_ADD_INCLUDEDIRS ".") INCLUDE_DIRS "."
REQUIRES unity sdmmc)
set(COMPONENT_REQUIRES unity sdmmc)
register_component()

View file

@ -1,6 +1,3 @@
set(COMPONENT_SRCS "smartconfig_ack.c") idf_component_register(SRCS "smartconfig_ack.c"
set(COMPONENT_ADD_INCLUDEDIRS "include") INCLUDE_DIRS include
PRIV_REQUIRES lwip tcpip_adapter)
set(COMPONENT_PRIV_REQUIRES lwip tcpip_adapter)
register_component()

View file

@ -4,12 +4,12 @@ if(EXISTS "${COMPONENT_DIR}/${soc_name}")
include(${COMPONENT_DIR}/${soc_name}/sources.cmake) include(${COMPONENT_DIR}/${soc_name}/sources.cmake)
spaces2list(SOC_SRCS) spaces2list(SOC_SRCS)
add_prefix(COMPONENT_SRCS "${soc_name}/" ${SOC_SRCS}) add_prefix(srcs "${soc_name}/" ${SOC_SRCS})
set(COMPONENT_ADD_INCLUDEDIRS ${soc_name}/include) set(include_dirs ${soc_name}/include)
endif() endif()
list(APPEND COMPONENT_ADD_INCLUDEDIRS include) list(APPEND include_dirs include)
list(APPEND COMPONENT_SRCS "src/memory_layout_utils.c" list(APPEND srcs "src/memory_layout_utils.c"
"src/lldesc.c" "src/lldesc.c"
"src/hal/spi_hal.c" "src/hal/spi_hal.c"
"src/hal/spi_hal_iram.c" "src/hal/spi_hal_iram.c"
@ -20,8 +20,6 @@ list(APPEND COMPONENT_SRCS "src/memory_layout_utils.c"
"src/hal/spi_flash_hal_iram.c" "src/hal/spi_flash_hal_iram.c"
) )
set(COMPONENT_ADD_LDFRAGMENTS linker.lf) idf_component_register(SRCS "${srcs}"
INCLUDE_DIRS "${include_dirs}"
set(COMPONENT_REQUIRES) LDFRAGMENTS linker.lf)
register_component()

View file

@ -1,10 +1,11 @@
idf_build_get_property(soc_name IDF_TARGET) idf_build_get_property(soc_name IDF_TARGET)
get_filename_component(soc_test "${CMAKE_CURRENT_SOURCE_DIR}/../${soc_name}/test" ABSOLUTE) get_filename_component(soc_test "${CMAKE_CURRENT_SOURCE_DIR}/../${soc_name}/test" ABSOLUTE)
if(EXISTS "${soc_test}") if(EXISTS "${soc_test}")
set(COMPONENT_SRCS "${soc_test}") set(srcs "${soc_test}")
set(COMPONENT_ADD_INCLUDEDIRS "${soc_test}") set(include_dirs "${soc_test}")
endif() endif()
set(COMPONENT_REQUIRES unity test_utils) idf_component_register(SRC_DIRS "${src_dirs}"
INCLUDE_DIRS "${include_dirs}"
register_component() REQUIRES unity test_utils)

View file

@ -1,10 +1,10 @@
set(priv_requires bootloader_support soc)
if(BOOTLOADER_BUILD) if(BOOTLOADER_BUILD)
# Bootloader needs SPIUnlock from this file, but doesn't # Bootloader needs SPIUnlock from this file, but doesn't
# need other parts of this component # need other parts of this component
set(COMPONENT_SRCS "spi_flash_rom_patch.c") set(srcs "spi_flash_rom_patch.c")
set(COMPONENT_PRIV_REQUIRES bootloader_support soc)
else() else()
set(COMPONENT_SRCS "cache_utils.c" set(srcs "cache_utils.c"
"flash_mmap.c" "flash_mmap.c"
"flash_ops.c" "flash_ops.c"
"partition.c" "partition.c"
@ -17,13 +17,13 @@ else()
"memspi_host_driver.c" "memspi_host_driver.c"
) )
if(NOT CONFIG_SPI_FLASH_USE_LEGACY_IMPL) if(NOT CONFIG_SPI_FLASH_USE_LEGACY_IMPL)
list(APPEND COMPONENT_SRCS "esp_flash_api.c") list(APPEND srcs "esp_flash_api.c")
endif() endif()
set(COMPONENT_PRIV_REQUIRES bootloader_support app_update soc) set(priv_requires bootloader_support app_update soc)
endif() endif()
set(COMPONENT_ADD_INCLUDEDIRS include) idf_component_register(SRCS "${srcs}"
set(COMPONENT_PRIV_INCLUDEDIRS private_include) PRIV_REQUIRES "${priv_requires}"
set(COMPONENT_ADD_LDFRAGMENTS linker.lf) INCLUDE_DIRS include
PRIV_INCLUDE_DIRS private_include
register_component() LDFRAGMENTS linker.lf)

View file

@ -1,6 +1,3 @@
set(COMPONENT_SRCDIRS ".") idf_component_register(SRC_DIRS "."
set(COMPONENT_ADD_INCLUDEDIRS ".") INCLUDE_DIRS "."
REQUIRES unity test_utils spi_flash bootloader_support app_update)
set(COMPONENT_REQUIRES unity test_utils spi_flash bootloader_support app_update)
register_component()

View file

@ -1,15 +1,12 @@
set(COMPONENT_ADD_INCLUDEDIRS "include") idf_component_register(SRCS "esp_spiffs.c"
set(COMPONENT_PRIV_INCLUDEDIRS "." "spiffs/src") "spiffs_api.c"
set(COMPONENT_SRCS "esp_spiffs.c" "spiffs/src/spiffs_cache.c"
"spiffs_api.c" "spiffs/src/spiffs_check.c"
"spiffs/src/spiffs_cache.c" "spiffs/src/spiffs_gc.c"
"spiffs/src/spiffs_check.c" "spiffs/src/spiffs_hydrogen.c"
"spiffs/src/spiffs_gc.c" "spiffs/src/spiffs_nucleus.c"
"spiffs/src/spiffs_hydrogen.c" INCLUDE_DIRS "include"
"spiffs/src/spiffs_nucleus.c") PRIV_INCLUDE_DIRS "." "spiffs/src"
REQUIRES spi_flash
set(COMPONENT_REQUIRES spi_flash) PRIV_REQUIRES bootloader_support)
set(COMPONENT_PRIV_REQUIRES bootloader_support)
register_component()

View file

@ -1,6 +1,3 @@
set(COMPONENT_SRCDIRS ".") idf_component_register(SRC_DIRS "."
set(COMPONENT_ADD_INCLUDEDIRS ".") INCLUDE_DIRS "."
REQUIRES unity test_utils spiffs)
set(COMPONENT_REQUIRES unity test_utils spiffs)
register_component()

View file

@ -1,12 +1,8 @@
set(COMPONENT_SRCS "transport.c" idf_component_register(SRCS "transport.c"
"transport_ssl.c" "transport_ssl.c"
"transport_tcp.c" "transport_tcp.c"
"transport_ws.c" "transport_ws.c"
"transport_utils.c" "transport_utils.c"
"transport_strcasestr.c") "transport_strcasestr.c"
INCLUDE_DIRS include
set(COMPONENT_ADD_INCLUDEDIRS "include") REQUIRES lwip esp-tls)
set(COMPONENT_REQUIRES lwip esp-tls)
register_component()

View file

@ -1,7 +1,3 @@
set(COMPONENT_SRCS "event_handlers.c" idf_component_register(SRCS "event_handlers.c" "tcpip_adapter_lwip.c"
"tcpip_adapter_lwip.c") INCLUDE_DIRS include
set(COMPONENT_ADD_INCLUDEDIRS "include") REQUIRES lwip ethernet)
set(COMPONENT_REQUIRES lwip)
register_component()

View file

@ -1,4 +1,3 @@
set(COMPONENT_SRCS "ulp.c" idf_component_register(SRCS "ulp.c"
"ulp_macro.c") "ulp_macro.c"
set(COMPONENT_ADD_INCLUDEDIRS "include") INCLUDE_DIRS include)
register_component()

View file

@ -1,9 +1,6 @@
set(COMPONENT_SRCDIRS ".") idf_component_register(SRC_DIRS "."
set(COMPONENT_ADD_INCLUDEDIRS ".") INCLUDE_DIRS "."
REQUIRES unity ulp soc esp_common)
set(COMPONENT_REQUIRES unity ulp soc esp_common)
register_component()
set(ulp_app_name ulp_test_app) set(ulp_app_name ulp_test_app)
set(ulp_s_sources "ulp/test_jumps.S") set(ulp_s_sources "ulp/test_jumps.S")

View file

@ -1,22 +1,20 @@
set(COMPONENT_SRCS "unity/src/unity.c" set(srcs "unity/src/unity.c"
"unity_port_esp32.c") "unity_port_esp32.c")
set(COMPONENT_ADD_INCLUDEDIRS "include"
"unity/src")
if(CONFIG_UNITY_ENABLE_BACKTRACE_ON_FAIL) if(CONFIG_UNITY_ENABLE_BACKTRACE_ON_FAIL)
list(APPEND COMPONENT_PRIV_INCLUDEDIRS "include/priv") list(APPEND COMPONENT_PRIV_INCLUDEDIRS "include/priv")
endif() endif()
if(CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER) if(CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER)
list(APPEND COMPONENT_SRCS "unity_runner.c") list(APPEND srcs "unity_runner.c")
endif() endif()
if(CONFIG_UNITY_ENABLE_FIXTURE) if(CONFIG_UNITY_ENABLE_FIXTURE)
list(APPEND COMPONENT_SRCS "unity/extras/fixture/src/unity_fixture.c") list(APPEND srcs "unity/extras/fixture/src/unity_fixture.c")
endif() endif()
register_component() idf_component_register(SRCS "${srcs}"
INCLUDE_DIRS "include" "unity/src")
target_compile_definitions(${COMPONENT_LIB} PUBLIC target_compile_definitions(${COMPONENT_LIB} PUBLIC
-DUNITY_INCLUDE_CONFIG_H -DUNITY_INCLUDE_CONFIG_H

View file

@ -1,8 +1,7 @@
set(COMPONENT_SRCS "vfs.c" idf_component_register(SRCS "vfs.c"
"vfs_uart.c" "vfs_uart.c"
"vfs_semihost.c") "vfs_semihost.c"
set(COMPONENT_ADD_INCLUDEDIRS "include") INCLUDE_DIRS include)
register_component()
# Some newlib syscalls are implemented in vfs.c, make sure these are always # Some newlib syscalls are implemented in vfs.c, make sure these are always
# seen by the linker # seen by the linker

View file

@ -1,8 +1,4 @@
set(COMPONENT_SRCDIRS ".") idf_component_register(SRC_DIRS "."
set(COMPONENT_ADD_INCLUDEDIRS ".") INCLUDE_DIRS "."
REQUIRES unity test_utils vfs fatfs spiffs
set(COMPONENT_REQUIRES unity test_utils vfs fatfs spiffs) LDFRAGMENTS linker.lf)
set(COMPONENT_ADD_LDFRAGMENTS linker.lf)
register_component()

View file

@ -1,11 +1,10 @@
set(COMPONENT_SRCS "Partition.cpp" idf_component_register(SRCS "Partition.cpp"
"SPI_Flash.cpp" "SPI_Flash.cpp"
"WL_Ext_Perf.cpp" "WL_Ext_Perf.cpp"
"WL_Ext_Safe.cpp" "WL_Ext_Safe.cpp"
"WL_Flash.cpp" "WL_Flash.cpp"
"crc32.cpp" "crc32.cpp"
"wear_levelling.cpp") "wear_levelling.cpp"
set(COMPONENT_ADD_INCLUDEDIRS "include") INCLUDE_DIRS include
set(COMPONENT_PRIV_INCLUDEDIRS private_include) PRIV_INCLUDE_DIRS private_include
set(COMPONENT_REQUIRES spi_flash) REQUIRES spi_flash)
register_component()

View file

@ -1,8 +1,4 @@
set(COMPONENT_SRCDIRS ".") idf_component_register(SRC_DIRS "."
set(COMPONENT_ADD_INCLUDEDIRS ".") INCLUDE_DIRS "."
REQUIRES unity test_utils wear_levelling
set(COMPONENT_REQUIRES unity test_utils wear_levelling) EMBED_FILES test_partition_v1.bin)
set(COMPONENT_EMBED_FILES test_partition_v1.bin)
register_component()

View file

@ -1,21 +1,20 @@
set(COMPONENT_ADD_INCLUDEDIRS include) set(srcs "src/wifi_config.c"
set(COMPONENT_PRIV_INCLUDEDIRS src proto-c ../protocomm/proto-c) "src/manager.c"
set(COMPONENT_SRCS "src/wifi_config.c" "src/handlers.c"
"src/manager.c" "src/scheme_softap.c"
"src/handlers.c" "src/scheme_console.c"
"src/scheme_softap.c" "proto-c/wifi_config.pb-c.c"
"src/scheme_console.c" "proto-c/wifi_constants.pb-c.c")
"proto-c/wifi_config.pb-c.c"
"proto-c/wifi_constants.pb-c.c")
set(COMPONENT_REQUIRES lwip protocomm)
set(COMPONENT_PRIV_REQUIRES protobuf-c bt mdns json)
if(CONFIG_BT_ENABLED) if(CONFIG_BT_ENABLED)
if(CONFIG_BT_BLUEDROID_ENABLED) if(CONFIG_BT_BLUEDROID_ENABLED)
list(APPEND COMPONENT_SRCS list(APPEND srcs
"src/scheme_ble.c") "src/scheme_ble.c")
endif() endif()
endif() endif()
register_component() idf_component_register(SRCS "${srcs}"
INCLUDE_DIRS include
PRIV_INCLUDE_DIRS src proto-c ../protocomm/proto-c
REQUIRES lwip protocomm
PRIV_REQUIRES protobuf-c bt mdns json)

View file

@ -1,83 +1,81 @@
set(COMPONENT_SRCS "port/os_xtensa.c" set(srcs "port/os_xtensa.c"
"src/crypto/aes-cbc.c" "src/crypto/aes-cbc.c"
"src/crypto/aes-internal-dec.c" "src/crypto/aes-internal-dec.c"
"src/crypto/aes-internal-enc.c" "src/crypto/aes-internal-enc.c"
"src/crypto/aes-internal.c" "src/crypto/aes-internal.c"
"src/crypto/aes-unwrap.c" "src/crypto/aes-unwrap.c"
"src/crypto/aes-wrap.c" "src/crypto/aes-wrap.c"
"src/crypto/bignum.c" "src/crypto/bignum.c"
"src/crypto/crypto_mbedtls.c" "src/crypto/crypto_mbedtls.c"
"src/crypto/crypto_internal-cipher.c" "src/crypto/crypto_internal-cipher.c"
"src/crypto/crypto_internal-modexp.c" "src/crypto/crypto_internal-modexp.c"
"src/crypto/crypto_internal-rsa.c" "src/crypto/crypto_internal-rsa.c"
"src/crypto/crypto_internal.c" "src/crypto/crypto_internal.c"
"src/crypto/des-internal.c" "src/crypto/des-internal.c"
"src/crypto/dh_group5.c" "src/crypto/dh_group5.c"
"src/crypto/dh_groups.c" "src/crypto/dh_groups.c"
"src/crypto/md4-internal.c" "src/crypto/md4-internal.c"
"src/crypto/md5-internal.c" "src/crypto/md5-internal.c"
"src/crypto/md5.c" "src/crypto/md5.c"
"src/crypto/ms_funcs.c" "src/crypto/ms_funcs.c"
"src/crypto/rc4.c" "src/crypto/rc4.c"
"src/crypto/sha1-internal.c" "src/crypto/sha1-internal.c"
"src/crypto/sha1-pbkdf2.c" "src/crypto/sha1-pbkdf2.c"
"src/crypto/sha1.c" "src/crypto/sha1.c"
"src/crypto/sha256-internal.c" "src/crypto/sha256-internal.c"
"src/crypto/sha256.c" "src/crypto/sha256.c"
"src/fast_crypto/fast_aes-cbc.c" "src/fast_crypto/fast_aes-cbc.c"
"src/fast_crypto/fast_aes-unwrap.c" "src/fast_crypto/fast_aes-unwrap.c"
"src/fast_crypto/fast_aes-wrap.c" "src/fast_crypto/fast_aes-wrap.c"
"src/fast_crypto/fast_crypto_internal-cipher.c" "src/fast_crypto/fast_crypto_internal-cipher.c"
"src/fast_crypto/fast_crypto_internal-modexp.c" "src/fast_crypto/fast_crypto_internal-modexp.c"
"src/fast_crypto/fast_crypto_internal.c" "src/fast_crypto/fast_crypto_internal.c"
"src/fast_crypto/fast_sha256-internal.c" "src/fast_crypto/fast_sha256-internal.c"
"src/fast_crypto/fast_sha256.c" "src/fast_crypto/fast_sha256.c"
"src/wpa2/eap_peer/chap.c" "src/wpa2/eap_peer/chap.c"
"src/wpa2/eap_peer/eap.c" "src/wpa2/eap_peer/eap.c"
"src/wpa2/eap_peer/eap_common.c" "src/wpa2/eap_peer/eap_common.c"
"src/wpa2/eap_peer/eap_mschapv2.c" "src/wpa2/eap_peer/eap_mschapv2.c"
"src/wpa2/eap_peer/eap_peap.c" "src/wpa2/eap_peer/eap_peap.c"
"src/wpa2/eap_peer/eap_peap_common.c" "src/wpa2/eap_peer/eap_peap_common.c"
"src/wpa2/eap_peer/eap_tls.c" "src/wpa2/eap_peer/eap_tls.c"
"src/wpa2/eap_peer/eap_tls_common.c" "src/wpa2/eap_peer/eap_tls_common.c"
"src/wpa2/eap_peer/eap_ttls.c" "src/wpa2/eap_peer/eap_ttls.c"
"src/wpa2/eap_peer/mschapv2.c" "src/wpa2/eap_peer/mschapv2.c"
"src/wpa2/tls/asn1.c" "src/wpa2/tls/asn1.c"
"src/wpa2/tls/bignum.c" "src/wpa2/tls/bignum.c"
"src/wpa2/tls/pkcs1.c" "src/wpa2/tls/pkcs1.c"
"src/wpa2/tls/pkcs5.c" "src/wpa2/tls/pkcs5.c"
"src/wpa2/tls/pkcs8.c" "src/wpa2/tls/pkcs8.c"
"src/wpa2/tls/rsa.c" "src/wpa2/tls/rsa.c"
"src/wpa2/tls/tls_internal.c" "src/wpa2/tls/tls_internal.c"
"src/wpa2/tls/tlsv1_client.c" "src/wpa2/tls/tlsv1_client.c"
"src/wpa2/tls/tlsv1_client_read.c" "src/wpa2/tls/tlsv1_client_read.c"
"src/wpa2/tls/tlsv1_client_write.c" "src/wpa2/tls/tlsv1_client_write.c"
"src/wpa2/tls/tlsv1_common.c" "src/wpa2/tls/tlsv1_common.c"
"src/wpa2/tls/tlsv1_cred.c" "src/wpa2/tls/tlsv1_cred.c"
"src/wpa2/tls/tlsv1_record.c" "src/wpa2/tls/tlsv1_record.c"
"src/wpa2/tls/tlsv1_server.c" "src/wpa2/tls/tlsv1_server.c"
"src/wpa2/tls/tlsv1_server_read.c" "src/wpa2/tls/tlsv1_server_read.c"
"src/wpa2/tls/tlsv1_server_write.c" "src/wpa2/tls/tlsv1_server_write.c"
"src/wpa2/tls/x509v3.c" "src/wpa2/tls/x509v3.c"
"src/wpa2/utils/base64.c" "src/wpa2/utils/base64.c"
"src/wpa2/utils/ext_password.c" "src/wpa2/utils/ext_password.c"
"src/wps/eap_common.c" "src/wps/eap_common.c"
"src/wps/uuid.c" "src/wps/uuid.c"
"src/wps/wps.c" "src/wps/wps.c"
"src/wps/wps_attr_build.c" "src/wps/wps_attr_build.c"
"src/wps/wps_attr_parse.c" "src/wps/wps_attr_parse.c"
"src/wps/wps_attr_process.c" "src/wps/wps_attr_process.c"
"src/wps/wps_common.c" "src/wps/wps_common.c"
"src/wps/wps_dev_attr.c" "src/wps/wps_dev_attr.c"
"src/wps/wps_enrollee.c" "src/wps/wps_enrollee.c"
"src/wps/wps_registrar.c" "src/wps/wps_registrar.c"
"src/wps/wps_validate.c") "src/wps/wps_validate.c")
set(COMPONENT_ADD_INCLUDEDIRS include port/include)
set(COMPONENT_REQUIRES "") idf_component_register(SRCS "${srcs}"
set(COMPONENT_PRIV_REQUIRES mbedtls) INCLUDE_DIRS include port/include
PRIV_REQUIRES mbedtls)
register_component()
target_compile_options(${COMPONENT_LIB} PRIVATE -Wno-strict-aliasing) target_compile_options(${COMPONENT_LIB} PRIVATE -Wno-strict-aliasing)
target_compile_definitions(${COMPONENT_LIB} PRIVATE target_compile_definitions(${COMPONENT_LIB} PRIVATE

View file

@ -1,6 +1,3 @@
set(COMPONENT_SRCDIRS ".") idf_component_register(SRC_DIRS "."
set(COMPONENT_ADD_INCLUDEDIRS ".") INCLUDE_DIRS "."
REQUIRES unity wpa_supplicant mbedtls)
set(COMPONENT_REQUIRES unity wpa_supplicant mbedtls)
register_component()

View file

@ -1,10 +1,7 @@
set(COMPONENT_SRCS "eri.c" "trax.c" "debug_helpers.c" "debug_helpers_asm.S") idf_build_get_property(target IDF_TARGET)
idf_component_register(SRCS "eri.c" "trax.c" "debug_helpers.c" "debug_helpers_asm.S"
INCLUDE_DIRS include ${target}/include
LDFRAGMENTS linker.lf
PRIV_REQUIRES soc)
set(COMPONENT_ADD_INCLUDEDIRS "include" "${IDF_TARGET}/include") target_link_libraries(${COMPONENT_LIB} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/${target}/libhal.a")
set(COMPONENT_ADD_LDFRAGMENTS linker.lf)
set(COMPONENT_PRIV_REQUIRES soc)
register_component()
target_link_libraries(${COMPONENT_LIB} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/${IDF_TARGET}/libhal.a")