cmake: make main a component again

This commit is contained in:
Renz Christian Bagaporo 2018-09-11 09:44:12 +08:00 committed by Angus Gratton
parent f9bed53ea2
commit d9939cedd9
282 changed files with 1740 additions and 673 deletions

View File

@ -1,4 +1,7 @@
set(COMPONENT_SRCDIRS "." "gcov")
set(COMPONENT_SRCS "app_trace.c"
"app_trace_util.c"
"gcov/gcov_rtio.c"
"host_file_io.c")
set(COMPONENT_ADD_INCLUDEDIRS "include")
if(CONFIG_SYSVIEW_ENABLE)
@ -7,11 +10,10 @@ if(CONFIG_SYSVIEW_ENABLE)
sys_view/SEGGER
sys_view/Sample/OS)
list(APPEND COMPONENT_SRCDIRS
"sys_view/SEGGER"
"sys_view/Sample/OS"
"sys_view/Sample/Config"
"sys_view/esp32")
set(COMPONENT_SRCS "SEGGER/SEGGER_SYSVIEW.c"
"esp32/SEGGER_RTT_esp32.c"
"Sample/Config/SEGGER_SYSVIEW_Config_FreeRTOS.c"
"Sample/OS/SEGGER_SYSVIEW_FreeRTOS.c")
endif()
set(COMPONENT_REQUIRES)

View File

@ -1,4 +1,4 @@
set(COMPONENT_SRCDIRS ".")
set(COMPONENT_SRCS "esp_ota_ops.c")
set(COMPONENT_ADD_INCLUDEDIRS "include")
set(COMPONENT_REQUIRES spi_flash partition_table)

View File

@ -1,7 +1,5 @@
set(COMPONENT_ADD_INCLUDEDIRS asio/asio/include port/include)
set(COMPONENT_SRCDIRS asio/asio/src)
set(COMPONENT_SRCEXCLUDE asio/asio/src/asio_ssl.cpp)
set(COMPONENT_SRCS "asio/asio/src/asio.cpp")
set(COMPONENT_REQUIRES lwip)

View File

@ -1,6 +1,25 @@
if(CONFIG_AWS_IOT_SDK)
set(COMPONENT_ADD_INCLUDEDIRS "include aws-iot-device-sdk-embedded-C/include")
set(COMPONENT_SRCDIRS "aws-iot-device-sdk-embedded-C/src port")
set(aws_sdk_dir aws-iot-device-sdk-embedded-C/src)
set(COMPONENT_SRCS "${aws_sdk_dir}/aws_iot_jobs_interface.c"
"${aws_sdk_dir}/aws_iot_jobs_json.c"
"${aws_sdk_dir}/aws_iot_jobs_topics.c"
"${aws_sdk_dir}/aws_iot_jobs_types.c"
"${aws_sdk_dir}/aws_iot_json_utils.c"
"${aws_sdk_dir}/aws_iot_mqtt_client.c"
"${aws_sdk_dir}/aws_iot_mqtt_client_common_internal.c"
"${aws_sdk_dir}/aws_iot_mqtt_client_connect.c"
"${aws_sdk_dir}/aws_iot_mqtt_client_publish.c"
"${aws_sdk_dir}/aws_iot_mqtt_client_subscribe.c"
"${aws_sdk_dir}/aws_iot_mqtt_client_unsubscribe.c"
"${aws_sdk_dir}/aws_iot_mqtt_client_yield.c"
"${aws_sdk_dir}/aws_iot_shadow.c"
"${aws_sdk_dir}/aws_iot_shadow_actions.c"
"${aws_sdk_dir}/aws_iot_shadow_json.c"
"${aws_sdk_dir}/aws_iot_shadow_records.c"
"port/network_mbedtls_wrapper.c"
"port/threads_freertos.c"
"port/timer.c")
else()
message(STATUS "Building empty aws_iot component due to configuration")
endif()

View File

@ -10,14 +10,12 @@ if(NOT IDF_PATH)
"in by the parent build process.")
endif()
set(COMPONENTS bootloader esptool_py esp32 partition_table soc bootloader_support log spi_flash micro-ecc soc)
set(COMPONENTS bootloader esptool_py esp32 partition_table soc bootloader_support log spi_flash micro-ecc soc main)
set(BOOTLOADER_BUILD 1)
add_definitions(-DBOOTLOADER_BUILD=1)
set(COMPONENT_REQUIRES_COMMON log esp32 soc)
set(MAIN_SRCS main/bootloader_start.c)
include("${IDF_PATH}/tools/cmake/project.cmake")
project(bootloader)

View File

@ -0,0 +1,4 @@
set(COMPONENT_SRCS "bootloader_start.c")
set(COMPONENT_ADD_INCLUDEDIRS "")
set(COMPONENT_REQUIRES "bootloader bootloader_support")
register_component()

View File

@ -1,4 +1,17 @@
set(COMPONENT_SRCDIRS "src")
set(COMPONENT_SRCS "src/bootloader_clock.c"
"src/bootloader_common.c"
"src/bootloader_flash.c"
"src/bootloader_init.c"
"src/bootloader_random.c"
"src/bootloader_sha.c"
"src/bootloader_utility.c"
"src/efuse.c"
"src/esp_image_format.c"
"src/flash_encrypt.c"
"src/flash_partitions.c"
"src/flash_qio_mode.c"
"src/secure_boot.c"
"src/secure_boot_signatures.c")
if(${BOOTLOADER_BUILD})
set(COMPONENT_ADD_INCLUDEDIRS "include include_bootloader")

View File

@ -1,6 +1,6 @@
if(CONFIG_BT_ENABLED)
set(COMPONENT_SRCDIRS .)
set(COMPONENT_SRCS "bt.c")
set(COMPONENT_ADD_INCLUDEDIRS include)
if(CONFIG_BLUEDROID_ENABLED)
@ -41,43 +41,234 @@ if(CONFIG_BT_ENABLED)
list(APPEND COMPONENT_ADD_INCLUDEDIRS bluedroid/api/include/api)
list(APPEND COMPONENT_SRCDIRS
bluedroid/bta/dm
bluedroid/bta/gatt
bluedroid/bta/hh
bluedroid/bta/sdp
bluedroid/bta/av
bluedroid/bta/ar
bluedroid/bta/sys
bluedroid/bta/jv
bluedroid/device
bluedroid/hci
bluedroid/main
bluedroid/osi
bluedroid/external/sbc/decoder/srce
bluedroid/external/sbc/encoder/srce
bluedroid/btc/core
bluedroid/btc/profile/esp/blufi
bluedroid/btc/profile/std/gap
bluedroid/btc/profile/std/gatt
bluedroid/btc/profile/std/a2dp
bluedroid/btc/profile/std/avrc
bluedroid/btc/profile/std/spp
bluedroid/stack/btm
bluedroid/stack/btu
bluedroid/stack/gap
bluedroid/stack/gatt
bluedroid/stack/hcic
bluedroid/stack/l2cap
bluedroid/stack/sdp
bluedroid/stack/smp
bluedroid/stack/avct
bluedroid/stack/avrc
bluedroid/stack/avdt
bluedroid/stack/a2dp
bluedroid/stack/rfcomm
bluedroid/api
)
list(APPEND COMPONENT_SRCS "bluedroid/api/esp_a2dp_api.c"
"bluedroid/api/esp_avrc_api.c"
"bluedroid/api/esp_blufi_api.c"
"bluedroid/api/esp_bt_device.c"
"bluedroid/api/esp_bt_main.c"
"bluedroid/api/esp_gap_ble_api.c"
"bluedroid/api/esp_gap_bt_api.c"
"bluedroid/api/esp_gatt_common_api.c"
"bluedroid/api/esp_gattc_api.c"
"bluedroid/api/esp_gatts_api.c"
"bluedroid/api/esp_hf_client_api.c"
"bluedroid/api/esp_spp_api.c"
"bluedroid/bta/ar/bta_ar.c"
"bluedroid/bta/av/bta_av_aact.c"
"bluedroid/bta/av/bta_av_act.c"
"bluedroid/bta/av/bta_av_api.c"
"bluedroid/bta/av/bta_av_cfg.c"
"bluedroid/bta/av/bta_av_ci.c"
"bluedroid/bta/av/bta_av_main.c"
"bluedroid/bta/av/bta_av_sbc.c"
"bluedroid/bta/av/bta_av_ssm.c"
"bluedroid/bta/dm/bta_dm_act.c"
"bluedroid/bta/dm/bta_dm_api.c"
"bluedroid/bta/dm/bta_dm_cfg.c"
"bluedroid/bta/dm/bta_dm_ci.c"
"bluedroid/bta/dm/bta_dm_co.c"
"bluedroid/bta/dm/bta_dm_main.c"
"bluedroid/bta/dm/bta_dm_pm.c"
"bluedroid/bta/dm/bta_dm_sco.c"
"bluedroid/bta/gatt/bta_gatt_common.c"
"bluedroid/bta/gatt/bta_gattc_act.c"
"bluedroid/bta/gatt/bta_gattc_api.c"
"bluedroid/bta/gatt/bta_gattc_cache.c"
"bluedroid/bta/gatt/bta_gattc_ci.c"
"bluedroid/bta/gatt/bta_gattc_co.c"
"bluedroid/bta/gatt/bta_gattc_main.c"
"bluedroid/bta/gatt/bta_gattc_utils.c"
"bluedroid/bta/gatt/bta_gatts_act.c"
"bluedroid/bta/gatt/bta_gatts_api.c"
"bluedroid/bta/gatt/bta_gatts_co.c"
"bluedroid/bta/gatt/bta_gatts_main.c"
"bluedroid/bta/gatt/bta_gatts_utils.c"
"bluedroid/bta/hh/bta_hh_act.c"
"bluedroid/bta/hh/bta_hh_api.c"
"bluedroid/bta/hh/bta_hh_cfg.c"
"bluedroid/bta/hh/bta_hh_le.c"
"bluedroid/bta/hh/bta_hh_main.c"
"bluedroid/bta/hh/bta_hh_utils.c"
"bluedroid/bta/jv/bta_jv_act.c"
"bluedroid/bta/jv/bta_jv_api.c"
"bluedroid/bta/jv/bta_jv_cfg.c"
"bluedroid/bta/jv/bta_jv_main.c"
"bluedroid/bta/sdp/bta_sdp.c"
"bluedroid/bta/sdp/bta_sdp_act.c"
"bluedroid/bta/sdp/bta_sdp_api.c"
"bluedroid/bta/sdp/bta_sdp_cfg.c"
"bluedroid/bta/sys/bta_sys_conn.c"
"bluedroid/bta/sys/bta_sys_main.c"
"bluedroid/bta/sys/utl.c"
"bluedroid/btc/core/btc_alarm.c"
"bluedroid/btc/core/btc_ble_storage.c"
"bluedroid/btc/core/btc_config.c"
"bluedroid/btc/core/btc_dev.c"
"bluedroid/btc/core/btc_dm.c"
"bluedroid/btc/core/btc_main.c"
"bluedroid/btc/core/btc_manage.c"
"bluedroid/btc/core/btc_profile_queue.c"
"bluedroid/btc/core/btc_sec.c"
"bluedroid/btc/core/btc_sm.c"
"bluedroid/btc/core/btc_storage.c"
"bluedroid/btc/core/btc_task.c"
"bluedroid/btc/core/btc_util.c"
"bluedroid/btc/profile/esp/blufi/blufi_prf.c"
"bluedroid/btc/profile/esp/blufi/blufi_protocol.c"
"bluedroid/btc/profile/std/a2dp/bta_av_co.c"
"bluedroid/btc/profile/std/a2dp/btc_a2dp.c"
"bluedroid/btc/profile/std/a2dp/btc_a2dp_control.c"
"bluedroid/btc/profile/std/a2dp/btc_a2dp_sink.c"
"bluedroid/btc/profile/std/a2dp/btc_a2dp_source.c"
"bluedroid/btc/profile/std/a2dp/btc_av.c"
"bluedroid/btc/profile/std/avrc/btc_avrc.c"
"bluedroid/btc/profile/std/gap/btc_gap_ble.c"
"bluedroid/btc/profile/std/gap/btc_gap_bt.c"
"bluedroid/btc/profile/std/gatt/btc_gatt_common.c"
"bluedroid/btc/profile/std/gatt/btc_gatt_util.c"
"bluedroid/btc/profile/std/gatt/btc_gattc.c"
"bluedroid/btc/profile/std/gatt/btc_gatts.c"
"bluedroid/btc/profile/std/spp/btc_spp.c"
"bluedroid/device/bdaddr.c"
"bluedroid/device/controller.c"
"bluedroid/device/interop.c"
"bluedroid/external/sbc/decoder/srce/alloc.c"
"bluedroid/external/sbc/decoder/srce/bitalloc-sbc.c"
"bluedroid/external/sbc/decoder/srce/bitalloc.c"
"bluedroid/external/sbc/decoder/srce/bitstream-decode.c"
"bluedroid/external/sbc/decoder/srce/decoder-oina.c"
"bluedroid/external/sbc/decoder/srce/decoder-private.c"
"bluedroid/external/sbc/decoder/srce/decoder-sbc.c"
"bluedroid/external/sbc/decoder/srce/dequant.c"
"bluedroid/external/sbc/decoder/srce/framing-sbc.c"
"bluedroid/external/sbc/decoder/srce/framing.c"
"bluedroid/external/sbc/decoder/srce/oi_codec_version.c"
"bluedroid/external/sbc/decoder/srce/synthesis-8-generated.c"
"bluedroid/external/sbc/decoder/srce/synthesis-dct8.c"
"bluedroid/external/sbc/decoder/srce/synthesis-sbc.c"
"bluedroid/external/sbc/encoder/srce/sbc_analysis.c"
"bluedroid/external/sbc/encoder/srce/sbc_dct.c"
"bluedroid/external/sbc/encoder/srce/sbc_dct_coeffs.c"
"bluedroid/external/sbc/encoder/srce/sbc_enc_bit_alloc_mono.c"
"bluedroid/external/sbc/encoder/srce/sbc_enc_bit_alloc_ste.c"
"bluedroid/external/sbc/encoder/srce/sbc_enc_coeffs.c"
"bluedroid/external/sbc/encoder/srce/sbc_encoder.c"
"bluedroid/external/sbc/encoder/srce/sbc_packing.c"
"bluedroid/hci/buffer_allocator.c"
"bluedroid/hci/hci_audio.c"
"bluedroid/hci/hci_hal_h4.c"
"bluedroid/hci/hci_layer.c"
"bluedroid/hci/hci_packet_factory.c"
"bluedroid/hci/hci_packet_parser.c"
"bluedroid/hci/packet_fragmenter.c"
"bluedroid/main/bte_init.c"
"bluedroid/main/bte_main.c"
"bluedroid/osi/alarm.c"
"bluedroid/osi/allocator.c"
"bluedroid/osi/buffer.c"
"bluedroid/osi/config.c"
"bluedroid/osi/fixed_queue.c"
"bluedroid/osi/future.c"
"bluedroid/osi/hash_functions.c"
"bluedroid/osi/hash_map.c"
"bluedroid/osi/list.c"
"bluedroid/osi/mutex.c"
"bluedroid/osi/osi.c"
"bluedroid/osi/semaphore.c"
"bluedroid/stack/a2dp/a2d_api.c"
"bluedroid/stack/a2dp/a2d_sbc.c"
"bluedroid/stack/avct/avct_api.c"
"bluedroid/stack/avct/avct_ccb.c"
"bluedroid/stack/avct/avct_l2c.c"
"bluedroid/stack/avct/avct_lcb.c"
"bluedroid/stack/avct/avct_lcb_act.c"
"bluedroid/stack/avdt/avdt_ad.c"
"bluedroid/stack/avdt/avdt_api.c"
"bluedroid/stack/avdt/avdt_ccb.c"
"bluedroid/stack/avdt/avdt_ccb_act.c"
"bluedroid/stack/avdt/avdt_l2c.c"
"bluedroid/stack/avdt/avdt_msg.c"
"bluedroid/stack/avdt/avdt_scb.c"
"bluedroid/stack/avdt/avdt_scb_act.c"
"bluedroid/stack/avrc/avrc_api.c"
"bluedroid/stack/avrc/avrc_bld_ct.c"
"bluedroid/stack/avrc/avrc_bld_tg.c"
"bluedroid/stack/avrc/avrc_opt.c"
"bluedroid/stack/avrc/avrc_pars_ct.c"
"bluedroid/stack/avrc/avrc_pars_tg.c"
"bluedroid/stack/avrc/avrc_sdp.c"
"bluedroid/stack/avrc/avrc_utils.c"
"bluedroid/stack/btm/btm_acl.c"
"bluedroid/stack/btm/btm_ble.c"
"bluedroid/stack/btm/btm_ble_addr.c"
"bluedroid/stack/btm/btm_ble_adv_filter.c"
"bluedroid/stack/btm/btm_ble_batchscan.c"
"bluedroid/stack/btm/btm_ble_bgconn.c"
"bluedroid/stack/btm/btm_ble_cont_energy.c"
"bluedroid/stack/btm/btm_ble_gap.c"
"bluedroid/stack/btm/btm_ble_multi_adv.c"
"bluedroid/stack/btm/btm_ble_privacy.c"
"bluedroid/stack/btm/btm_dev.c"
"bluedroid/stack/btm/btm_devctl.c"
"bluedroid/stack/btm/btm_inq.c"
"bluedroid/stack/btm/btm_main.c"
"bluedroid/stack/btm/btm_pm.c"
"bluedroid/stack/btm/btm_sco.c"
"bluedroid/stack/btm/btm_sec.c"
"bluedroid/stack/btu/btu_hcif.c"
"bluedroid/stack/btu/btu_init.c"
"bluedroid/stack/btu/btu_task.c"
"bluedroid/stack/gap/gap_api.c"
"bluedroid/stack/gap/gap_ble.c"
"bluedroid/stack/gap/gap_conn.c"
"bluedroid/stack/gap/gap_utils.c"
"bluedroid/stack/gatt/att_protocol.c"
"bluedroid/stack/gatt/gatt_api.c"
"bluedroid/stack/gatt/gatt_attr.c"
"bluedroid/stack/gatt/gatt_auth.c"
"bluedroid/stack/gatt/gatt_cl.c"
"bluedroid/stack/gatt/gatt_db.c"
"bluedroid/stack/gatt/gatt_main.c"
"bluedroid/stack/gatt/gatt_sr.c"
"bluedroid/stack/gatt/gatt_utils.c"
"bluedroid/stack/hcic/hciblecmds.c"
"bluedroid/stack/hcic/hcicmds.c"
"bluedroid/stack/l2cap/l2c_api.c"
"bluedroid/stack/l2cap/l2c_ble.c"
"bluedroid/stack/l2cap/l2c_csm.c"
"bluedroid/stack/l2cap/l2c_fcr.c"
"bluedroid/stack/l2cap/l2c_link.c"
"bluedroid/stack/l2cap/l2c_main.c"
"bluedroid/stack/l2cap/l2c_ucd.c"
"bluedroid/stack/l2cap/l2c_utils.c"
"bluedroid/stack/l2cap/l2cap_client.c"
"bluedroid/stack/rfcomm/port_api.c"
"bluedroid/stack/rfcomm/port_rfc.c"
"bluedroid/stack/rfcomm/port_utils.c"
"bluedroid/stack/rfcomm/rfc_l2cap_if.c"
"bluedroid/stack/rfcomm/rfc_mx_fsm.c"
"bluedroid/stack/rfcomm/rfc_port_fsm.c"
"bluedroid/stack/rfcomm/rfc_port_if.c"
"bluedroid/stack/rfcomm/rfc_ts_frames.c"
"bluedroid/stack/rfcomm/rfc_utils.c"
"bluedroid/stack/sdp/sdp_api.c"
"bluedroid/stack/sdp/sdp_db.c"
"bluedroid/stack/sdp/sdp_discovery.c"
"bluedroid/stack/sdp/sdp_main.c"
"bluedroid/stack/sdp/sdp_server.c"
"bluedroid/stack/sdp/sdp_utils.c"
"bluedroid/stack/smp/aes.c"
"bluedroid/stack/smp/p_256_curvepara.c"
"bluedroid/stack/smp/p_256_ecc_pp.c"
"bluedroid/stack/smp/p_256_multprecision.c"
"bluedroid/stack/smp/smp_act.c"
"bluedroid/stack/smp/smp_api.c"
"bluedroid/stack/smp/smp_br_main.c"
"bluedroid/stack/smp/smp_cmac.c"
"bluedroid/stack/smp/smp_keys.c"
"bluedroid/stack/smp/smp_l2c.c"
"bluedroid/stack/smp/smp_main.c"
"bluedroid/stack/smp/smp_utils.c")
endif()
endif()

View File

@ -1,5 +1,8 @@
set(COMPONENT_ADD_INCLUDEDIRS .)
set(COMPONENT_SRCDIRS linenoise argtable3 .)
set(COMPONENT_SRCS "argtable3/argtable3.c"
"commands.c"
"linenoise/linenoise.c"
"split_argv.c")
set(COMPONENT_REQUIRES)

View File

@ -1,4 +1,5 @@
set(COMPONENT_SRCDIRS ".")
set(COMPONENT_SRCS "cxx_exception_stubs.cpp"
"cxx_guards.cpp")
set(COMPONENT_REQUIRES)
register_component()

View File

@ -1,4 +1,25 @@
set(COMPONENT_SRCDIRS ".")
set(COMPONENT_SRCS "can.c"
"gpio.c"
"i2c.c"
"i2s.c"
"ledc.c"
"mcpwm.c"
"pcnt.c"
"periph_ctrl.c"
"rmt.c"
"rtc_module.c"
"sdio_slave.c"
"sdmmc_host.c"
"sdmmc_transaction.c"
"sdspi_crc.c"
"sdspi_host.c"
"sdspi_transaction.c"
"sigmadelta.c"
"spi_common.c"
"spi_master.c"
"spi_slave.c"
"timer.c"
"uart.c")
set(COMPONENT_ADD_INCLUDEDIRS "include")
set(COMPONENT_PRIV_INCLUDEDIRS "include/driver")

View File

@ -1,4 +1,4 @@
set(COMPONENT_SRCDIRS ".")
set(COMPONENT_SRCS "esp_tls.c")
set(COMPONENT_ADD_INCLUDEDIRS ".")
set(COMPONENT_REQUIRES mbedtls)

View File

@ -2,7 +2,7 @@ if(BOOTLOADER_BUILD)
# For bootloader, all we need from esp32 is headers
set(COMPONENT_ADD_INCLUDEDIRS include)
set(COMPONENT_REQUIRES ${COMPONENTS})
set(COMPONENT_SRCDIRS "")
set(COMPONENT_SRCS )
register_component(esp32)
# as cmake won't attach linker args to a header-only library, attach
@ -17,7 +17,47 @@ if(BOOTLOADER_BUILD)
else()
# Regular app build
set(COMPONENT_SRCDIRS ". hwcrypto")
set(COMPONENT_SRCS "brownout.c"
"cache_err_int.c"
"clk.c"
"coexist.c"
"core_dump.c"
"cpu_start.c"
"crosscore_int.c"
"dbg_stubs.c"
"dport_access.c"
"dport_panic_highint_hdl.S"
"esp_err_to_name.c"
"esp_timer.c"
"esp_timer_esp32.c"
"ets_timer_legacy.c"
"event_default_handlers.c"
"event_loop.c"
"fast_crypto_ops.c"
"freertos_hooks.c"
"gdbstub.c"
"hw_random.c"
"hwcrypto/aes.c"
"hwcrypto/sha.c"
"int_wdt.c"
"intr_alloc.c"
"ipc.c"
"lib_printf.c"
"panic.c"
"phy_init.c"
"pm_esp32.c"
"pm_locks.c"
"pm_trace.c"
"reset_reason.c"
"restore.c"
"sleep_modes.c"
"spiram.c"
"spiram_psram.c"
"stack_check.c"
"system_api.c"
"task_wdt.c"
"wifi_init.c"
"wifi_os_adapter.c")
set(COMPONENT_ADD_INCLUDEDIRS "include")
set(COMPONENT_REQUIRES driver tcpip_adapter)

View File

@ -1,4 +1,4 @@
set(COMPONENT_SRCDIRS ".")
set(COMPONENT_SRCS "esp_adc_cal.c")
set(COMPONENT_ADD_INCLUDEDIRS "include")
set(COMPONENT_REQUIRES)

View File

@ -1,4 +1,10 @@
set(COMPONENT_SRCDIRS "." "lib")
set(COMPONENT_SRCS "esp_http_client.c"
"lib/http_auth.c"
"lib/http_header.c"
"lib/http_utils.c"
"lib/transport.c"
"lib/transport_ssl.c"
"lib/transport_tcp.c")
set(COMPONENT_ADD_INCLUDEDIRS "include")
set(COMPONENT_PRIV_INCLUDEDIRS "lib/include")

View File

@ -1,5 +1,5 @@
set(COMPONENT_ADD_INCLUDEDIRS include)
set(COMPONENT_SRCDIRS "src")
set(COMPONENT_SRCS "src/esp_https_ota.c")
set(COMPONENT_REQUIRES esp_http_client)
set(COMPONENT_PRIV_REQUIRES log app_update)

View File

@ -1,4 +1,8 @@
set(COMPONENT_SRCDIRS . eth_phy)
set(COMPONENT_SRCS "emac_dev.c"
"emac_main.c"
"eth_phy/phy_common.c"
"eth_phy/phy_lan8720.c"
"eth_phy/phy_tlk110.c")
set(COMPONENT_ADD_INCLUDEDIRS "include")
set(COMPONENT_REQUIRES)

View File

@ -1,5 +1,10 @@
set(COMPONENT_ADD_INCLUDEDIRS expat/expat/lib port/include)
set(COMPONENT_SRCDIRS expat/expat/lib)
set(COMPONENT_SRCS "expat/expat/lib/loadlibrary.c"
"expat/expat/lib/xmlparse.c"
"expat/expat/lib/xmlrole.c"
"expat/expat/lib/xmltok.c"
"expat/expat/lib/xmltok_impl.c"
"expat/expat/lib/xmltok_ns.c")
set(COMPONENT_REQUIRES)

View File

@ -1,4 +1,13 @@
set(COMPONENT_SRCDIRS src)
set(COMPONENT_SRCS "src/diskio.c"
"src/diskio_rawflash.c"
"src/diskio_sdmmc.c"
"src/diskio_wl.c"
"src/ff.c"
"src/ffsystem.c"
"src/ffunicode.c"
"src/vfs_fat.c"
"src/vfs_fat_sdmmc.c"
"src/vfs_fat_spiflash.c")
set(COMPONENT_ADD_INCLUDEDIRS src)
set(COMPONENT_REQUIRES wear_levelling sdmmc)

View File

@ -1,6 +1,22 @@
set(COMPONENT_ADD_INCLUDEDIRS include)
set(COMPONENT_PRIV_INCLUDEDIRS include/freertos)
set(COMPONENT_SRCDIRS ".")
set(COMPONENT_SRCS "FreeRTOS-openocd.c"
"croutine.c"
"event_groups.c"
"list.c"
"port.c"
"portasm.S"
"queue.c"
"ringbuf.c"
"tasks.c"
"timers.c"
"xtensa_context.S"
"xtensa_init.c"
"xtensa_intr.c"
"xtensa_intr_asm.S"
"xtensa_overlay_os_hook.c"
"xtensa_vector_defaults.S"
"xtensa_vectors.S")
set(COMPONENT_REQUIRES)
register_component()

View File

@ -1,4 +1,7 @@
set(COMPONENT_SRCS heap_caps_init.c heap_caps.c multi_heap.c heap_trace.c)
set(COMPONENT_SRCS "heap_caps.c"
"heap_caps_init.c"
"heap_trace.c"
"multi_heap.c")
if(NOT CONFIG_HEAP_POISONING_DISABLED)
set(COMPONENT_SRCS ${COMPONENT_SRCS} multi_heap_poisoning.c)

View File

@ -1,6 +1,11 @@
set(COMPONENT_ADD_INCLUDEDIRS include)
set(COMPONENT_PRIV_INCLUDEDIRS src/port/esp32 src/util)
set(COMPONENT_SRCDIRS src src/util)
set(COMPONENT_SRCS "src/httpd_main.c"
"src/httpd_parse.c"
"src/httpd_sess.c"
"src/httpd_txrx.c"
"src/httpd_uri.c"
"src/util/ctrl_sock.c")
set(COMPONENT_REQUIRES nghttp) # for http_parser.h
set(COMPONENT_PRIV_REQUIRES lwip)

View File

@ -1,4 +1,4 @@
set(COMPONENT_SRCDIRS "src")
set(COMPONENT_SRCS "src/jsmn.c")
set(COMPONENT_ADD_INCLUDEDIRS "include")
set(COMPONENT_REQUIRES "")

View File

@ -1,4 +1,6 @@
set(COMPONENT_SRCDIRS cJSON)
set(COMPONENT_SRCS "cJSON/cJSON.c"
"cJSON/cJSON_Utils.c"
"cJSON/test.c")
set(COMPONENT_ADD_INCLUDEDIRS cJSON)
set(COMPONENT_REQUIRES "")

View File

@ -2,71 +2,217 @@ set(SRC libsodium/src/libsodium)
set(COMPONENT_REQUIRES "mbedtls")
set(COMPONENT_SRCDIRS
port
set(COMPONENT_SRCS
"port/randombytes_esp32.c"
"port/crypto_hash_mbedtls/crypto_hash_sha512_mbedtls.c"
"port/crypto_hash_mbedtls/crypto_hash_sha256_mbedtls.c"
# Derived from libsodium/src/libsodium/Makefile.am
# (ignoring the !MINIMAL set)
${SRC}/crypto_aead/chacha20poly1305/sodium
${SRC}/crypto_aead/xchacha20poly1305/sodium
${SRC}/crypto_auth
${SRC}/crypto_auth/hmacsha256
${SRC}/crypto_auth/hmacsha512
${SRC}/crypto_auth/hmacsha512256
${SRC}/crypto_box
${SRC}/crypto_box/curve25519xsalsa20poly1305
${SRC}/crypto_core/curve25519/ref10
${SRC}/crypto_core/hchacha20
${SRC}/crypto_core/hsalsa20/ref2
${SRC}/crypto_core/hsalsa20
${SRC}/crypto_core/salsa/ref
${SRC}/crypto_generichash
${SRC}/crypto_generichash/blake2b
${SRC}/crypto_generichash/blake2b/ref
${SRC}/crypto_hash
${SRC}/crypto_hash/sha256
${SRC}/crypto_hash/sha512
${SRC}/crypto_kdf/blake2b
${SRC}/crypto_kdf
${SRC}/crypto_kx
${SRC}/crypto_onetimeauth
${SRC}/crypto_onetimeauth/poly1305
${SRC}/crypto_onetimeauth/poly1305/donna
${SRC}/crypto_pwhash/argon2
${SRC}/crypto_pwhash
${SRC}/crypto_pwhash/scryptsalsa208sha256
${SRC}/crypto_pwhash/scryptsalsa208sha256/nosse
${SRC}/crypto_scalarmult
${SRC}/crypto_scalarmult/curve25519
${SRC}/crypto_scalarmult/curve25519/ref10
${SRC}/crypto_secretbox
${SRC}/crypto_secretbox/xsalsa20poly1305
${SRC}/crypto_shorthash
${SRC}/crypto_shorthash/siphash24
${SRC}/crypto_shorthash/siphash24/ref
${SRC}/crypto_sign
${SRC}/crypto_sign/ed25519
${SRC}/crypto_sign/ed25519/ref10
${SRC}/crypto_stream/chacha20
${SRC}/crypto_stream/chacha20/ref
${SRC}/crypto_stream
${SRC}/crypto_stream/salsa20
${SRC}/crypto_stream/salsa20/ref
${SRC}/crypto_stream/xsalsa20
${SRC}/crypto_verify/sodium
${SRC}/randombytes
${SRC}/sodium
"${SRC}/crypto_aead/chacha20poly1305/sodium/aead_chacha20poly1305.c"
"${SRC}/crypto_aead/xchacha20poly1305/sodium/aead_xchacha20poly1305.c"
"${SRC}/crypto_auth/crypto_auth.c"
"${SRC}/crypto_auth/hmacsha256/auth_hmacsha256.c"
"${SRC}/crypto_auth/hmacsha512/auth_hmacsha512.c"
"${SRC}/crypto_auth/hmacsha512256/auth_hmacsha512256.c"
"${SRC}/crypto_auth/hmacsha256/auth_hmacsha256.c"
"${SRC}/crypto_auth/hmacsha512/auth_hmacsha512.c"
"${SRC}/crypto_auth/hmacsha512256/auth_hmacsha512256.c"
"${SRC}/crypto_box/crypto_box.c"
"${SRC}/crypto_box/crypto_box_seal.c"
"${SRC}/crypto_box/crypto_box_easy.c"
"${SRC}/crypto_box/curve25519xchacha20poly1305/box_curve25519xchacha20poly1305.c"
"${SRC}/crypto_box/curve25519xsalsa20poly1305/box_curve25519xsalsa20poly1305.c"
"${SRC}/crypto_box/curve25519xsalsa20poly1305/box_curve25519xsalsa20poly1305.c"
"${SRC}/crypto_core/curve25519/ref10/curve25519_ref10.c"
"${SRC}/crypto_core/hchacha20/core_hchacha20.c"
"${SRC}/crypto_core/hsalsa20/ref2/core_hsalsa20_ref2.c"
"${SRC}/crypto_core/hsalsa20/core_hsalsa20.c"
"${SRC}/crypto_core/hsalsa20/ref2/core_hsalsa20_ref2.c"
"${SRC}/crypto_core/salsa/ref/core_salsa_ref.c"
"${SRC}/crypto_generichash/crypto_generichash.c"
"${SRC}/crypto_generichash/blake2b/generichash_blake2.c"
"${SRC}/crypto_generichash/blake2b/ref/blake2b-ref.c"
"${SRC}/crypto_generichash/blake2b/ref/blake2b-compress-sse41.c"
"${SRC}/crypto_generichash/blake2b/ref/generichash_blake2b.c"
"${SRC}/crypto_generichash/blake2b/ref/blake2b-compress-ssse3.c"
"${SRC}/crypto_generichash/blake2b/ref/blake2b-compress-avx2.c"
"${SRC}/crypto_generichash/blake2b/ref/blake2b-compress-ref.c"
"${SRC}/crypto_generichash/blake2b/generichash_blake2.c"
"${SRC}/crypto_generichash/blake2b/ref/blake2b-ref.c"
"${SRC}/crypto_generichash/blake2b/ref/blake2b-compress-sse41.c"
"${SRC}/crypto_generichash/blake2b/ref/generichash_blake2b.c"
"${SRC}/crypto_generichash/blake2b/ref/blake2b-compress-ssse3.c"
"${SRC}/crypto_generichash/blake2b/ref/blake2b-compress-avx2.c"
"${SRC}/crypto_generichash/blake2b/ref/blake2b-compress-ref.c"
"${SRC}/crypto_generichash/blake2b/ref/blake2b-ref.c"
"${SRC}/crypto_generichash/blake2b/ref/blake2b-compress-sse41.c"
"${SRC}/crypto_generichash/blake2b/ref/generichash_blake2b.c"
"${SRC}/crypto_generichash/blake2b/ref/blake2b-compress-ssse3.c"
"${SRC}/crypto_generichash/blake2b/ref/blake2b-compress-avx2.c"
"${SRC}/crypto_generichash/blake2b/ref/blake2b-compress-ref.c"
"${SRC}/crypto_hash/crypto_hash.c"
"${SRC}/crypto_hash/sha512/hash_sha512.c"
"${SRC}/crypto_hash/sha256/hash_sha256.c"
"${SRC}/crypto_hash/sha512/cp/hash_sha512_cp.c"
"${SRC}/crypto_hash/sha256/cp/hash_sha256_cp.c"
"${SRC}/crypto_hash/sha256/hash_sha256.c"
"${SRC}/crypto_hash/sha256/cp/hash_sha256_cp.c"
"${SRC}/crypto_hash/sha512/hash_sha512.c"
"${SRC}/crypto_hash/sha512/cp/hash_sha512_cp.c"
"${SRC}/crypto_kdf/blake2b/kdf_blake2b.c"
"${SRC}/crypto_kdf/crypto_kdf.c"
"${SRC}/crypto_kdf/blake2b/kdf_blake2b.c"
"${SRC}/crypto_kx/crypto_kx.c"
"${SRC}/crypto_onetimeauth/crypto_onetimeauth.c"
"${SRC}/crypto_onetimeauth/poly1305/onetimeauth_poly1305.c"
"${SRC}/crypto_onetimeauth/poly1305/sse2/poly1305_sse2.c"
"${SRC}/crypto_onetimeauth/poly1305/donna/poly1305_donna.c"
"${SRC}/crypto_onetimeauth/poly1305/onetimeauth_poly1305.c"
"${SRC}/crypto_onetimeauth/poly1305/sse2/poly1305_sse2.c"
"${SRC}/crypto_onetimeauth/poly1305/donna/poly1305_donna.c"
"${SRC}/crypto_onetimeauth/poly1305/donna/poly1305_donna.c"
"${SRC}/crypto_pwhash/argon2/argon2-encoding.c"
"${SRC}/crypto_pwhash/argon2/argon2-fill-block-ssse3.c"
"${SRC}/crypto_pwhash/argon2/blake2b-long.c"
"${SRC}/crypto_pwhash/argon2/pwhash_argon2i.c"
"${SRC}/crypto_pwhash/argon2/argon2.c"
"${SRC}/crypto_pwhash/argon2/argon2-fill-block-ref.c"
"${SRC}/crypto_pwhash/argon2/argon2-core.c"
"${SRC}/crypto_pwhash/crypto_pwhash.c"
"${SRC}/crypto_pwhash/scryptsalsa208sha256/pbkdf2-sha256.c"
"${SRC}/crypto_pwhash/scryptsalsa208sha256/scrypt_platform.c"
"${SRC}/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt-common.c"
"${SRC}/crypto_pwhash/scryptsalsa208sha256/pwhash_scryptsalsa208sha256.c"
"${SRC}/crypto_pwhash/argon2/argon2-encoding.c"
"${SRC}/crypto_pwhash/argon2/argon2-fill-block-ssse3.c"
"${SRC}/crypto_pwhash/argon2/blake2b-long.c"
"${SRC}/crypto_pwhash/argon2/pwhash_argon2i.c"
"${SRC}/crypto_pwhash/argon2/argon2.c"
"${SRC}/crypto_pwhash/argon2/argon2-fill-block-ref.c"
"${SRC}/crypto_pwhash/argon2/argon2-core.c"
"${SRC}/crypto_pwhash/scryptsalsa208sha256/nosse/pwhash_scryptsalsa208sha256_nosse.c"
"${SRC}/crypto_pwhash/scryptsalsa208sha256/sse/pwhash_scryptsalsa208sha256_sse.c"
"${SRC}/crypto_pwhash/scryptsalsa208sha256/pbkdf2-sha256.c"
"${SRC}/crypto_pwhash/scryptsalsa208sha256/scrypt_platform.c"
"${SRC}/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt-common.c"
"${SRC}/crypto_pwhash/scryptsalsa208sha256/pwhash_scryptsalsa208sha256.c"
"${SRC}/crypto_pwhash/scryptsalsa208sha256/nosse/pwhash_scryptsalsa208sha256_nosse.c"
"${SRC}/crypto_pwhash/scryptsalsa208sha256/sse/pwhash_scryptsalsa208sha256_sse.c"
"${SRC}/crypto_pwhash/scryptsalsa208sha256/nosse/pwhash_scryptsalsa208sha256_nosse.c"
"${SRC}/crypto_scalarmult/crypto_scalarmult.c"
"${SRC}/crypto_scalarmult/curve25519/scalarmult_curve25519.c"
"${SRC}/crypto_scalarmult/curve25519/sandy2x/fe_frombytes_sandy2x.c"
"${SRC}/crypto_scalarmult/curve25519/sandy2x/curve25519_sandy2x.c"
"${SRC}/crypto_scalarmult/curve25519/sandy2x/fe51_invert.c"
"${SRC}/crypto_scalarmult/curve25519/donna_c64/curve25519_donna_c64.c"
"${SRC}/crypto_scalarmult/curve25519/ref10/x25519_ref10.c"
"${SRC}/crypto_scalarmult/curve25519/sandy2x/fe51_pack.S"
"${SRC}/crypto_scalarmult/curve25519/sandy2x/fe51_mul.S"
"${SRC}/crypto_scalarmult/curve25519/sandy2x/ladder_base.S"
"${SRC}/crypto_scalarmult/curve25519/sandy2x/sandy2x.S"
"${SRC}/crypto_scalarmult/curve25519/sandy2x/ladder.S"
"${SRC}/crypto_scalarmult/curve25519/sandy2x/consts.S"
"${SRC}/crypto_scalarmult/curve25519/sandy2x/fe51_nsquare.S"
"${SRC}/crypto_scalarmult/curve25519/scalarmult_curve25519.c"
"${SRC}/crypto_scalarmult/curve25519/sandy2x/fe_frombytes_sandy2x.c"
"${SRC}/crypto_scalarmult/curve25519/sandy2x/curve25519_sandy2x.c"
"${SRC}/crypto_scalarmult/curve25519/sandy2x/fe51_invert.c"
"${SRC}/crypto_scalarmult/curve25519/donna_c64/curve25519_donna_c64.c"
"${SRC}/crypto_scalarmult/curve25519/ref10/x25519_ref10.c"
"${SRC}/crypto_scalarmult/curve25519/sandy2x/fe51_pack.S"
"${SRC}/crypto_scalarmult/curve25519/sandy2x/fe51_mul.S"
"${SRC}/crypto_scalarmult/curve25519/sandy2x/ladder_base.S"
"${SRC}/crypto_scalarmult/curve25519/sandy2x/sandy2x.S"
"${SRC}/crypto_scalarmult/curve25519/sandy2x/ladder.S"
"${SRC}/crypto_scalarmult/curve25519/sandy2x/consts.S"
"${SRC}/crypto_scalarmult/curve25519/sandy2x/fe51_nsquare.S"
"${SRC}/crypto_scalarmult/curve25519/ref10/x25519_ref10.c"
"${SRC}/crypto_secretbox/crypto_secretbox_easy.c"
"${SRC}/crypto_secretbox/crypto_secretbox.c"
"${SRC}/crypto_secretbox/xsalsa20poly1305/secretbox_xsalsa20poly1305.c"
"${SRC}/crypto_secretbox/xchacha20poly1305/secretbox_xchacha20poly1305.c"
"${SRC}/crypto_secretbox/xsalsa20poly1305/secretbox_xsalsa20poly1305.c"
"${SRC}/crypto_shorthash/crypto_shorthash.c"
"${SRC}/crypto_shorthash/siphash24/shorthash_siphashx24.c"
"${SRC}/crypto_shorthash/siphash24/shorthash_siphash24.c"
"${SRC}/crypto_shorthash/siphash24/ref/shorthash_siphashx24_ref.c"
"${SRC}/crypto_shorthash/siphash24/ref/shorthash_siphash24_ref.c"
"${SRC}/crypto_shorthash/siphash24/shorthash_siphashx24.c"
"${SRC}/crypto_shorthash/siphash24/shorthash_siphash24.c"
"${SRC}/crypto_shorthash/siphash24/ref/shorthash_siphashx24_ref.c"
"${SRC}/crypto_shorthash/siphash24/ref/shorthash_siphash24_ref.c"
"${SRC}/crypto_shorthash/siphash24/ref/shorthash_siphashx24_ref.c"
"${SRC}/crypto_shorthash/siphash24/ref/shorthash_siphash24_ref.c"
"${SRC}/crypto_sign/crypto_sign.c"
"${SRC}/crypto_sign/ed25519/sign_ed25519.c"
"${SRC}/crypto_sign/ed25519/ref10/obsolete.c"
"${SRC}/crypto_sign/ed25519/ref10/open.c"
"${SRC}/crypto_sign/ed25519/ref10/keypair.c"
"${SRC}/crypto_sign/ed25519/ref10/sign.c"
"${SRC}/crypto_sign/ed25519/sign_ed25519.c"
"${SRC}/crypto_sign/ed25519/ref10/obsolete.c"
"${SRC}/crypto_sign/ed25519/ref10/open.c"
"${SRC}/crypto_sign/ed25519/ref10/keypair.c"
"${SRC}/crypto_sign/ed25519/ref10/sign.c"
"${SRC}/crypto_sign/ed25519/ref10/obsolete.c"
"${SRC}/crypto_sign/ed25519/ref10/open.c"
"${SRC}/crypto_sign/ed25519/ref10/keypair.c"
"${SRC}/crypto_sign/ed25519/ref10/sign.c"
"${SRC}/crypto_stream/chacha20/stream_chacha20.c"
"${SRC}/crypto_stream/chacha20/ref/chacha20_ref.c"
"${SRC}/crypto_stream/chacha20/dolbeau/chacha20_dolbeau-ssse3.c"
"${SRC}/crypto_stream/chacha20/dolbeau/chacha20_dolbeau-avx2.c"
"${SRC}/crypto_stream/chacha20/ref/chacha20_ref.c"
"${SRC}/crypto_stream/crypto_stream.c"
"${SRC}/crypto_stream/salsa20/stream_salsa20.c"
"${SRC}/crypto_stream/salsa208/stream_salsa208.c"
"${SRC}/crypto_stream/salsa2012/stream_salsa2012.c"
"${SRC}/crypto_stream/chacha20/stream_chacha20.c"
"${SRC}/crypto_stream/aes128ctr/stream_aes128ctr.c"
"${SRC}/crypto_stream/xsalsa20/stream_xsalsa20.c"
"${SRC}/crypto_stream/xchacha20/stream_xchacha20.c"
"${SRC}/crypto_stream/salsa20/ref/salsa20_ref.c"
"${SRC}/crypto_stream/salsa20/xmm6/salsa20_xmm6.c"
"${SRC}/crypto_stream/salsa20/xmm6int/salsa20_xmm6int-avx2.c"
"${SRC}/crypto_stream/salsa20/xmm6int/salsa20_xmm6int-sse2.c"
"${SRC}/crypto_stream/salsa208/ref/stream_salsa208_ref.c"
"${SRC}/crypto_stream/salsa2012/ref/stream_salsa2012_ref.c"
"${SRC}/crypto_stream/chacha20/ref/chacha20_ref.c"
"${SRC}/crypto_stream/chacha20/dolbeau/chacha20_dolbeau-ssse3.c"
"${SRC}/crypto_stream/chacha20/dolbeau/chacha20_dolbeau-avx2.c"
"${SRC}/crypto_stream/aes128ctr/nacl/consts_aes128ctr.c"
"${SRC}/crypto_stream/aes128ctr/nacl/stream_aes128ctr_nacl.c"
"${SRC}/crypto_stream/aes128ctr/nacl/beforenm_aes128ctr.c"
"${SRC}/crypto_stream/aes128ctr/nacl/afternm_aes128ctr.c"
"${SRC}/crypto_stream/aes128ctr/nacl/xor_afternm_aes128ctr.c"
"${SRC}/crypto_stream/aes128ctr/nacl/int128_aes128ctr.c"
"${SRC}/crypto_stream/salsa20/xmm6/salsa20_xmm6-asm.S"
"${SRC}/crypto_stream/salsa20/stream_salsa20.c"
"${SRC}/crypto_stream/salsa20/ref/salsa20_ref.c"
"${SRC}/crypto_stream/salsa20/xmm6/salsa20_xmm6.c"
"${SRC}/crypto_stream/salsa20/xmm6int/salsa20_xmm6int-avx2.c"
"${SRC}/crypto_stream/salsa20/xmm6int/salsa20_xmm6int-sse2.c"
"${SRC}/crypto_stream/salsa20/xmm6/salsa20_xmm6-asm.S"
"${SRC}/crypto_stream/salsa20/ref/salsa20_ref.c"
"${SRC}/crypto_stream/xsalsa20/stream_xsalsa20.c"
"${SRC}/crypto_verify/sodium/verify.c"
"${SRC}/randombytes/randombytes.c"
"${SRC}/randombytes/sysrandom/randombytes_sysrandom.c"
"${SRC}/randombytes/salsa20/randombytes_salsa20_random.c"
"${SRC}/randombytes/nativeclient/randombytes_nativeclient.c"
"${SRC}/sodium/runtime.c"
"${SRC}/sodium/utils.c"
"${SRC}/sodium/core.c"
"${SRC}/sodium/version.c"
)
if(CONFIG_LIBSODIUM_USE_MBEDTLS_SHA)
set(COMPONENT_SRCDIRS ${COMPONENT_SRCDIRS}
port/crypto_hash_mbedtls
)
set(COMPONENT_SRCS "port/crypto_hash_mbedtls/crypto_hash_sha256_mbedtls.c"
"port/crypto_hash_mbedtls/crypto_hash_sha512_mbedtls.c")
else()
set(COMPONENT_SRCDIRS ${COMPONENT_SRCDIRS}
${SRC}/crypto_hash/sha256/cp
${SRC}/crypto_hash/sha512/cp
)
set(COMPONENT_SRCS "port/crypto_hash_mbedtls/crypto_hash_sha256_mbedtls.c"
"port/crypto_hash_mbedtls/crypto_hash_sha512_mbedtls.c")
endif()
set(COMPONENT_ADD_INCLUDEDIRS ${SRC}/include port_include)

View File

@ -1,4 +1,4 @@
set(COMPONENT_SRCDIRS ".")
set(COMPONENT_SRCS "log.c")
set(COMPONENT_ADD_INCLUDEDIRS "include")
set(COMPONENT_REQUIRES)
register_component()

View File

@ -5,27 +5,118 @@ set(COMPONENT_ADD_INCLUDEDIRS
port/esp32/include/arch
)
set(COMPONENT_SRCDIRS
apps/dhcpserver
apps/ping
lwip/src/api
lwip/src/apps/sntp
lwip/src/core
lwip/src/core/ipv4
lwip/src/core/ipv6
lwip/src/netif
lwip/src/netif/ppp
port/esp32
port/esp32/freertos
port/esp32/netif
port/esp32/debug
)
set(COMPONENT_SRCS "apps/dhcpserver/dhcpserver.c"
"apps/ping/esp_ping.c"
"apps/ping/ping.c"
"lwip/src/api/api_lib.c"
"lwip/src/api/api_msg.c"
"lwip/src/api/err.c"
"lwip/src/api/netbuf.c"
"lwip/src/api/netdb.c"
"lwip/src/api/netifapi.c"
"lwip/src/api/sockets.c"
"lwip/src/api/tcpip.c"
"lwip/src/apps/sntp/sntp.c"
"lwip/src/core/def.c"
"lwip/src/core/dns.c"
"lwip/src/core/inet_chksum.c"
"lwip/src/core/init.c"
"lwip/src/core/ip.c"
"lwip/src/core/ipv4/autoip.c"
"lwip/src/core/ipv4/dhcp.c"
"lwip/src/core/ipv4/etharp.c"
"lwip/src/core/ipv4/icmp.c"
"lwip/src/core/ipv4/igmp.c"
"lwip/src/core/ipv4/ip4.c"
"lwip/src/core/ipv4/ip4_addr.c"
"lwip/src/core/ipv4/ip4_frag.c"
"lwip/src/core/ipv6/dhcp6.c"
"lwip/src/core/ipv6/ethip6.c"
"lwip/src/core/ipv6/icmp6.c"
"lwip/src/core/ipv6/inet6.c"
"lwip/src/core/ipv6/ip6.c"
"lwip/src/core/ipv6/ip6_addr.c"
"lwip/src/core/ipv6/ip6_frag.c"
"lwip/src/core/ipv6/mld6.c"
"lwip/src/core/ipv6/nd6.c"
"lwip/src/core/mem.c"
"lwip/src/core/memp.c"
"lwip/src/core/netif.c"
"lwip/src/core/pbuf.c"
"lwip/src/core/raw.c"
"lwip/src/core/stats.c"
"lwip/src/core/sys.c"
"lwip/src/core/tcp.c"
"lwip/src/core/tcp_in.c"
"lwip/src/core/tcp_out.c"
"lwip/src/core/timeouts.c"
"lwip/src/core/udp.c"
"lwip/src/netif/ethernet.c"
"lwip/src/netif/ethernetif.c"
"lwip/src/netif/lowpan6.c"
"lwip/src/netif/ppp/auth.c"
"lwip/src/netif/ppp/ccp.c"
"lwip/src/netif/ppp/chap-md5.c"
"lwip/src/netif/ppp/chap-new.c"
"lwip/src/netif/ppp/chap_ms.c"
"lwip/src/netif/ppp/demand.c"
"lwip/src/netif/ppp/eap.c"
"lwip/src/netif/ppp/ecp.c"
"lwip/src/netif/ppp/eui64.c"
"lwip/src/netif/ppp/fsm.c"
"lwip/src/netif/ppp/ipcp.c"
"lwip/src/netif/ppp/ipv6cp.c"
"lwip/src/netif/ppp/lcp.c"
"lwip/src/netif/ppp/magic.c"
"lwip/src/netif/ppp/mppe.c"
"lwip/src/netif/ppp/multilink.c"
"lwip/src/netif/ppp/ppp.c"
"lwip/src/netif/ppp/pppapi.c"
"lwip/src/netif/ppp/pppcrypt.c"
"lwip/src/netif/ppp/pppoe.c"
"lwip/src/netif/ppp/pppol2tp.c"
"lwip/src/netif/ppp/pppos.c"
"lwip/src/netif/ppp/upap.c"
"lwip/src/netif/ppp/utils.c"
"lwip/src/netif/ppp/vj.c"
"lwip/src/netif/slipif.c"
"port/esp32/debug/lwip_debug.c"
"port/esp32/freertos/sys_arch.c"
"port/esp32/netif/ethernetif.c"
"port/esp32/netif/wlanif.c"
"port/esp32/vfs_lwip.c")
if(CONFIG_PPP_SUPPORT)
list(APPEND COMPONENT_SRCDIRS
lwip/src/netif/ppp
lwip/src/netif/ppp/polarssl
)
list(APPEND COMPONENT_SRCS "lwip/src/netif/ppp/auth.c"
"lwip/src/netif/ppp/ccp.c"
"lwip/src/netif/ppp/chap-md5.c"
"lwip/src/netif/ppp/chap-new.c"
"lwip/src/netif/ppp/chap_ms.c"
"lwip/src/netif/ppp/demand.c"
"lwip/src/netif/ppp/eap.c"
"lwip/src/netif/ppp/ecp.c"
"lwip/src/netif/ppp/eui64.c"
"lwip/src/netif/ppp/fsm.c"
"lwip/src/netif/ppp/ipcp.c"
"lwip/src/netif/ppp/ipv6cp.c"
"lwip/src/netif/ppp/lcp.c"
"lwip/src/netif/ppp/magic.c"
"lwip/src/netif/ppp/mppe.c"
"lwip/src/netif/ppp/multilink.c"
"lwip/src/netif/ppp/polarssl/arc4.c"
"lwip/src/netif/ppp/polarssl/des.c"
"lwip/src/netif/ppp/polarssl/md4.c"
"lwip/src/netif/ppp/polarssl/md5.c"
"lwip/src/netif/ppp/polarssl/sha1.c"
"lwip/src/netif/ppp/ppp.c"
"lwip/src/netif/ppp/pppapi.c"
"lwip/src/netif/ppp/pppcrypt.c"
"lwip/src/netif/ppp/pppoe.c"
"lwip/src/netif/ppp/pppol2tp.c"
"lwip/src/netif/ppp/pppos.c"
"lwip/src/netif/ppp/upap.c"
"lwip/src/netif/ppp/utils.c"
"lwip/src/netif/ppp/vj.c")
endif()
set(COMPONENT_REQUIRES vfs)

View File

@ -1,7 +1,90 @@
set(COMPONENT_ADD_INCLUDEDIRS port/include mbedtls/include)
set(COMPONENT_SRCDIRS mbedtls/library port)
set(COMPONENT_SRCEXCLUDE mbedtls/library/net_sockets.c)
set(COMPONENT_SRCS "mbedtls/library/aes.c"
"mbedtls/library/aesni.c"
"mbedtls/library/arc4.c"
"mbedtls/library/aria.c"
"mbedtls/library/asn1parse.c"
"mbedtls/library/asn1write.c"
"mbedtls/library/base64.c"
"mbedtls/library/bignum.c"
"mbedtls/library/blowfish.c"
"mbedtls/library/camellia.c"
"mbedtls/library/ccm.c"
"mbedtls/library/certs.c"
"mbedtls/library/chacha20.c"
"mbedtls/library/chachapoly.c"
"mbedtls/library/cipher.c"
"mbedtls/library/cipher_wrap.c"
"mbedtls/library/cmac.c"
"mbedtls/library/ctr_drbg.c"
"mbedtls/library/debug.c"
"mbedtls/library/des.c"
"mbedtls/library/dhm.c"
"mbedtls/library/ecdh.c"
"mbedtls/library/ecdsa.c"
"mbedtls/library/ecjpake.c"
"mbedtls/library/ecp.c"
"mbedtls/library/ecp_curves.c"
"mbedtls/library/entropy.c"
"mbedtls/library/entropy_poll.c"
"mbedtls/library/error.c"
"mbedtls/library/gcm.c"
"mbedtls/library/havege.c"
"mbedtls/library/hkdf.c"
"mbedtls/library/hmac_drbg.c"
"mbedtls/library/md.c"
"mbedtls/library/md2.c"
"mbedtls/library/md4.c"
"mbedtls/library/md5.c"
"mbedtls/library/md_wrap.c"
"mbedtls/library/memory_buffer_alloc.c"
"mbedtls/library/net_sockets.c"
"mbedtls/library/nist_kw.c"
"mbedtls/library/oid.c"
"mbedtls/library/padlock.c"
"mbedtls/library/pem.c"
"mbedtls/library/pk.c"
"mbedtls/library/pk_wrap.c"
"mbedtls/library/pkcs11.c"
"mbedtls/library/pkcs12.c"
"mbedtls/library/pkcs5.c"
"mbedtls/library/pkparse.c"
"mbedtls/library/pkwrite.c"
"mbedtls/library/platform.c"
"mbedtls/library/platform_util.c"
"mbedtls/library/poly1305.c"
"mbedtls/library/ripemd160.c"
"mbedtls/library/rsa.c"
"mbedtls/library/rsa_internal.c"
"mbedtls/library/sha1.c"
"mbedtls/library/sha256.c"
"mbedtls/library/sha512.c"
"mbedtls/library/ssl_cache.c"
"mbedtls/library/ssl_ciphersuites.c"
"mbedtls/library/ssl_cli.c"
"mbedtls/library/ssl_cookie.c"
"mbedtls/library/ssl_srv.c"
"mbedtls/library/ssl_ticket.c"
"mbedtls/library/ssl_tls.c"
"mbedtls/library/threading.c"
"mbedtls/library/timing.c"
"mbedtls/library/version.c"
"mbedtls/library/version_features.c"
"mbedtls/library/x509.c"
"mbedtls/library/x509_create.c"
"mbedtls/library/x509_crl.c"
"mbedtls/library/x509_crt.c"
"mbedtls/library/x509_csr.c"
"mbedtls/library/x509write_crt.c"
"mbedtls/library/x509write_csr.c"
"mbedtls/library/xtea.c"
"port/esp_bignum.c"
"port/esp_hardware.c"
"port/esp_sha1.c"
"port/esp_sha256.c"
"port/esp_sha512.c"
"port/mbedtls_debug.c"
"port/net_sockets.c")
set(COMPONENT_REQUIRES lwip)

View File

@ -1,4 +1,6 @@
set(COMPONENT_SRCDIRS ".")
set(COMPONENT_SRCS "mdns.c"
"mdns_console.c"
"mdns_networking.c")
set(COMPONENT_ADD_INCLUDEDIRS "include")
set(COMPONENT_PRIV_INCLUDEDIRS "private_include")
set(COMPONENT_REQUIRES lwip mbedtls console tcpip_adapter)

View File

@ -1,5 +1,5 @@
# only compile the micro-ecc/uECC.c source file
set(COMPONENT_SRCS micro-ecc/uECC.c)
# only compile the "micro-ecc/uECC.c" source file
set(COMPONENT_SRCS "micro-ecc/uECC.c")
set(COMPONENT_ADD_INCLUDEDIRS micro-ecc)

View File

@ -1,4 +1,11 @@
set(COMPONENT_SRCDIRS ".")
set(COMPONENT_SRCS "locks.c"
"pthread.c"
"random.c"
"reent_init.c"
"select.c"
"syscall_table.c"
"syscalls.c"
"time.c")
set(COMPONENT_ADD_INCLUDEDIRS platform_include include)
if(CONFIG_SPIRAM_CACHE_WORKAROUND)

View File

@ -1,4 +1,26 @@
set(COMPONENT_ADD_INCLUDEDIRS port/include nghttp2/lib/includes)
set(COMPONENT_SRCDIRS nghttp2/lib port)
set(COMPONENT_SRCS "nghttp2/lib/nghttp2_buf.c"
"nghttp2/lib/nghttp2_callbacks.c"
"nghttp2/lib/nghttp2_debug.c"
"nghttp2/lib/nghttp2_frame.c"
"nghttp2/lib/nghttp2_hd.c"
"nghttp2/lib/nghttp2_hd_huffman.c"
"nghttp2/lib/nghttp2_hd_huffman_data.c"
"nghttp2/lib/nghttp2_helper.c"
"nghttp2/lib/nghttp2_http.c"
"nghttp2/lib/nghttp2_map.c"
"nghttp2/lib/nghttp2_mem.c"
"nghttp2/lib/nghttp2_npn.c"
"nghttp2/lib/nghttp2_option.c"
"nghttp2/lib/nghttp2_outbound_item.c"
"nghttp2/lib/nghttp2_pq.c"
"nghttp2/lib/nghttp2_priority_spec.c"
"nghttp2/lib/nghttp2_queue.c"
"nghttp2/lib/nghttp2_rcbuf.c"
"nghttp2/lib/nghttp2_session.c"
"nghttp2/lib/nghttp2_stream.c"
"nghttp2/lib/nghttp2_submit.c"
"nghttp2/lib/nghttp2_version.c"
"port/http_parser.c")
register_component()

View File

@ -1,4 +1,9 @@
set(COMPONENT_SRCDIRS src)
set(COMPONENT_SRCS "src/nvs_api.cpp"
"src/nvs_item_hash_list.cpp"
"src/nvs_page.cpp"
"src/nvs_pagemanager.cpp"
"src/nvs_storage.cpp"
"src/nvs_types.cpp")
set(COMPONENT_ADD_INCLUDEDIRS include)
set(COMPONENT_REQUIRES spi_flash)

View File

@ -1,6 +1,13 @@
set(COMPONENT_ADD_INCLUDEDIRS include)
set(COMPONENT_PRIV_INCLUDEDIRS include/internal include/platform include/openssl)
set(COMPONENT_SRCDIRS library platform)
set(COMPONENT_SRCS "library/ssl_cert.c"
"library/ssl_lib.c"
"library/ssl_methods.c"
"library/ssl_pkey.c"
"library/ssl_stack.c"
"library/ssl_x509.c"
"platform/ssl_pm.c"
"platform/ssl_port.c")
set(COMPONENT_REQUIRES mbedtls)

View File

@ -1,4 +1,6 @@
set(COMPONENT_SRCDIRS ".")
set(COMPONENT_SRCS "pthread.c"
"pthread_cond_var.c"
"pthread_local_storage.c")
set(COMPONENT_ADD_INCLUDEDIRS "include")
set(COMPONENT_REQUIRES)
register_component()

View File

@ -1,4 +1,9 @@
set(COMPONENT_SRCDIRS ".")
set(COMPONENT_SRCS "sdmmc_cmd.c"
"sdmmc_common.c"
"sdmmc_init.c"
"sdmmc_io.c"
"sdmmc_mmc.c"
"sdmmc_sd.c")
set(COMPONENT_ADD_INCLUDEDIRS "include")
set(COMPONENT_REQUIRES driver)
register_component()

View File

@ -1,4 +1,4 @@
set(COMPONENT_SRCDIRS ".")
set(COMPONENT_SRCS "smartconfig_ack.c")
set(COMPONENT_ADD_INCLUDEDIRS "include")
set(COMPONENT_PRIV_REQUIRES lwip tcpip_adapter)

View File

@ -1,9 +1,12 @@
set(SOC_NAME esp32)
set(COMPONENT_SRCDIRS ${SOC_NAME} src)
include(${IDF_PATH}/components/soc/${SOC_NAME}/sources.cmake)
spaces2list(SOC_SRCS)
add_prefix(COMPONENT_SRCS "${SOC_NAME}/" ${SOC_SRCS})
list(APPEND COMPONENT_SRCS "src/memory_layout_utils.c")
set(COMPONENT_ADD_INCLUDEDIRS ${SOC_NAME}/include include)
set(COMPONENT_REQUIRES)
register_component()
register_component()

View File

@ -0,0 +1,14 @@
set(SOC_SRCS "cpu_util.c"
"gpio_periph.c"
"rtc_clk.c"
"rtc_clk_init.c"
"rtc_init.c"
"rtc_periph.c"
"rtc_pm.c"
"rtc_sleep.c"
"rtc_time.c"
"rtc_wdt.c"
"sdio_slave_periph.c"
"sdmmc_periph.c"
"soc_memory_layout.c"
"spi_periph.c")

View File

@ -1,10 +1,14 @@
if(BOOTLOADER_BUILD)
# Bootloader needs SPIUnlock from this file, but doesn't
# need other parts of this component
set(COMPONENT_SRCS spi_flash_rom_patch.c)
set(COMPONENT_SRCS "spi_flash_rom_patch.c")
set(COMPONENT_PRIV_REQUIRES bootloader_support)
else()
set(COMPONENT_SRCDIRS .)
set(COMPONENT_SRCS "cache_utils.c"
"flash_mmap.c"
"flash_ops.c"
"partition.c"
"spi_flash_rom_patch.c")
set(COMPONENT_PRIV_REQUIRES bootloader_support app_update)
endif()

View File

@ -1,6 +1,12 @@
set(COMPONENT_ADD_INCLUDEDIRS "include")
set(COMPONENT_PRIV_INCLUDEDIRS "." "spiffs/src")
set(COMPONENT_SRCDIRS "." "spiffs/src")
set(COMPONENT_SRCS "esp_spiffs.c"
"spiffs/src/spiffs_cache.c"
"spiffs/src/spiffs_check.c"
"spiffs/src/spiffs_gc.c"
"spiffs/src/spiffs_hydrogen.c"
"spiffs/src/spiffs_nucleus.c"
"spiffs_api.c")
set(COMPONENT_REQUIRES spi_flash)
set(COMPONENT_PRIV_REQUIRES bootloader_support)

View File

@ -1,4 +1,4 @@
set(COMPONENT_SRCDIRS ".")
set(COMPONENT_SRCS "tcpip_adapter_lwip.c")
set(COMPONENT_ADD_INCLUDEDIRS "include")
set(COMPONENT_REQUIRES lwip)

View File

@ -1,4 +1,5 @@
set(COMPONENT_SRCDIRS ".")
set(COMPONENT_SRCS "ulp.c"
"ulp_macro.c")
set(COMPONENT_ADD_INCLUDEDIRS "include")
set(COMPONENT_REQUIRES)

View File

@ -1,4 +1,5 @@
set(COMPONENT_SRCDIRS ".")
set(COMPONENT_SRCS "vfs.c"
"vfs_uart.c")
set(COMPONENT_ADD_INCLUDEDIRS "include")
set(COMPONENT_REQUIRES)

View File

@ -1,4 +1,10 @@
set(COMPONENT_SRCDIRS ".")
set(COMPONENT_SRCS "Partition.cpp"
"SPI_Flash.cpp"
"WL_Ext_Perf.cpp"
"WL_Ext_Safe.cpp"
"WL_Flash.cpp"
"crc32.cpp"
"wear_levelling.cpp")
set(COMPONENT_ADD_INCLUDEDIRS "include")
set(COMPONENT_PRIV_INCLUDEDIRS private_include)
set(COMPONENT_REQUIRES spi_flash)

View File

@ -1,4 +1,76 @@
set(COMPONENT_SRCDIRS src/crypto port src/fast_crypto src/wpa2/eap_peer src/wpa2/tls src/wpa2/utils src/wps)
set(COMPONENT_SRCS "port/os_xtensa.c"
"src/crypto/aes-cbc.c"
"src/crypto/aes-internal-dec.c"
"src/crypto/aes-internal-enc.c"
"src/crypto/aes-internal.c"
"src/crypto/aes-unwrap.c"
"src/crypto/aes-wrap.c"
"src/crypto/bignum.c"
"src/crypto/crypto_internal-cipher.c"
"src/crypto/crypto_internal-modexp.c"
"src/crypto/crypto_internal-rsa.c"
"src/crypto/crypto_internal.c"
"src/crypto/des-internal.c"
"src/crypto/dh_group5.c"
"src/crypto/dh_groups.c"
"src/crypto/md4-internal.c"
"src/crypto/md5-internal.c"
"src/crypto/md5.c"
"src/crypto/ms_funcs.c"
"src/crypto/rc4.c"
"src/crypto/sha1-internal.c"
"src/crypto/sha1-pbkdf2.c"
"src/crypto/sha1.c"
"src/crypto/sha256-internal.c"
"src/crypto/sha256.c"
"src/fast_crypto/fast_aes-cbc.c"
"src/fast_crypto/fast_aes-unwrap.c"
"src/fast_crypto/fast_aes-wrap.c"
"src/fast_crypto/fast_crypto_internal-cipher.c"
"src/fast_crypto/fast_crypto_internal-modexp.c"
"src/fast_crypto/fast_crypto_internal.c"
"src/fast_crypto/fast_sha256-internal.c"
"src/fast_crypto/fast_sha256.c"
"src/wpa2/eap_peer/chap.c"
"src/wpa2/eap_peer/eap.c"
"src/wpa2/eap_peer/eap_common.c"
"src/wpa2/eap_peer/eap_mschapv2.c"
"src/wpa2/eap_peer/eap_peap.c"
"src/wpa2/eap_peer/eap_peap_common.c"
"src/wpa2/eap_peer/eap_tls.c"
"src/wpa2/eap_peer/eap_tls_common.c"
"src/wpa2/eap_peer/eap_ttls.c"
"src/wpa2/eap_peer/mschapv2.c"
"src/wpa2/tls/asn1.c"
"src/wpa2/tls/bignum.c"
"src/wpa2/tls/pkcs1.c"
"src/wpa2/tls/pkcs5.c"
"src/wpa2/tls/pkcs8.c"
"src/wpa2/tls/rsa.c"
"src/wpa2/tls/tls_internal.c"
"src/wpa2/tls/tlsv1_client.c"
"src/wpa2/tls/tlsv1_client_read.c"
"src/wpa2/tls/tlsv1_client_write.c"
"src/wpa2/tls/tlsv1_common.c"
"src/wpa2/tls/tlsv1_cred.c"
"src/wpa2/tls/tlsv1_record.c"
"src/wpa2/tls/tlsv1_server.c"
"src/wpa2/tls/tlsv1_server_read.c"
"src/wpa2/tls/tlsv1_server_write.c"
"src/wpa2/tls/x509v3.c"
"src/wpa2/utils/base64.c"
"src/wpa2/utils/ext_password.c"
"src/wps/eap_common.c"
"src/wps/uuid.c"
"src/wps/wps.c"
"src/wps/wps_attr_build.c"
"src/wps/wps_attr_parse.c"
"src/wps/wps_attr_process.c"
"src/wps/wps_common.c"
"src/wps/wps_dev_attr.c"
"src/wps/wps_enrollee.c"
"src/wps/wps_registrar.c"
"src/wps/wps_validate.c")
set(COMPONENT_ADD_INCLUDEDIRS include port/include)
set(COMPONENT_REQUIRES "")

View File

@ -1,4 +1,5 @@
set(COMPONENT_SRCDIRS ".")
set(COMPONENT_SRCS "eri.c"
"trax.c")
set(COMPONENT_ADD_INCLUDEDIRS "include")
set(COMPONENT_REQUIRES "")

View File

@ -170,14 +170,14 @@ An example project directory tree might look like this::
This example "myProject" contains the following elements:
- A top-level project CMakeLists.txt file. This is the primary file which CMake uses to learn how to build the project. The project CMakeLists.txt file sets the ``MAIN_SRCS`` variable which lists all of the source files in the "main" directory (part of this project's executable). It may set other project-wide CMake variables, as well. Then it includes the file :idf_file:`/tools/cmake/project.cmake` which
- A top-level project CMakeLists.txt file. This is the primary file which CMake uses to learn how to build the project; and may set project-wide CMake variables. It includes the file :idf_file:`/tools/cmake/project.cmake` which
implements the rest of the build system. Finally, it sets the project name and defines the project.
- "sdkconfig" project configuration file. This file is created/updated when ``idf.py menuconfig`` runs, and holds configuration for all of the components in the project (including ESP-IDF itself). The "sdkconfig" file may or may not be added to the source control system of the project.
- Optional "components" directory contains components that are part of the project. A project does not have to contain custom components of this kind, but it can be useful for structuring reusable code or including third party components that aren't part of ESP-IDF.
- "main" directory is a special "by convention" directory that contains source code for the project executable itself. These source files are listed in the project's CMakeLists file. You don't need to name this directory "main", but we recommend you follow this convention. If you have a lot of source files in your project, we recommend grouping most into components instead of putting them all in "main".
- "main" directory is a special "pseudo-component" that contains source code for the project itself. "main" is a default name, the CMake variable ``COMPONENT_DIRS`` includes this component but you can modify this variable (or set ``EXTRA_COMPONENT_DIRS`` in the top-level CMakeLists.txt) to look for components in other places. If you have a lot of source files in your project, we recommend grouping most into components instead of putting them all in "main".
- "build" directory is where build output is created. This directory is created by ``idf.py`` if it doesn't already exist. CMake configures the project and generates interim build files in this directory. Then, after the main build process is run, this directory will also contain interim object files and libraries as well as final binary output files. This directory is usually not added to source control or distributed with the project source code.
@ -200,8 +200,6 @@ Minimal project::
cmake_minimum_required(VERSION 3.5)
set(MAIN_SRCS main/src1.c main/src2.c)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(myProject)
@ -214,11 +212,6 @@ Mandatory Parts
The inclusion of these four lines, in the order shown above, is necessary for every project:
- ``cmake_minimum_required(VERSION 3.5)`` tells CMake what version is required to build the project. ESP-IDF is designed to work with CMake 3.5 or newer. This line must be the first line in the CMakeLists.txt file.
- ``set(MAIN_SRCS xxx)`` sets a variable - ``MAIN_SRCS`` to be a list of the "main" source files in the project. Paths are relative to the CMakeLists. They don't specifically need to be under the "main" sub-directory, but this structure is encouraged.
It is *strongly recommended not to add a lot of files to the MAIN_SRCS list*. If you have a lot of source files then it recommended to organise them functionally into individual components under the project "components" directory. This will make your project more maintainable, reusable, and easier to configure. Components are further explained below.
``MAIN_SRCS`` must name at least one source file (although that file doesn't need to necessarily include an ``app_main()`` function or anything else).
- ``include($ENV{IDF_PATH}/tools/cmake/project.cmake)`` pulls in the rest of the CMake functionality to configure the project, discover all the components, etc.
- ``project(myProject)`` creates the project itself, and specifies the project name. The project name is used for the final binary output files of the app - ie ``myProject.elf``, ``myProject.bin``. Only one project can be defined per CMakeLists file.
@ -268,11 +261,11 @@ Minimal Component CMakeLists
The minimal component ``CMakeLists.txt`` file is as follows::
set(COMPONENT_SRCDIRS ".")
set(COMPONENT_SRCS "foo.c")
set(COMPONENT_ADD_INCLUDEDIRS "include")
register_component()
- ``COMPONENT_SRCDIRS`` is a (space-separated) list of directories to search for source files. Source files (``*.c``, ``*.cpp``, ``*.cc``, ``*.S``) in these directories will be compiled into the component library.
- ``COMPONENT_SRCS`` is a (space-separated) list of source files (``*.c``, ``*.cpp``, ``*.cc``, ``*.S``). These source files will be compiled into the component library.
- ``COMPONENT_ADD_INCLUDEDIRS`` is a (space-separated) list of directories to add to the global include search path for any component which requires this component, and also the main source files.
- ``register_component()`` is required to add the component (using the variables set above) to the build. A library with the name of the component will be built and linked into the final app. If this step is skipped (perhaps due to use of a CMake `if function <cmake if_>`_ or similar), this component will not be part of the build.
@ -320,12 +313,17 @@ The following variables can be set inside ``component.mk`` to control the build
the component directory, which will be added to the include search
path for this component's source files only.
- ``COMPONENT_PRIV_REQUIRES`` is a (space-separated) list of components that are required to either compile or link this component's source files. These components' header paths do not propagate to other components which require it, they are only used to compile this component's sources. See `Component Requirements`_ for more details.
- ``COMPONENT_SRCS``: Paths to individual source files to compile as part of the component. This is the recommended way of adding source files to the build.
- ``COMPONENT_SRCDIRS``: Directory paths, must be relative to the component directory, which will be searched for source files (``*.cpp``,
``*.c``, ``*.S``). Set this to specify a list of directories which contain source files.
- ``COMPONENT_SRCS``: Paths to individual source files to compile. Setting this causes ``COMPONENT_SRCDIRS`` to be ignored. Setting this variable instead gives you finer grained control over which files are compiled.
If you don't set ``COMPONENT_SRCDIRS`` or ``COMPONENT_SRCS``, your component won't compile a library but it may still add include paths for use when compiling other components or the source files listed in ``MAIN_SRCS``.
``*.c``, ``*.S``). Source files are globbed from the listed directories and compiled as part of the component in place of ``COMPONENT_SRCS``, i.e. setting this will cause ``COMPONENT_SRCS`` to be ignored.
This can be a convenient way of including source files to the components en masse, but is generally not recommended due to caveats attached to CMake globbing (see `File Globbing & Incremental Builds`).
- ``COMPONENT_SRCEXCLUDE``: Paths to source files to exclude from component. Can be set in conjunction with ``COMPONENT_SRCDIRS`` if there is a directory with a large number of source files to include in the component but one or more source files which should not be. Paths can be specified relative to the component directory or absolute.
.. note::
If you don't set ``COMPONENT_SRCDIRS`` or ``COMPONENT_SRCS``, your component won't compile a library but it may still add include paths for use when compiling other components.
Controlling Component Compilation
---------------------------------
@ -399,7 +397,6 @@ When creating a project
- Those components' requirements (evaluated recursively).
- The "common" components that every component depends on.
- Setting ``COMPONENTS`` to the minimal list of required components can significantly reduce compile times.
- When compiling the project's source files (``MAIN_SRCS``), the public header directories (``COMPONENT_ADD_INCLUDEDIRS`` list) of all components included in the build are available.
.. _component-requirements-implementation:
@ -777,22 +774,20 @@ File Globbing & Incremental Builds
.. highlight:: cmake
The preferred way to include source files in an ESP-IDF component is to set ``COMPONENT_SRC_DIRS``::
set(COMPONENT_SRCDIRS library platform)
The build system will automatically find (via "file globbing") all source files in this directory. Alternatively, files can be specified individually::
The preferred way to include source files in an ESP-IDF component is to list them manually in COMPONENT_SRCS::
set(COMPONENT_SRCS library/a.c library/b.c platform/platform.c)
CMake_ recommends always to name all files individually (ie ``COMPONENT_SRCS``). This is because CMake is automatically re-run whenever a CMakeLists file changes. If a new source file is added and file globbing is used, then CMake won't know to automatically re-run and this file won't be added to the build.
This preference reflects the `CMake best practice <https://gist.github.com/mbinna/c61dbb39bca0e4fb7d1f73b0d66a4fd1/>`_ of manually listing source files. This could, however, be inconvenient when there are lots of source files to add to the build. The ESP-IDF build system provides an alternative way for specifying source files using ``COMPONENT_SRCDIRS``::
set(COMPONENT_SRCDIRS library platform)
This uses globbing behind the scenes to find source files in the specified directories. Be aware, however, that if a new source file is added and this method is used, then CMake won't know to automatically re-run and this file won't be added to the build.
The trade-off is acceptable when you're adding the file yourself, because you can trigger a clean build or run ``idf.py reconfigure`` to manually re-run CMake_. However, the problem gets harder when you share your project with others who may check out a new version using a source control tool like Git...
For components which are part of ESP-IDF, we use a third party Git CMake integration module (:idf_file:`/tools/cmake/third_party/GetGitRevisionDescription.cmake`) which automatically re-runs CMake any time the repository commit changes. This means if you check out a new ESP-IDF version, CMake will automatically rerun.
For project CMakeLists files, ``MAIN_SRCS`` is a list of source files. Therefore if a new file is added, CMakeLists will change and this triggers a re-run of CMake. (This is the approach which CMake_ recommends.)
For project components (not part of ESP-IDF), there are a few different options:
- If keeping your project file in Git, ESP-IDF will automatically track the Git revision and re-run CMake if the revision changes.
@ -889,15 +884,6 @@ It does so by running ``make`` to expand the ESP-IDF build system variables whic
The conversion tool is not capable of dealing with complex Makefile logic or unusual targets. These will need to be converted by hand.
'main' is no longer a component
-------------------------------
In the GNU Make build system ``main`` is a component with a ``component.mk`` file like other components.
Due to CMake requirements for building executables, ``main`` source files are now linked directly into the final binary. The source files in ``main`` must be listed in the ``MAIN_SRCS`` variable (see :ref:`project mandatory variables <project-mandatory-parts>` for more details). At least one source file has to be listed here (although it doesn't need to contain anything in particular).
In general, it's better not to have too many source files in ``MAIN_SRCS``. If you find that you are adding many source files here, see if you can reorganize and group some into project components (see the :ref:`example project structure <example-project-structure>`, above).
No Longer Available in CMake
----------------------------
@ -930,8 +916,7 @@ The following variables no longer have default values:
No Longer Necessary
-------------------
It is no longer necessary to set ``COMPONENT_SRCDIRS`` if setting ``COMPONENT_SRCS`` (in fact, in the CMake-based system ``COMPONENT_SRCDIRS`` is ignored if ``COMPONENT_SRCS`` is set).
It is no longer necessary to set ``COMPONENT_SRCDIRS`` if setting ``COMPONENT_SRCS`` (in fact, in the CMake-based system ``COMPONENT_SRCS`` is ignored if ``COMPONENT_SRCDIRS`` is set).
.. _esp-idf-template: https://github.com/espressif/esp-idf-template
.. _cmake: https://cmake.org

View File

@ -2,11 +2,5 @@
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.5)
set(MAIN_SRCS
main/bt_app_av.c
main/bt_app_core.c
main/main.c
)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(bt_ble_coex)

View File

@ -0,0 +1,6 @@
set(COMPONENT_SRCS "bt_app_av.c"
"bt_app_core.c"
"main.c")
set(COMPONENT_ADD_INCLUDEDIRS ".")
register_component()

View File

@ -2,11 +2,5 @@
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.5)
set(MAIN_SRCS
main/bt_app_av.c
main/bt_app_core.c
main/main.c
)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(a2dp_sink)

View File

@ -0,0 +1,6 @@
set(COMPONENT_SRCS "bt_app_av.c"
"bt_app_core.c"
"main.c")
set(COMPONENT_ADD_INCLUDEDIRS ".")
register_component()

View File

@ -2,10 +2,5 @@
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.5)
set(MAIN_SRCS
main/bt_app_core.c
main/main.c
)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(a2dp_source)

View File

@ -0,0 +1,5 @@
set(COMPONENT_SRCS "bt_app_core.c"
"main.c")
set(COMPONENT_ADD_INCLUDEDIRS ".")
register_component()

View File

@ -2,9 +2,5 @@
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.5)
set(MAIN_SRCS
main/app_bt.c
)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(ble_adv)

View File

@ -0,0 +1,4 @@
set(COMPONENT_SRCS "app_bt.c")
set(COMPONENT_ADD_INCLUDEDIRS ".")
register_component()

View File

@ -1,8 +1,6 @@
# The following four 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
cmake_minimum_required(VERSION 3.5)
set(MAIN_SRCS main/esp_eddystone_api.c main/esp_eddystone_demo.c)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(ble_eddystone_demo)

View File

@ -0,0 +1,5 @@
set(COMPONENT_SRCS "esp_eddystone_api.c"
"esp_eddystone_demo.c")
set(COMPONENT_ADD_INCLUDEDIRS "")
register_component()

View File

@ -1,11 +1,6 @@
# The following four 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
cmake_minimum_required(VERSION 3.5)
set(MAIN_SRCS main/ble_hidd_demo_main.c
main/hid_dev.c
main/hid_device_le_prf.c
main/esp_hidd_prf_api.c)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(hidd_demos)

View File

@ -0,0 +1,7 @@
set(COMPONENT_SRCS "ble_hidd_demo_main.c"
"esp_hidd_prf_api.c"
"hid_dev.c"
"hid_device_le_prf.c")
set(COMPONENT_ADD_INCLUDEDIRS ".")
register_component()

View File

@ -1,8 +1,6 @@
# The following four 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
cmake_minimum_required(VERSION 3.5)
set(MAIN_SRCS main/ibeacon_demo.c main/esp_ibeacon_api.c)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(ble_ibeacon_demo)

View File

@ -0,0 +1,5 @@
set(COMPONENT_SRCS "esp_ibeacon_api.c"
"ibeacon_demo.c")
set(COMPONENT_ADD_INCLUDEDIRS ".")
register_component()

View File

@ -1,8 +1,6 @@
# The following four 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
cmake_minimum_required(VERSION 3.5)
set(MAIN_SRCS main/spp_client_demo.c)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(spp_client_demo)

View File

@ -0,0 +1,4 @@
set(COMPONENT_SRCS "spp_client_demo.c")
set(COMPONENT_ADD_INCLUDEDIRS ".")
register_component()

View File

@ -1,8 +1,6 @@
# The following four 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
cmake_minimum_required(VERSION 3.5)
set(MAIN_SRCS main/ble_spp_server_demo.c)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(ble_spp_server_demo)

View File

@ -0,0 +1,4 @@
set(COMPONENT_SRCS "ble_spp_server_demo.c")
set(COMPONENT_ADD_INCLUDEDIRS ".")
register_component()

View File

@ -2,9 +2,5 @@
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.5)
set(MAIN_SRCS
main/example_ble_client_throughput.c
)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(throughput_client_demo)

View File

@ -0,0 +1,4 @@
set(COMPONENT_SRCS "example_ble_client_throughput.c")
set(COMPONENT_ADD_INCLUDEDIRS ".")
register_component()

View File

@ -2,9 +2,5 @@
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.5)
set(MAIN_SRCS
main/example_ble_server_throughput.c
)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(throughput_server_demo)

View File

@ -0,0 +1,4 @@
set(COMPONENT_SRCS "example_ble_server_throughput.c")
set(COMPONENT_ADD_INCLUDEDIRS ".")
register_component()

View File

@ -1,8 +1,6 @@
# The following four 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
cmake_minimum_required(VERSION 3.5)
set(MAIN_SRCS main/blufi_security.c main/blufi_example_main.c)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(blufi_demo)

View File

@ -0,0 +1,5 @@
set(COMPONENT_SRCS "blufi_example_main.c"
"blufi_security.c")
set(COMPONENT_ADD_INCLUDEDIRS ".")
register_component()

View File

@ -1,8 +1,6 @@
# The following four 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
cmake_minimum_required(VERSION 3.5)
set(MAIN_SRCS main/bt_discovery.c)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(bt_discovery)

View File

@ -0,0 +1,4 @@
set(COMPONENT_SRCS "bt_discovery.c")
set(COMPONENT_ADD_INCLUDEDIRS ".")
register_component()

View File

@ -1,8 +1,6 @@
# The following four 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
cmake_minimum_required(VERSION 3.5)
set(MAIN_SRCS main/example_spp_acceptor_demo.c)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(bt_spp_acceptor_demo)

View File

@ -0,0 +1,4 @@
set(COMPONENT_SRCS "example_spp_acceptor_demo.c")
set(COMPONENT_ADD_INCLUDEDIRS ".")
register_component()

View File

@ -1,8 +1,6 @@
# The following four 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
cmake_minimum_required(VERSION 3.5)
set(MAIN_SRCS main/example_spp_initiator_demo.c)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(bt_spp_initiator_demo)

View File

@ -0,0 +1,4 @@
set(COMPONENT_SRCS "example_spp_initiator_demo.c")
set(COMPONENT_ADD_INCLUDEDIRS ".")
register_component()

View File

@ -1,10 +1,6 @@
# The following four 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
cmake_minimum_required(VERSION 3.5)
set(MAIN_SRCS
main/example_spp_vfs_acceptor_demo.c
main/spp_task.c)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(bt_spp_vfs_acceptor_demo)

View File

@ -0,0 +1,5 @@
set(COMPONENT_SRCS "example_spp_vfs_acceptor_demo.c"
"spp_task.c")
set(COMPONENT_ADD_INCLUDEDIRS ".")
register_component()

View File

@ -1,10 +1,6 @@
# The following four 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
cmake_minimum_required(VERSION 3.5)
set(MAIN_SRCS
main/example_spp_vfs_initiator_demo.c
main/spp_task.c)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(bt_spp_vfs_initiator_demo)

View File

@ -0,0 +1,5 @@
set(COMPONENT_SRCS "example_spp_vfs_initiator_demo.c"
"spp_task.c")
set(COMPONENT_ADD_INCLUDEDIRS ".")
register_component()

View File

@ -1,8 +1,6 @@
# The following four 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
cmake_minimum_required(VERSION 3.5)
set(MAIN_SRCS main/controller_hci_uart_demo.c)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(controller_hci_uart)

View File

@ -0,0 +1,4 @@
set(COMPONENT_SRCS "controller_hci_uart_demo.c")
set(COMPONENT_ADD_INCLUDEDIRS ".")
register_component()

View File

@ -1,8 +1,6 @@
# The following four 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
cmake_minimum_required(VERSION 3.5)
set(MAIN_SRCS main/gattc_demo.c)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(gatt_client_demo)

View File

@ -0,0 +1,4 @@
set(COMPONENT_SRCS "gattc_demo.c")
set(COMPONENT_ADD_INCLUDEDIRS ".")
register_component()

View File

@ -1,8 +1,6 @@
# The following four 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
cmake_minimum_required(VERSION 3.5)
set(MAIN_SRCS main/example_ble_sec_gattc_demo.c)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(sec_gattc_demo)

View File

@ -0,0 +1,4 @@
set(COMPONENT_SRCS "example_ble_sec_gattc_demo.c")
set(COMPONENT_ADD_INCLUDEDIRS ".")
register_component()

View File

@ -1,8 +1,6 @@
# The following four 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
cmake_minimum_required(VERSION 3.5)
set(MAIN_SRCS main/example_ble_sec_gatts_demo.c)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(sec_gatts_demo)

View File

@ -0,0 +1,4 @@
set(COMPONENT_SRCS "example_ble_sec_gatts_demo.c")
set(COMPONENT_ADD_INCLUDEDIRS ".")
register_component()

View File

@ -1,8 +1,6 @@
# The following four 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
cmake_minimum_required(VERSION 3.5)
set(MAIN_SRCS main/gatts_demo.c)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(gatt_server_demos)

View File

@ -0,0 +1,4 @@
set(COMPONENT_SRCS "gatts_demo.c")
set(COMPONENT_ADD_INCLUDEDIRS ".")
register_component()

View File

@ -1,8 +1,6 @@
# The following four 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
cmake_minimum_required(VERSION 3.5)
set(MAIN_SRCS main/gatts_table_creat_demo.c)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(gatt_server_service_table_demo)

View File

@ -0,0 +1,4 @@
set(COMPONENT_SRCS "gatts_table_creat_demo.c")
set(COMPONENT_ADD_INCLUDEDIRS ".")
register_component()

View File

@ -1,8 +1,6 @@
# The following four 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
cmake_minimum_required(VERSION 3.5)
set(MAIN_SRCS main/gattc_multi_connect.c)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(gatt_multi_connect)

View File

@ -0,0 +1,4 @@
set(COMPONENT_SRCS "gattc_multi_connect.c")
set(COMPONENT_ADD_INCLUDEDIRS ".")
register_component()

View File

@ -1,8 +1,6 @@
# The following four 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
cmake_minimum_required(VERSION 3.5)
set(MAIN_SRCS main/ethernet_example_main.c)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(ethernet_demo)

View File

@ -0,0 +1,4 @@
set(COMPONENT_SRCS "ethernet_example_main.c")
set(COMPONENT_ADD_INCLUDEDIRS ".")
register_component()

View File

@ -2,7 +2,5 @@
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.5)
set(MAIN_SRCS main/blink.c)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(blink)

View File

@ -0,0 +1,4 @@
set(COMPONENT_SRCS "blink.c")
set(COMPONENT_ADD_INCLUDEDIRS ".")
register_component()

Some files were not shown because too many files have changed in this diff Show More