2018-06-24 14:59:16 +02:00
|
|
|
set(CORE_SRCS
|
|
|
|
cores/esp32/base64.cpp
|
|
|
|
cores/esp32/cbuf.cpp
|
|
|
|
cores/esp32/esp32-hal-adc.c
|
|
|
|
cores/esp32/esp32-hal-bt.c
|
2019-01-09 10:07:54 +01:00
|
|
|
cores/esp32/esp32-hal-cpu.c
|
2018-06-24 14:59:16 +02:00
|
|
|
cores/esp32/esp32-hal-dac.c
|
|
|
|
cores/esp32/esp32-hal-gpio.c
|
|
|
|
cores/esp32/esp32-hal-i2c.c
|
|
|
|
cores/esp32/esp32-hal-ledc.c
|
|
|
|
cores/esp32/esp32-hal-matrix.c
|
|
|
|
cores/esp32/esp32-hal-misc.c
|
2018-06-30 23:06:50 +02:00
|
|
|
cores/esp32/esp32-hal-psram.c
|
2018-06-24 14:59:16 +02:00
|
|
|
cores/esp32/esp32-hal-sigmadelta.c
|
|
|
|
cores/esp32/esp32-hal-spi.c
|
|
|
|
cores/esp32/esp32-hal-time.c
|
|
|
|
cores/esp32/esp32-hal-timer.c
|
2021-04-05 13:23:58 +02:00
|
|
|
cores/esp32/esp32-hal-tinyusb.c
|
2018-06-24 14:59:16 +02:00
|
|
|
cores/esp32/esp32-hal-touch.c
|
|
|
|
cores/esp32/esp32-hal-uart.c
|
2018-09-17 23:19:27 +02:00
|
|
|
cores/esp32/esp32-hal-rmt.c
|
2018-06-24 14:59:16 +02:00
|
|
|
cores/esp32/Esp.cpp
|
2018-09-17 23:13:58 +02:00
|
|
|
cores/esp32/FunctionalInterrupt.cpp
|
2018-06-24 14:59:16 +02:00
|
|
|
cores/esp32/HardwareSerial.cpp
|
|
|
|
cores/esp32/IPAddress.cpp
|
|
|
|
cores/esp32/IPv6Address.cpp
|
|
|
|
cores/esp32/libb64/cdecode.c
|
|
|
|
cores/esp32/libb64/cencode.c
|
2018-11-26 23:54:13 +01:00
|
|
|
cores/esp32/main.cpp
|
2018-06-24 14:59:16 +02:00
|
|
|
cores/esp32/MD5Builder.cpp
|
|
|
|
cores/esp32/Print.cpp
|
|
|
|
cores/esp32/stdlib_noniso.c
|
|
|
|
cores/esp32/Stream.cpp
|
|
|
|
cores/esp32/StreamString.cpp
|
2021-08-31 07:47:55 +02:00
|
|
|
cores/esp32/HWCDC.cpp
|
2021-04-05 13:23:58 +02:00
|
|
|
cores/esp32/USB.cpp
|
|
|
|
cores/esp32/USBCDC.cpp
|
2021-08-02 14:35:13 +02:00
|
|
|
cores/esp32/USBMSC.cpp
|
|
|
|
cores/esp32/FirmwareMSC.cpp
|
|
|
|
cores/esp32/firmware_msc_fat.c
|
2018-06-24 14:59:16 +02:00
|
|
|
cores/esp32/wiring_pulse.c
|
|
|
|
cores/esp32/wiring_shift.c
|
|
|
|
cores/esp32/WMath.cpp
|
|
|
|
cores/esp32/WString.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
set(LIBRARY_SRCS
|
|
|
|
libraries/ArduinoOTA/src/ArduinoOTA.cpp
|
2018-06-27 09:01:06 +02:00
|
|
|
libraries/AsyncUDP/src/AsyncUDP.cpp
|
2018-06-24 14:59:16 +02:00
|
|
|
libraries/BluetoothSerial/src/BluetoothSerial.cpp
|
2021-04-16 00:37:33 +02:00
|
|
|
libraries/BluetoothSerial/src/BTAddress.cpp
|
|
|
|
libraries/BluetoothSerial/src/BTAdvertisedDeviceSet.cpp
|
|
|
|
libraries/BluetoothSerial/src/BTScanResultsSet.cpp
|
2018-06-24 14:59:16 +02:00
|
|
|
libraries/DNSServer/src/DNSServer.cpp
|
2019-02-14 12:49:34 +01:00
|
|
|
libraries/EEPROM/src/EEPROM.cpp
|
2018-06-24 14:59:16 +02:00
|
|
|
libraries/ESPmDNS/src/ESPmDNS.cpp
|
2018-09-17 23:06:04 +02:00
|
|
|
libraries/FFat/src/FFat.cpp
|
2018-06-24 14:59:16 +02:00
|
|
|
libraries/FS/src/FS.cpp
|
|
|
|
libraries/FS/src/vfs_api.cpp
|
|
|
|
libraries/HTTPClient/src/HTTPClient.cpp
|
2018-11-19 16:57:38 +01:00
|
|
|
libraries/HTTPUpdate/src/HTTPUpdate.cpp
|
2021-07-16 14:46:38 +02:00
|
|
|
libraries/LittleFS/src/LittleFS.cpp
|
2018-06-27 09:01:06 +02:00
|
|
|
libraries/NetBIOS/src/NetBIOS.cpp
|
2018-06-24 14:59:16 +02:00
|
|
|
libraries/Preferences/src/Preferences.cpp
|
2021-04-05 13:23:58 +02:00
|
|
|
libraries/RainMaker/src/RMaker.cpp
|
|
|
|
libraries/RainMaker/src/RMakerNode.cpp
|
|
|
|
libraries/RainMaker/src/RMakerParam.cpp
|
|
|
|
libraries/RainMaker/src/RMakerDevice.cpp
|
|
|
|
libraries/RainMaker/src/RMakerType.cpp
|
2018-06-24 14:59:16 +02:00
|
|
|
libraries/SD_MMC/src/SD_MMC.cpp
|
|
|
|
libraries/SD/src/SD.cpp
|
|
|
|
libraries/SD/src/sd_diskio.cpp
|
|
|
|
libraries/SD/src/sd_diskio_crc.c
|
|
|
|
libraries/SimpleBLE/src/SimpleBLE.cpp
|
|
|
|
libraries/SPIFFS/src/SPIFFS.cpp
|
|
|
|
libraries/SPI/src/SPI.cpp
|
|
|
|
libraries/Ticker/src/Ticker.cpp
|
|
|
|
libraries/Update/src/Updater.cpp
|
2020-08-25 10:01:58 +02:00
|
|
|
libraries/Update/src/HttpsOTAUpdate.cpp
|
2021-08-23 16:27:34 +02:00
|
|
|
libraries/USB/src/USBHID.cpp
|
|
|
|
libraries/USB/src/USBHIDMouse.cpp
|
|
|
|
libraries/USB/src/USBHIDKeyboard.cpp
|
|
|
|
libraries/USB/src/USBHIDGamepad.cpp
|
|
|
|
libraries/USB/src/USBHIDConsumerControl.cpp
|
|
|
|
libraries/USB/src/USBHIDSystemControl.cpp
|
|
|
|
libraries/USB/src/USBHIDVendor.cpp
|
|
|
|
libraries/USB/src/USBVendor.cpp
|
2018-06-27 09:01:06 +02:00
|
|
|
libraries/WebServer/src/WebServer.cpp
|
|
|
|
libraries/WebServer/src/Parsing.cpp
|
|
|
|
libraries/WebServer/src/detail/mimetable.cpp
|
2018-06-24 14:59:16 +02:00
|
|
|
libraries/WiFiClientSecure/src/ssl_client.cpp
|
|
|
|
libraries/WiFiClientSecure/src/WiFiClientSecure.cpp
|
|
|
|
libraries/WiFi/src/ETH.cpp
|
|
|
|
libraries/WiFi/src/WiFiAP.cpp
|
|
|
|
libraries/WiFi/src/WiFiClient.cpp
|
|
|
|
libraries/WiFi/src/WiFi.cpp
|
|
|
|
libraries/WiFi/src/WiFiGeneric.cpp
|
|
|
|
libraries/WiFi/src/WiFiMulti.cpp
|
|
|
|
libraries/WiFi/src/WiFiScan.cpp
|
|
|
|
libraries/WiFi/src/WiFiServer.cpp
|
|
|
|
libraries/WiFi/src/WiFiSTA.cpp
|
|
|
|
libraries/WiFi/src/WiFiUdp.cpp
|
2020-11-18 23:12:16 +01:00
|
|
|
libraries/WiFiProv/src/WiFiProv.cpp
|
2018-06-24 14:59:16 +02:00
|
|
|
libraries/Wire/src/Wire.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
set(BLE_SRCS
|
|
|
|
libraries/BLE/src/BLE2902.cpp
|
|
|
|
libraries/BLE/src/BLE2904.cpp
|
|
|
|
libraries/BLE/src/BLEAddress.cpp
|
|
|
|
libraries/BLE/src/BLEAdvertisedDevice.cpp
|
|
|
|
libraries/BLE/src/BLEAdvertising.cpp
|
|
|
|
libraries/BLE/src/BLEBeacon.cpp
|
|
|
|
libraries/BLE/src/BLECharacteristic.cpp
|
|
|
|
libraries/BLE/src/BLECharacteristicMap.cpp
|
|
|
|
libraries/BLE/src/BLEClient.cpp
|
|
|
|
libraries/BLE/src/BLEDescriptor.cpp
|
|
|
|
libraries/BLE/src/BLEDescriptorMap.cpp
|
|
|
|
libraries/BLE/src/BLEDevice.cpp
|
2018-11-30 17:21:06 +01:00
|
|
|
libraries/BLE/src/BLEEddystoneTLM.cpp
|
|
|
|
libraries/BLE/src/BLEEddystoneURL.cpp
|
2018-06-24 14:59:16 +02:00
|
|
|
libraries/BLE/src/BLEExceptions.cpp
|
|
|
|
libraries/BLE/src/BLEHIDDevice.cpp
|
|
|
|
libraries/BLE/src/BLERemoteCharacteristic.cpp
|
|
|
|
libraries/BLE/src/BLERemoteDescriptor.cpp
|
|
|
|
libraries/BLE/src/BLERemoteService.cpp
|
|
|
|
libraries/BLE/src/BLEScan.cpp
|
|
|
|
libraries/BLE/src/BLESecurity.cpp
|
|
|
|
libraries/BLE/src/BLEServer.cpp
|
|
|
|
libraries/BLE/src/BLEService.cpp
|
|
|
|
libraries/BLE/src/BLEServiceMap.cpp
|
|
|
|
libraries/BLE/src/BLEUtils.cpp
|
|
|
|
libraries/BLE/src/BLEUUID.cpp
|
|
|
|
libraries/BLE/src/BLEValue.cpp
|
|
|
|
libraries/BLE/src/FreeRTOS.cpp
|
|
|
|
libraries/BLE/src/GeneralUtils.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
|
2021-04-05 13:23:58 +02:00
|
|
|
set(includedirs
|
2021-04-14 17:10:05 +02:00
|
|
|
variants/${IDF_TARGET}/
|
2018-06-24 14:59:16 +02:00
|
|
|
cores/esp32/
|
|
|
|
libraries/ArduinoOTA/src
|
2018-06-27 09:01:06 +02:00
|
|
|
libraries/AsyncUDP/src
|
2018-06-24 14:59:16 +02:00
|
|
|
libraries/BLE/src
|
|
|
|
libraries/BluetoothSerial/src
|
|
|
|
libraries/DNSServer/src
|
2019-02-14 12:49:34 +01:00
|
|
|
libraries/EEPROM/src
|
2018-06-24 14:59:16 +02:00
|
|
|
libraries/ESP32/src
|
|
|
|
libraries/ESPmDNS/src
|
2018-09-17 23:06:04 +02:00
|
|
|
libraries/FFat/src
|
2018-06-24 14:59:16 +02:00
|
|
|
libraries/FS/src
|
|
|
|
libraries/HTTPClient/src
|
2018-11-19 16:57:38 +01:00
|
|
|
libraries/HTTPUpdate/src
|
2021-07-16 14:46:38 +02:00
|
|
|
libraries/LittleFS/src
|
2018-06-27 09:01:06 +02:00
|
|
|
libraries/NetBIOS/src
|
2018-06-24 14:59:16 +02:00
|
|
|
libraries/Preferences/src
|
2021-04-05 13:23:58 +02:00
|
|
|
libraries/RainMaker/src
|
2018-06-24 14:59:16 +02:00
|
|
|
libraries/SD_MMC/src
|
|
|
|
libraries/SD/src
|
|
|
|
libraries/SimpleBLE/src
|
|
|
|
libraries/SPIFFS/src
|
|
|
|
libraries/SPI/src
|
|
|
|
libraries/Ticker/src
|
|
|
|
libraries/Update/src
|
2021-08-02 14:35:13 +02:00
|
|
|
libraries/USB/src
|
2018-06-27 09:01:06 +02:00
|
|
|
libraries/WebServer/src
|
2018-06-24 14:59:16 +02:00
|
|
|
libraries/WiFiClientSecure/src
|
|
|
|
libraries/WiFi/src
|
2020-11-18 23:12:16 +01:00
|
|
|
libraries/WiFiProv/src
|
2018-06-24 14:59:16 +02:00
|
|
|
libraries/Wire/src
|
|
|
|
)
|
|
|
|
|
2021-04-05 13:23:58 +02:00
|
|
|
set(srcs ${CORE_SRCS} ${LIBRARY_SRCS} ${BLE_SRCS})
|
|
|
|
set(priv_includes cores/esp32/libb64)
|
2021-06-16 19:56:25 +02:00
|
|
|
set(requires spi_flash mbedtls mdns esp_adc_cal wifi_provisioning nghttp)
|
2021-07-16 11:25:53 +02:00
|
|
|
set(priv_requires fatfs nvs_flash app_update spiffs bootloader_support openssl bt esp_ipc)
|
2018-06-24 14:59:16 +02:00
|
|
|
|
2021-04-05 13:23:58 +02:00
|
|
|
idf_component_register(INCLUDE_DIRS ${includedirs} PRIV_INCLUDE_DIRS ${priv_includes} SRCS ${srcs} REQUIRES ${requires} PRIV_REQUIRES ${priv_requires})
|
2019-06-05 13:42:08 +02:00
|
|
|
|
IDF master d93887f9f (#5336)
* Update toolchain
* Update package_esp32_index.template.json
* add optional component dependencies after Kconfig options are known (#5404)
Until this commit, Kconfig options (e.g. CONFIG_TINYUSB_ENABLED) were
used in conditions preceding idf_component_register to determine which
components need to be added to `arduino` component requirements.
However the Kconfig options aren't known at the early expansion stage,
when the component CMakeLists.txt files are expanded the first time
and requirements are evaluated. So all the conditions evaluated as if
the options were not set.
This commit changes the logic to only add these components as
dependencies when the Kconfig options are known. Dependencies become
"weak", which means that if one of the components isn't included into
the build for some reason, it is not added as a dependency.
This may happen, for example, if the component is not present in the
`components` directory or is excluded by setting `COMPONENTS` variable
in the project CMakeLists.txt file.
This also ensures that if the component is not present, it will not be
added as a dependency, and this will allow the build to proceed.
Follow-up to https://github.com/espressif/arduino-esp32/pull/5391.
Closes https://github.com/espressif/arduino-esp32/issues/5319.
* IDF master d93887f9f
* PlatformIO updates for CI (#5387)
* Update PlatformIO CI build script
- Switch to the latest toolchains 8.4.0 for ESP32, ESP32S2, ESP32C3
- Use PlatformIO from master branch for better robustness
* Update package.json for PlatformIO
Co-authored-by: Ivan Grokhotkov <ivan@espressif.com>
Co-authored-by: Valerii Koval <valeros@users.noreply.github.com>
2021-07-17 00:57:49 +02:00
|
|
|
string(TOUPPER ${CONFIG_IDF_TARGET} idf_target_caps)
|
|
|
|
target_compile_options(${COMPONENT_TARGET} PUBLIC
|
|
|
|
-DARDUINO=10812
|
|
|
|
-DARDUINO_${idf_target_caps}_DEV
|
|
|
|
-DARDUINO_ARCH_ESP32
|
|
|
|
-DARDUINO_BOARD="${idf_target_caps}_DEV"
|
|
|
|
-DARDUINO_VARIANT="${CONFIG_IDF_TARGET}"
|
|
|
|
-DESP32)
|
2021-07-16 11:25:53 +02:00
|
|
|
|
|
|
|
if(CONFIG_AUTOSTART_ARDUINO)
|
|
|
|
# in autostart mode, arduino-esp32 contains app_main() function and needs to
|
|
|
|
# reference setup() and loop() in the main component. If we add main
|
|
|
|
# component to priv_requires then we create a large circular dependency
|
|
|
|
# (arduino-esp32 -> main -> arduino-esp32) and can get linker errors, so
|
|
|
|
# instead we add setup() and loop() to the undefined symbols list so the
|
|
|
|
# linker will always include them.
|
|
|
|
#
|
|
|
|
# (As they are C++ symbol, we need to add the C++ mangled names.)
|
|
|
|
target_link_libraries(${COMPONENT_LIB} INTERFACE "-u _Z5setupv -u _Z4loopv")
|
|
|
|
endif()
|
IDF master d93887f9f (#5336)
* Update toolchain
* Update package_esp32_index.template.json
* add optional component dependencies after Kconfig options are known (#5404)
Until this commit, Kconfig options (e.g. CONFIG_TINYUSB_ENABLED) were
used in conditions preceding idf_component_register to determine which
components need to be added to `arduino` component requirements.
However the Kconfig options aren't known at the early expansion stage,
when the component CMakeLists.txt files are expanded the first time
and requirements are evaluated. So all the conditions evaluated as if
the options were not set.
This commit changes the logic to only add these components as
dependencies when the Kconfig options are known. Dependencies become
"weak", which means that if one of the components isn't included into
the build for some reason, it is not added as a dependency.
This may happen, for example, if the component is not present in the
`components` directory or is excluded by setting `COMPONENTS` variable
in the project CMakeLists.txt file.
This also ensures that if the component is not present, it will not be
added as a dependency, and this will allow the build to proceed.
Follow-up to https://github.com/espressif/arduino-esp32/pull/5391.
Closes https://github.com/espressif/arduino-esp32/issues/5319.
* IDF master d93887f9f
* PlatformIO updates for CI (#5387)
* Update PlatformIO CI build script
- Switch to the latest toolchains 8.4.0 for ESP32, ESP32S2, ESP32C3
- Use PlatformIO from master branch for better robustness
* Update package.json for PlatformIO
Co-authored-by: Ivan Grokhotkov <ivan@espressif.com>
Co-authored-by: Valerii Koval <valeros@users.noreply.github.com>
2021-07-17 00:57:49 +02:00
|
|
|
|
|
|
|
# This function adds a dependency on the given component if the component is included into the build.
|
|
|
|
function(maybe_add_component component_name)
|
|
|
|
idf_build_get_property(components BUILD_COMPONENTS)
|
|
|
|
if (${component_name} IN_LIST components)
|
|
|
|
idf_component_get_property(lib_name ${component_name} COMPONENT_LIB)
|
|
|
|
target_link_libraries(${COMPONENT_LIB} PUBLIC ${lib_name})
|
|
|
|
endif()
|
|
|
|
endfunction()
|
|
|
|
|
|
|
|
if(IDF_TARGET MATCHES "esp32" AND CONFIG_ESP_RMAKER_TASK_STACK)
|
|
|
|
maybe_add_component(esp_rainmaker)
|
|
|
|
maybe_add_component(qrcode)
|
|
|
|
endif()
|
|
|
|
if(IDF_TARGET MATCHES "esp32s2|esp32s3" AND CONFIG_TINYUSB_ENABLED)
|
|
|
|
maybe_add_component(arduino_tinyusb)
|
|
|
|
endif()
|
|
|
|
if(NOT CONFIG_ARDUINO_SELECTIVE_COMPILATION OR CONFIG_ARDUINO_SELECTIVE_ArduinoOTA)
|
|
|
|
maybe_add_component(esp_https_ota)
|
|
|
|
endif()
|
|
|
|
if(NOT CONFIG_ARDUINO_SELECTIVE_COMPILATION OR CONFIG_ARDUINO_SELECTIVE_LITTLEFS)
|
|
|
|
maybe_add_component(esp_littlefs)
|
|
|
|
endif()
|