-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)
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)
-set(COMPONENT_SRCDIRS ".")
+set(COMPONENT_SRCS "esp_ota_ops.c")
set(COMPONENT_ADD_INCLUDEDIRS "include")
set(COMPONENT_REQUIRES spi_flash partition_table)
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)
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()
"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)
--- /dev/null
+set(COMPONENT_SRCS "bootloader_start.c")
+set(COMPONENT_ADD_INCLUDEDIRS "")
+set(COMPONENT_REQUIRES "bootloader bootloader_support")
+register_component()
-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")
if(CONFIG_BT_ENABLED)
- set(COMPONENT_SRCDIRS .)
+ set(COMPONENT_SRCS "bt.c")
set(COMPONENT_ADD_INCLUDEDIRS include)
if(CONFIG_BLUEDROID_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()
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)
-set(COMPONENT_SRCDIRS ".")
+set(COMPONENT_SRCS "cxx_exception_stubs.cpp"
+ "cxx_guards.cpp")
set(COMPONENT_REQUIRES)
register_component()
-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")
-set(COMPONENT_SRCDIRS ".")
+set(COMPONENT_SRCS "esp_tls.c")
set(COMPONENT_ADD_INCLUDEDIRS ".")
set(COMPONENT_REQUIRES mbedtls)
# 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
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)
-set(COMPONENT_SRCDIRS ".")
+set(COMPONENT_SRCS "esp_adc_cal.c")
set(COMPONENT_ADD_INCLUDEDIRS "include")
set(COMPONENT_REQUIRES)
-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")
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)
-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)
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)
-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)
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()
-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)
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)
-set(COMPONENT_SRCDIRS "src")
+set(COMPONENT_SRCS "src/jsmn.c")
set(COMPONENT_ADD_INCLUDEDIRS "include")
set(COMPONENT_REQUIRES "")
-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 "")
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)
-set(COMPONENT_SRCDIRS ".")
+set(COMPONENT_SRCS "log.c")
set(COMPONENT_ADD_INCLUDEDIRS "include")
set(COMPONENT_REQUIRES)
register_component()
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)
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)
-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)
-# 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)
-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)
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()
-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)
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)
-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()
-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()
-set(COMPONENT_SRCDIRS ".")
+set(COMPONENT_SRCS "smartconfig_ack.c")
set(COMPONENT_ADD_INCLUDEDIRS "include")
set(COMPONENT_PRIV_REQUIRES lwip tcpip_adapter)
set(SOC_NAME esp32)
-set(COMPONENT_SRCDIRS ${SOC_NAME} src)
-set(COMPONENT_ADD_INCLUDEDIRS ${SOC_NAME}/include include)
+include(${IDF_PATH}/components/soc/${SOC_NAME}/sources.cmake)
-set(COMPONENT_REQUIRES)
+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)
-register_component()
+set(COMPONENT_REQUIRES)
+register_component()
\ No newline at end of file
--- /dev/null
+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")
\ No newline at end of file
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()
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)
-set(COMPONENT_SRCDIRS ".")
+set(COMPONENT_SRCS "tcpip_adapter_lwip.c")
set(COMPONENT_ADD_INCLUDEDIRS "include")
set(COMPONENT_REQUIRES lwip)
-set(COMPONENT_SRCDIRS ".")
+set(COMPONENT_SRCS "ulp.c"
+ "ulp_macro.c")
set(COMPONENT_ADD_INCLUDEDIRS "include")
set(COMPONENT_REQUIRES)
-set(COMPONENT_SRCDIRS ".")
+set(COMPONENT_SRCS "vfs.c"
+ "vfs_uart.c")
set(COMPONENT_ADD_INCLUDEDIRS "include")
set(COMPONENT_REQUIRES)
-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)
-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 "")
-set(COMPONENT_SRCDIRS ".")
+set(COMPONENT_SRCS "eri.c"
+ "trax.c")
set(COMPONENT_ADD_INCLUDEDIRS "include")
set(COMPONENT_REQUIRES "")
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.
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)
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.
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.
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
---------------------------------
- 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:
.. highlight:: cmake
-The preferred way to include source files in an ESP-IDF component is to set ``COMPONENT_SRC_DIRS``::
+The preferred way to include source files in an ESP-IDF component is to list them manually in COMPONENT_SRCS::
- set(COMPONENT_SRCDIRS library platform)
+ set(COMPONENT_SRCS library/a.c library/b.c platform/platform.c)
-The build system will automatically find (via "file globbing") all source files in this directory. Alternatively, files can be specified individually::
+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_SRCS library/a.c library/b.c platform/platform.c)
+ set(COMPONENT_SRCDIRS library platform)
-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 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.
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
----------------------------
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
# 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)
--- /dev/null
+set(COMPONENT_SRCS "bt_app_av.c"
+ "bt_app_core.c"
+ "main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
# 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)
--- /dev/null
+set(COMPONENT_SRCS "bt_app_av.c"
+ "bt_app_core.c"
+ "main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
# 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)
--- /dev/null
+set(COMPONENT_SRCS "bt_app_core.c"
+ "main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
# 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)
--- /dev/null
+set(COMPONENT_SRCS "app_bt.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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)
--- /dev/null
+set(COMPONENT_SRCS "esp_eddystone_api.c"
+ "esp_eddystone_demo.c")
+set(COMPONENT_ADD_INCLUDEDIRS "")
+
+register_component()
-# 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)
--- /dev/null
+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()
-# 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)
--- /dev/null
+set(COMPONENT_SRCS "esp_ibeacon_api.c"
+ "ibeacon_demo.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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)
--- /dev/null
+set(COMPONENT_SRCS "spp_client_demo.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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)
--- /dev/null
+set(COMPONENT_SRCS "ble_spp_server_demo.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
# 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)
--- /dev/null
+set(COMPONENT_SRCS "example_ble_client_throughput.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
# 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)
--- /dev/null
+set(COMPONENT_SRCS "example_ble_server_throughput.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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)
--- /dev/null
+set(COMPONENT_SRCS "blufi_example_main.c"
+ "blufi_security.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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)
--- /dev/null
+set(COMPONENT_SRCS "bt_discovery.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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)
--- /dev/null
+set(COMPONENT_SRCS "example_spp_acceptor_demo.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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)
--- /dev/null
+set(COMPONENT_SRCS "example_spp_initiator_demo.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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)
--- /dev/null
+set(COMPONENT_SRCS "example_spp_vfs_acceptor_demo.c"
+ "spp_task.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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)
--- /dev/null
+set(COMPONENT_SRCS "example_spp_vfs_initiator_demo.c"
+ "spp_task.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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)
--- /dev/null
+set(COMPONENT_SRCS "controller_hci_uart_demo.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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)
--- /dev/null
+set(COMPONENT_SRCS "gattc_demo.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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)
--- /dev/null
+set(COMPONENT_SRCS "example_ble_sec_gattc_demo.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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)
--- /dev/null
+set(COMPONENT_SRCS "example_ble_sec_gatts_demo.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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)
--- /dev/null
+set(COMPONENT_SRCS "gatts_demo.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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)
--- /dev/null
+set(COMPONENT_SRCS "gatts_table_creat_demo.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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)
--- /dev/null
+set(COMPONENT_SRCS "gattc_multi_connect.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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)
--- /dev/null
+set(COMPONENT_SRCS "ethernet_example_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
# 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)
--- /dev/null
+set(COMPONENT_SRCS "blink.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.5)
-set(MAIN_SRCS main/hello_world_main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(hello-world)
--- /dev/null
+set(COMPONENT_SRCS "hello_world_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS "")
+
+register_component()
\ No newline at end of file
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.5)
-set(MAIN_SRCS main/mesh_light.c main/mesh_main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(internal_transceiver)
-
-include_directories(main/include)
-
--- /dev/null
+set(COMPONENT_SRCS "mesh_light.c"
+ "mesh_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ". include")
+
+register_component()
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.5)
-set(MAIN_SRCS main/mesh_light.c main/mesh_main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(internal_transceiver)
-
-include_directories(main/include)
-
--- /dev/null
+set(COMPONENT_SRCS "mesh_light.c"
+ "mesh_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ". include")
+
+register_component()
-# 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/adc1_example_main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(adc)
--- /dev/null
+set(COMPONENT_SRCS "adc1_example_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/adc2_example_main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(adc2)
--- /dev/null
+set(COMPONENT_SRCS "adc2_example_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/can_alert_and_recovery_example_main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(can_alert_and_recovery_example)
--- /dev/null
+set(COMPONENT_SRCS "can_alert_and_recovery_example_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/can_network_example_listen_only_main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(can_network_listen_only)
--- /dev/null
+set(COMPONENT_SRCS "can_network_example_listen_only_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/can_network_example_master_main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(can_network_master)
--- /dev/null
+set(COMPONENT_SRCS "can_network_example_master_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/can_network_example_slave_main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(can_network_slave)
--- /dev/null
+set(COMPONENT_SRCS "can_network_example_slave_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/can_self_test_example_main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(can_self_test_example)
--- /dev/null
+set(COMPONENT_SRCS "can_self_test_example_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/gpio_example_main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(gpio)
--- /dev/null
+set(COMPONENT_SRCS "gpio_example_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/i2c_example_main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(i2c)
--- /dev/null
+set(COMPONENT_SRCS "i2c_example_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/i2s_example_main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(esp32-i2s-driver-example)
--- /dev/null
+set(COMPONENT_SRCS "i2s_example_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/app_main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(i2s-adc-dac)
--- /dev/null
+set(COMPONENT_SRCS "app_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/ledc_example_main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(ledc)
--- /dev/null
+set(COMPONENT_SRCS "ledc_example_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/mcpwm_basic_config_example.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(mcpwm_basic_config)
--- /dev/null
+set(COMPONENT_SRCS "mcpwm_basic_config_example.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/mcpwm_bldc_control_hall_sensor_example.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(mcpwm_bldc_control_hall_sensor)
--- /dev/null
+set(COMPONENT_SRCS "mcpwm_bldc_control_hall_sensor_example.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/mcpwm_brushed_dc_control_example.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(mcpwm_brushed_dc_control)
--- /dev/null
+set(COMPONENT_SRCS "mcpwm_brushed_dc_control_example.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/mcpwm_servo_control_example.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(mcpwm_servo_control)
--- /dev/null
+set(COMPONENT_SRCS "mcpwm_servo_control_example.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/pcnt_example_main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(pcnt)
--- /dev/null
+set(COMPONENT_SRCS "pcnt_example_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/infrared_nec_main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(infrared_nec)
--- /dev/null
+set(COMPONENT_SRCS "infrared_nec_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/rmt_tx_main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(rmt_tx)
--- /dev/null
+set(COMPONENT_SRCS "rmt_tx_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/app_main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(sdio_host)
-set(COMPONENT_SRCDIRS ".")
+set(COMPONENT_SRCS "esp_slave.c")
set(COMPONENT_ADD_INCLUDEDIRS "include")
set(COMPONENT_REQUIRES driver sdmmc)
--- /dev/null
+set(COMPONENT_SRCS "app_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/app_main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(sdio_slave)
--- /dev/null
+set(COMPONENT_SRCS "app_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/sigmadelta_example_main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(sigmadelta)
--- /dev/null
+set(COMPONENT_SRCS "sigmadelta_example_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/spi_master_example_main.c
- main/pretty_effect.c
- main/decode_image.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(spi_master)
-
-# Embed the image into the final binary
-#
-# (If this was a component, we would set COMPONENT_EMBED_TXTFILES here.)
-target_add_binary_data(spi_master.elf
- "main/image.jpg" BINARY)
--- /dev/null
+set(COMPONENT_SRCS "decode_image.c"
+ "pretty_effect.c"
+ "spi_master_example_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+
+set(COMPONENT_EMBED_FILES image.jpg)
+
+register_component()
-# 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/app_main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(spi-slave-receiver)
--- /dev/null
+set(COMPONENT_SRCS "app_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/app_main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(spi-slave-sender)
--- /dev/null
+set(COMPONENT_SRCS "app_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/timer_group_example_main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(timer_group)
--- /dev/null
+set(COMPONENT_SRCS "timer_group_example_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/tp_interrupt_main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(touch_pad_interrupt)
--- /dev/null
+set(COMPONENT_SRCS "tp_interrupt_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/tp_read_main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(touch_pad_read)
--- /dev/null
+set(COMPONENT_SRCS "tp_read_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/uart_async_rxtxtasks_main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(uart_async_rxtxtasks)
--- /dev/null
+set(COMPONENT_SRCS "uart_async_rxtxtasks_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/uart_echo_example_main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(uart_echo)
--- /dev/null
+set(COMPONENT_SRCS "uart_echo_example_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/rs485_example.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(echo_rs485)
--- /dev/null
+set(COMPONENT_SRCS "rs485_example.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/uart_events_example_main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(uart_events)
--- /dev/null
+set(COMPONENT_SRCS "uart_events_example_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/uart_select_example_main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(uart_select)
--- /dev/null
+set(COMPONENT_SRCS "uart_select_example_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/chat_client.cpp)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(asio_chat_client)
-set(COMPONENT_SRCDIRS ".")
+set(COMPONENT_SRCS "wifi_asio.cpp")
set(COMPONENT_PRIV_REQUIRES asio nvs_flash console)
--- /dev/null
+set(COMPONENT_SRCS "chat_client.cpp")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/chat_server.cpp)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(asio_chat_server)
-set(COMPONENT_SRCDIRS ".")
+set(COMPONENT_SRCS "wifi_asio.cpp")
set(COMPONENT_PRIV_REQUIRES asio nvs_flash console)
--- /dev/null
+set(COMPONENT_SRCS "chat_server.cpp")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/echo_server.cpp)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(asio_tcp_echo_server)
-set(COMPONENT_SRCDIRS ".")
+set(COMPONENT_SRCS "wifi_asio.cpp")
set(COMPONENT_PRIV_REQUIRES asio nvs_flash console)
--- /dev/null
+set(COMPONENT_SRCS "echo_server.cpp")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/udp_echo_server.cpp)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(asio_udp_echo_server)
-set(COMPONENT_SRCDIRS ".")
+set(COMPONENT_SRCS "wifi_asio.cpp")
set(COMPONENT_PRIV_REQUIRES asio nvs_flash console)
--- /dev/null
+set(COMPONENT_SRCS "udp_echo_server.cpp")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/subscribe_publish_sample.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
-project(subscribe_publish)
-
-# Embed the certificate data directly in the built binary
-target_add_binary_data(subscribe_publish.elf main/certs/aws-root-ca.pem TEXT)
-target_add_binary_data(subscribe_publish.elf main/certs/certificate.pem.crt TEXT)
-target_add_binary_data(subscribe_publish.elf main/certs/private.pem.key TEXT)
+project(subscribe_publish)
\ No newline at end of file
--- /dev/null
+set(COMPONENT_SRCS "subscribe_publish_sample.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+
+register_component()
+
+if(CONFIG_EXAMPLE_EMBEDDED_CERTS)
+target_add_binary_data(${COMPONENT_NAME} "certs/aws-root-ca.pem" TEXT)
+
+if(NOT IDF_CI_BUILD)
+ add_custom_command(OUTPUT certs/certificate.pem.crt certs/private.pem.key
+ COMMAND echo "Dummy certificate data for continuous integration" >
+ certs/certificate.pem.crt
+ COMMAND echo "Dummy certificate data for continuous integration" >
+ certs/private.pem.key
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+ VERBATIM)
+ add_custom_target(example_certificates DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/certs/certificate.pem.crt ${CMAKE_CURRENT_BINARY_DIR}/certs/private.pem.key)
+
+ add_dependencies(${COMPONENT_NAME} example_certificates)
+
+ target_add_binary_data(${COMPONENT_NAME} "${CMAKE_CURRENT_BINARY_DIR}/certs/certificate.pem.crt" TEXT)
+ target_add_binary_data(${COMPONENT_NAME} "${CMAKE_CURRENT_BINARY_DIR}/certs/private.pem.key" TEXT)
+else()
+ target_add_binary_data(${COMPONENT_NAME} "certs/certificate.pem.crt" TEXT)
+ target_add_binary_data(${COMPONENT_NAME} "certs/private.pem.key" TEXT)
+endif()
+endif()
\ No newline at end of file
-# 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/thing_shadow_sample.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(thing_shadow)
-
-# Embed the certificate data directly in the built binary
-target_add_binary_data(thing_shadow.elf main/certs/aws-root-ca.pem TEXT)
-target_add_binary_data(thing_shadow.elf main/certs/certificate.pem.crt TEXT)
-target_add_binary_data(thing_shadow.elf main/certs/private.pem.key TEXT)
--- /dev/null
+set(COMPONENT_SRCS "thing_shadow_sample.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+
+register_component()
+
+if(CONFIG_EXAMPLE_EMBEDDED_CERTS)
+target_add_binary_data(${COMPONENT_NAME} "certs/aws-root-ca.pem" TEXT)
+
+if(NOT IDF_CI_BUILD)
+ add_custom_command(OUTPUT certs/certificate.pem.crt certs/private.pem.key
+ COMMAND echo "Dummy certificate data for continuous integration" >
+ certs/certificate.pem.crt
+ COMMAND echo "Dummy certificate data for continuous integration" >
+ certs/private.pem.key
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+ VERBATIM)
+ add_custom_target(example_certificates DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/certs/certificate.pem.crt ${CMAKE_CURRENT_BINARY_DIR}/certs/private.pem.key)
+
+ add_dependencies(${COMPONENT_NAME} example_certificates)
+
+ target_add_binary_data(${COMPONENT_NAME} "${CMAKE_CURRENT_BINARY_DIR}/certs/certificate.pem.crt" TEXT)
+ target_add_binary_data(${COMPONENT_NAME} "${CMAKE_CURRENT_BINARY_DIR}/certs/private.pem.key" TEXT)
+else()
+ target_add_binary_data(${COMPONENT_NAME} "certs/certificate.pem.crt" TEXT)
+ target_add_binary_data(${COMPONENT_NAME} "certs/private.pem.key" TEXT)
+endif()
+endif()
\ No newline at end of file
-# 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/coap_client_example_main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(coap_client)
--- /dev/null
+set(COMPONENT_SRCS "coap_client_example_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/coap_server_example_main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(coap_server)
--- /dev/null
+set(COMPONENT_SRCS "coap_server_example_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.5)
-set(MAIN_SRCS main/esp_http_client_example.c main/app_wifi.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(esp-http-client-example)
-
-# Embed the server root certificate into the final binary
-#
-# (If this was a component, we would set COMPONENT_EMBED_TXTFILES here.)
-target_add_binary_data(esp-http-client-example.elf
- "main/howsmyssl_com_root_cert.pem" TEXT)
--- /dev/null
+set(COMPONENT_SRCS "app_wifi.c"
+ "esp_http_client_example.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+
+# Embed the server root certificate into the final binary
+#
+# (If this was a component, we would set COMPONENT_EMBED_TXTFILES here.)
+set(COMPONENT_EMBED_TXTFILES howsmyssl_com_root_cert.pem)
+
+register_component()
-# 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/http2_request_example_main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(http2-request)
set(COMPONENT_ADD_INCLUDEDIRS .)
-set(COMPONENT_SRCDIRS .)
+set(COMPONENT_SRCS "sh2lib.c")
set(COMPONENT_REQUIRES nghttp)
set(COMPONENT_PRIV_REQUIRES lwip esp-tls)
--- /dev/null
+set(COMPONENT_SRCS "http2_request_example_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/http_request_example_main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(http-request)
--- /dev/null
+set(COMPONENT_SRCS "http_request_example_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/tests.c main/main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(tests)
--- /dev/null
+set(COMPONENT_SRCS "main.c"
+ "tests.c")
+set(COMPONENT_ADD_INCLUDEDIRS ". include")
+
+register_component()
-# 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/main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(persistent_sockets)
--- /dev/null
+set(COMPONENT_SRCS "main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(simple)
-
-
--- /dev/null
+set(COMPONENT_SRCS "main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.5)
-set(MAIN_SRCS main/https_mbedtls_example_main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
-project(https-mbedtls)
-
-# Embed the server root certificate into the final binary
-#
-# (If this was a component, we would set COMPONENT_EMBED_TXTFILES here.)
-target_add_binary_data(https-mbedtls.elf
- "main/server_root_cert.pem" TEXT)
+project(https-mbedtls)
\ No newline at end of file
--- /dev/null
+set(COMPONENT_SRCS "https_mbedtls_example_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+
+# Embed the server root certificate into the final binary
+#
+# (If this was a component, we would set COMPONENT_EMBED_TXTFILES here.)
+set(COMPONENT_EMBED_TXTFILES server_root_cert.pem)
+
+register_component()
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.5)
-set(MAIN_SRCS main/https_request_example_main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(https_request)
-
-# Embed the server root certificate into the final binary
-#
-# (If this was a component, we would set COMPONENT_EMBED_TXTFILES here.)
-target_add_binary_data(https_request.elf
- "main/server_root_cert.pem" TEXT)
--- /dev/null
+set(COMPONENT_SRCS "https_request_example_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+
+# Embed the server root certificate into the final binary
+#
+# (If this was a component, we would set COMPONENT_EMBED_TXTFILES here.)
+set(COMPONENT_EMBED_TXTFILES server_root_cert.pem)
+
+register_component()
-# 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/mdns_example_main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(mdns-test)
--- /dev/null
+set(COMPONENT_SRCS "mdns_example_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/openssl_client_example_main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(openssl_client)
--- /dev/null
+set(COMPONENT_SRCS "openssl_client_example_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/openssl_server_example_main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(openssl_server)
-
-# Embed the certificate & key data directly in the built binary
-target_add_binary_data(openssl_server.elf main/cacert.pem TEXT)
-target_add_binary_data(openssl_server.elf main/prvtkey.pem TEXT)
--- /dev/null
+set(COMPONENT_SRCS "openssl_server_example_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+
+# Embed the certificate & key data directly in the built binary
+set(COMPONENT_EMBED_TXTFILES cacert.pem prvtkey.pem)
+
+register_component()
-# 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/pppos_client_main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(pppos_client)
--- /dev/null
+set(COMPONENT_SRCS "pppos_client_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/sntp_example_main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(sntp)
--- /dev/null
+set(COMPONENT_SRCS "sntp_example_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/udp_multicast_example_main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(udp-multicast)
--- /dev/null
+set(COMPONENT_SRCS "udp_multicast_example_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/nvs_blob_example_main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(nvs-rw-blob)
--- /dev/null
+set(COMPONENT_SRCS "nvs_blob_example_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/nvs_value_example_main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(nvs-rw-value)
--- /dev/null
+set(COMPONENT_SRCS "nvs_value_example_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/sd_card_example_main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(sd_card)
--- /dev/null
+set(COMPONENT_SRCS "sd_card_example_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/spiffs_example_main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(spiffs)
--- /dev/null
+set(COMPONENT_SRCS "spiffs_example_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/wear_levelling_example_main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(wear_levelling_example)
--- /dev/null
+set(COMPONENT_SRCS "wear_levelling_example_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/app_trace_to_host_test.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(app_trace_to_host_test)
--- /dev/null
+set(COMPONENT_SRCS "app_trace_to_host_test.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/base_mac_address_example_main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(base_mac_address)
--- /dev/null
+set(COMPONENT_SRCS "base_mac_address_example_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/cmd_wifi.c main/console_example_main.c main/cmd_system.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(console)
--- /dev/null
+set(COMPONENT_SRCS "cmd_system.c"
+ "cmd_wifi.c"
+ "console_example_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/exception_example_main.cpp)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
-project(cpp_exceptions_example)
+project(console)
--- /dev/null
+set(COMPONENT_SRCS "exception_example_main.cpp")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/deep_sleep_example_main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(deep_sleep)
--- /dev/null
+set(COMPONENT_SRCS "deep_sleep_example_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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_timer_example_main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(esp_timer_example)
--- /dev/null
+set(COMPONENT_SRCS "esp_timer_example_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/gcov_example_func.c main/gcov_example.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(gcov_example)
--- /dev/null
+set(COMPONENT_SRCS "gcov_example.c"
+ "gcov_example_func.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/native_ota_example.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(native_ota)
-
-# Embed the server root certificate into the final binary
-#
-# (If this was a component, we would set COMPONENT_EMBED_TXTFILES here.)
-target_add_binary_data(native_ota.elf
- "../server_certs/ca_cert.pem" TEXT)
--- /dev/null
+set(COMPONENT_SRCS "native_ota_example.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+
+# Embed the server root certificate into the final binary
+#
+# (If this was a component, we would set COMPONENT_EMBED_TXTFILES here.)
+set(COMPONENT_EMBED_TXTFILES ../../server_certs/ca_cert.pem)
+
+register_component()
-# 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/simple_ota_example.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
-project(simple_ota)
-
-# Embed the server root certificate into the final binary
-#
-# (If this was a component, we would set COMPONENT_EMBED_TXTFILES here.)
-target_add_binary_data(simple_ota.elf
- "../server_certs/ca_cert.pem" TEXT)
+project(simple_ota)
\ No newline at end of file
--- /dev/null
+set(COMPONENT_SRCS "simple_ota_example.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+
+# Embed the server root certificate into the final binary
+#
+# (If this was a component, we would set COMPONENT_EMBED_TXTFILES here.)
+set(COMPONENT_EMBED_TXTFILES ../../server_certs/ca_cert.pem)
+
+
+register_component()
-# 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/select_example.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(select)
--- /dev/null
+set(COMPONENT_SRCS "select_example.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/task_watchdog_example_main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(task_watchdog)
--- /dev/null
+set(COMPONENT_SRCS "task_watchdog_example_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/espnow_example_main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(espnow_example)
--- /dev/null
+set(COMPONENT_SRCS "espnow_example_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.5)
-set(MAIN_SRCS main/simple_wifi.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(simple_wifi)
--- /dev/null
+set(COMPONENT_SRCS "softap_example_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.5)
-set(MAIN_SRCS main/station_example_main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(wifi_station)
--- /dev/null
+set(COMPONENT_SRCS "station_example_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/cmd_wifi.c main/main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(iperf)
set(COMPONENT_ADD_INCLUDEDIRS .)
-set(COMPONENT_SRCDIRS .)
+set(COMPONENT_SRCS "iperf.c")
set(COMPONENT_PRIV_REQUIRES lwip)
--- /dev/null
+set(COMPONENT_SRCS "cmd_wifi.c"
+ "main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/power_save.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(power_save)
--- /dev/null
+set(COMPONENT_SRCS "power_save.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/scan.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(scan)
--- /dev/null
+set(COMPONENT_SRCS "scan.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
--- /dev/null
+set(COMPONENT_SRCS "simple_wifi.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
-# 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/smartconfig_main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(smart_config)
--- /dev/null
+set(COMPONENT_SRCS "smartconfig_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
# (Automatically converted from project Makefile by convert_to_cmake.py.)
-# 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/wpa2_enterprise_main.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(wpa2-enterprise)
-
-# Embed CA, certificate & key directly into binary
-target_add_binary_data(wpa2-enterprise.elf main/wpa2_ca.pem TEXT)
-target_add_binary_data(wpa2-enterprise.elf main/wpa2_client.crt TEXT)
-target_add_binary_data(wpa2-enterprise.elf main/wpa2_client.key TEXT)
-
--- /dev/null
+set(COMPONENT_SRCS "wpa2_enterprise_main.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+
+# Embed CA, certificate & key directly into binary
+set(COMPONENT_EMBED_TXTFILES wpa2_ca.pem wpa2_client.crt wpa2_client.key)
+
+register_component()
-# 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/wps.c)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(wps_example)
--- /dev/null
+set(COMPONENT_SRCS "wps.c")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
LOG_SUSPECTED=${LOG_PATH}/common_log.txt
touch ${LOG_SUSPECTED}
-EXAMPLE_PATHS=$( find ${IDF_PATH}/examples/ -type f -name CMakeLists.txt | grep -v "/components/" | sort )
+EXAMPLE_PATHS=$( find ${IDF_PATH}/examples/ -type f -name CMakeLists.txt | grep -v "/components/" | grep -v "/main/" | sort )
if [ $# -eq 0 ]
then
# While we support GNU Make & CMake together, check the same examples are present for both
-CMAKE_EXAMPLE_PATHS=$( find ${IDF_PATH}/examples/ -type f -name CMakeLists.txt | grep -v "/components/")
+CMAKE_EXAMPLE_PATHS=$( find ${IDF_PATH}/examples/ -type f -name CMakeLists.txt | grep -v "/components/" | grep -v "/main/")
MAKE_EXAMPLE_PATHS=$( find ${IDF_PATH}/examples/ -type f -name Makefile )
# temporary: ignore ULP examples as no ULP toolchain support
take_build_snapshot
touch ${IDF_PATH}/components/bootloader/subproject/main/bootloader_start.c
idf.py build || failure "Failed to partial build bootloader"
- assert_rebuilt ${BOOTLOADER_BINS} bootloader/CMakeFiles/bootloader.elf.dir/main/bootloader_start.c.obj
+ assert_rebuilt ${BOOTLOADER_BINS} bootloader/main/CMakeFiles/main.dir/bootloader_start.c.obj
assert_not_rebuilt ${APP_BINS} ${PARTITION_BIN}
print_status "Partition CSV file rebuilds partitions"
spaces2list(COMPONENT_ADD_INCLUDEDIRS)
spaces2list(COMPONENT_SRCEXCLUDE)
- # Add to COMPONENT_SRCS by globbing in COMPONENT_SRCDIRS
- if(NOT COMPONENT_SRCS)
+ if(COMPONENT_SRCDIRS)
+ # Warn user if both COMPONENT_SRCDIRS and COMPONENT_SRCS are set
+ if(COMPONENT_SRCS)
+ message(WARNING "COMPONENT_SRCDIRS and COMPONENT_SRCS are both set, COMPONENT_SRCS will be ignored")
+ endif()
+
+ set(COMPONENT_SRCS "")
+
foreach(dir ${COMPONENT_SRCDIRS})
get_filename_component(abs_dir ${dir} ABSOLUTE BASE_DIR ${component_dir})
if(NOT IS_DIRECTORY ${abs_dir})
if src is not None:
srcs.append(src)
make_vars["COMPONENT_SRCS"] = " ".join(srcs)
- else: # Use COMPONENT_SRCDIRS
- make_vars["COMPONENT_SRCDIRS"] = make_vars.get("COMPONENT_SRCDIRS", ".")
+ else:
+ component_srcs = list()
+ for component_srcdir in make_vars.get("COMPONENT_SRCDIRS", ".").split(" "):
+ component_srcdir_path = os.path.abspath(os.path.join(component_path, component_srcdir))
+
+ srcs = list()
+ srcs += glob.glob(os.path.join(component_srcdir_path, "*.[cS]"))
+ srcs += glob.glob(os.path.join(component_srcdir_path, "*.cpp"))
+ srcs = [('"%s"' % str(os.path.relpath(s, component_path))) for s in srcs]
make_vars["COMPONENT_ADD_INCLUDEDIRS"] = make_vars.get("COMPONENT_ADD_INCLUDEDIRS", "include")
+ component_srcs += srcs
+ make_vars["COMPONENT_SRCS"] = " ".join(component_srcs)
+
return make_vars
component_paths = project_vars["COMPONENT_PATHS"].split(" ")
- # "main" component is made special in cmake, so extract it from the component_paths list
- try:
- main_component_path = [ p for p in component_paths if os.path.basename(p) == "main" ][0]
- if debug:
- print("Found main component %s" % main_component_path)
- main_vars = get_component_variables(project_path, main_component_path)
- except IndexError:
- print("WARNING: Project has no 'main' component, but CMake-based system requires at least one file in MAIN_SRCS...")
- main_vars = { "COMPONENT_SRCS" : ""} # dummy for MAIN_SRCS
-
- # Remove main component from list of components we're converting to cmake
- component_paths = [ p for p in component_paths if os.path.basename(p) != "main" ]
-
# Convert components as needed
for p in component_paths:
convert_component(project_path, p)
- # Look up project variables before we start writing the file, so nothing
- # is created if there is an error
-
- main_srcs = main_vars["COMPONENT_SRCS"].split(" ")
- # convert from component-relative to absolute paths
- main_srcs = [ os.path.normpath(os.path.join(main_component_path, m)) for m in main_srcs ]
- # convert to make relative to the project directory
- main_srcs = [ os.path.relpath(m, project_path) for m in main_srcs ]
-
project_name = project_vars["PROJECT_NAME"]
# Generate the project CMakeLists.txt file
f.write("""
# (Automatically converted from project Makefile by convert_to_cmake.py.)
-# 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)
""")
- f.write("set(MAIN_SRCS %s)\n" % " ".join(main_srcs))
f.write("""
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
""")
# Look up all the variables before we start writing the file, so it's not
# created if there's an erro
component_srcs = v.get("COMPONENT_SRCS", None)
- component_srcdirs = None
- if component_srcs is not None:
- # see if we should be using COMPONENT_SRCS or COMPONENT_SRCDIRS, if COMPONENT_SRCS is everything in SRCDIRS
- component_allsrcs = []
- for d in v.get("COMPONENT_SRCDIRS", "").split(" "):
- component_allsrcs += glob.glob(os.path.normpath(os.path.join(component_path, d, "*.[cS]")))
- component_allsrcs += glob.glob(os.path.normpath(os.path.join(component_path, d, "*.cpp")))
- abs_component_srcs = [os.path.normpath(os.path.join(component_path, p)) for p in component_srcs.split(" ")]
- if set(component_allsrcs) == set(abs_component_srcs):
- component_srcdirs = v.get("COMPONENT_SRCDIRS")
component_add_includedirs = v["COMPONENT_ADD_INCLUDEDIRS"]
cflags = v.get("CFLAGS", None)
f.write("set(COMPONENT_REQUIRES "")\n")
f.write("set(COMPONENT_PRIV_REQUIRES "")\n\n")
- if component_srcdirs is not None:
- f.write("set(COMPONENT_SRCDIRS %s)\n\n" % component_srcdirs)
- f.write("register_component()\n")
- elif component_srcs is not None:
+ if component_srcs is not None:
f.write("set(COMPONENT_SRCS %s)\n\n" % component_srcs)
f.write("register_component()\n")
else:
# (cmake calls this CMAKE_SOURCE_DIR, keeping old name for compatibility.)
set(PROJECT_PATH "${CMAKE_SOURCE_DIR}")
- # Note: Unlike older build system, "main" is no longer a component. See build docs for details.
- set_default(COMPONENT_DIRS "${PROJECT_PATH}/components ${EXTRA_COMPONENT_DIRS} ${IDF_PATH}/components")
+ if(MAIN_SRCS)
+ message(WARNING "main is now a component, use of MAIN_SRCS is deprecated")
+ set_default(COMPONENT_DIRS "${PROJECT_PATH}/components ${EXTRA_COMPONENT_DIRS} \
+ ${IDF_PATH}/components")
+ else()
+ set_default(COMPONENT_DIRS "${PROJECT_PATH}/components ${EXTRA_COMPONENT_DIRS} \
+ ${IDF_PATH}/components ${PROJECT_PATH}/main")
+ endif()
+
spaces2list(COMPONENT_DIRS)
spaces2list(COMPONENTS)
function(idf_add_executable)
set(exe_target ${PROJECT_NAME}.elf)
- spaces2list(MAIN_SRCS)
- add_executable(${exe_target} "${MAIN_SRCS}")
+ if(MAIN_SRCS)
+ spaces2list(MAIN_SRCS)
+ add_executable(${exe_target} ${MAIN_SRCS})
+ else()
+ # Create a dummy file to work around CMake requirement of having a source
+ # file while adding an executable
+ add_executable(${exe_target} "${CMAKE_CURRENT_BINARY_DIR}/dummy_main_src.c")
+ add_custom_command(OUTPUT dummy_main_src.c
+ COMMAND echo "" > dummy_main_src.c
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+ VERBATIM)
+
+ add_custom_target(dummy_main_src DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/dummy_main_src.c)
+
+ add_dependencies(${exe_target} dummy_main_src)
+ endif()
add_map_file(${exe_target})
endfunction()
# (expand_component_requirements() includes the component CMakeLists.txt, which then sets its component variables,
# calls this dummy macro, and immediately exits again.)
macro(register_component)
- spaces2list(COMPONENT_REQUIRES)
- set_property(GLOBAL PROPERTY "${COMPONENT}_REQUIRES" "${COMPONENT_REQUIRES}")
+ if(COMPONENT STREQUAL main AND NOT COMPONENT_REQUIRES)
+ set(main_component_requires ${COMPONENTS})
+ list(REMOVE_ITEM main_component_requires "main")
+
+ set_property(GLOBAL PROPERTY "${COMPONENT}_REQUIRES" "${main_component_requires}")
+ else()
+ spaces2list(COMPONENT_REQUIRES)
+ set_property(GLOBAL PROPERTY "${COMPONENT}_REQUIRES" "${COMPONENT_REQUIRES}")
+ endif()
+
spaces2list(COMPONENT_PRIV_REQUIRES)
set_property(GLOBAL PROPERTY "${COMPONENT}_PRIV_REQUIRES" "${COMPONENT_PRIV_REQUIRES}")
string(REPLACE ";" "\", \"" result "[ \"${list}\" ]")
set("${variable}" "${result}" PARENT_SCOPE)
endfunction()
+
+# add_prefix
+#
+# Adds a prefix to each item in the specified list.
+#
+function(add_prefix var prefix)
+ foreach(elm ${ARGN})
+ list(APPEND newlist "${prefix}${elm}")
+ endforeach()
+ set(${var} "${newlist}" PARENT_SCOPE)
+endfunction()
\ No newline at end of file