@@ -161,7 +161,7 @@ set(includedirs
161161set (srcs ${CORE_SRCS} ${LIBRARY_SRCS} ${BLE_SRCS} )
162162set (priv_includes cores/esp32/libb64)
163163set (requires spi_flash mbedtls mdns esp_adc_cal wifi_provisioning nghttp)
164- set (priv_requires fatfs nvs_flash app_update spiffs bootloader_support openssl bt esp_ipc main )
164+ set (priv_requires fatfs nvs_flash app_update spiffs bootloader_support openssl bt esp_ipc)
165165
166166if (IDF_TARGET MATCHES "esp32s2|esp32s3" AND CONFIG_TINYUSB_ENABLED)
167167 list (APPEND priv_requires arduino_tinyusb)
@@ -184,14 +184,14 @@ if(IDF_TARGET STREQUAL "esp32s2")
184184target_compile_options (${COMPONENT_TARGET} PUBLIC -DARDUINO=10812 -DARDUINO_ESP32S2_DEV -DARDUINO_ARCH_ESP32 -DARDUINO_BOARD="ESP32S2_DEV" -DARDUINO_VARIANT="esp32s2" -DESP32)
185185endif ()
186186
187- # if(CONFIG_AUTOSTART_ARDUINO)
187+ if (CONFIG_AUTOSTART_ARDUINO)
188188 # in autostart mode, arduino-esp32 contains app_main() function and needs to
189189 # reference setup() and loop() in the main component. If we add main
190190 # component to priv_requires then we create a large circular dependency
191191 # (arduino-esp32 -> main -> arduino-esp32) and can get linker errors, so
192192 # instead we add setup() and loop() to the undefined symbols list so the
193193 # linker will always include them.
194- #
194+ #
195195 # (As they are C++ symbol, we need to add the C++ mangled names.)
196- # target_link_libraries(${COMPONENT_LIB} INTERFACE "-u _Z5setupv -u _Z4loopv")
197- # endif()
196+ target_link_libraries (${COMPONENT_LIB} INTERFACE "-u _Z5setupv -u _Z4loopv" )
197+ endif ()
0 commit comments