未验证 提交 4146d27b 编写于 作者: D Dr. Christian Kohlschütter 提交者: GitHub

Enable configuring target variants (#7019)

This change enables picking the right board configuration from the
variants/ folder. Previously, we would always pick the default
configuration (e.g., "esp32" instead of "heltec_wifi_lora_32_V2").
上级 fe1d9e00
......@@ -168,7 +168,7 @@ set(BLE_SRCS
)
set(includedirs
variants/${IDF_TARGET}/
variants/${CONFIG_ARDUINO_VARIANT}/
cores/esp32/
libraries/ArduinoOTA/src
libraries/AsyncUDP/src
......@@ -210,13 +210,13 @@ set(priv_requires fatfs nvs_flash app_update spiffs bootloader_support openssl b
idf_component_register(INCLUDE_DIRS ${includedirs} PRIV_INCLUDE_DIRS ${priv_includes} SRCS ${srcs} REQUIRES ${requires} PRIV_REQUIRES ${priv_requires})
string(TOUPPER ${CONFIG_IDF_TARGET} idf_target_caps)
string(TOUPPER ${CONFIG_ARDUINO_VARIANT} 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}"
-DARDUINO_VARIANT="${CONFIG_ARDUINO_VARIANT}"
-DESP32)
if(CONFIG_AUTOSTART_ARDUINO)
......
menu "Arduino Configuration"
config ARDUINO_VARIANT
string "Arduino target variant (board)"
default IDF_TARGET
help
The name of a target variant (e.g., a specific board) in the variants/
folder, e.g. "heltec_wifi_lora_32_V2". The name is case sensitive.
Specifying a variant name different from the target enables additional
customization, for example the definition of GPIO pins.
config ENABLE_ARDUINO_DEPENDS
bool
select LWIP_SO_RCVBUF
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册