From d16cde3b31e5c2e0ad041791ad1a684e7fe483a0 Mon Sep 17 00:00:00 2001 From: Nicholas Kruzan Date: Mon, 15 May 2023 16:40:25 +0000 Subject: [PATCH] Tools: make esp32.py more flexible --- Tools/ardupilotwaf/esp32.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Tools/ardupilotwaf/esp32.py b/Tools/ardupilotwaf/esp32.py index 93232b6bd2..1993a26d0e 100644 --- a/Tools/ardupilotwaf/esp32.py +++ b/Tools/ardupilotwaf/esp32.py @@ -19,6 +19,7 @@ import subprocess def configure(cfg): + target = "esp32" bldnode = cfg.bldnode.make_node(cfg.variant) def srcpath(path): return cfg.srcnode.make_node(path).abspath() @@ -30,7 +31,7 @@ def configure(cfg): #define env and location for the cmake esp32 file env = cfg.env - env.AP_HAL_ESP32 = srcpath('libraries/AP_HAL_ESP32/targets/esp32/esp-idf') + env.AP_HAL_ESP32 = srcpath('libraries/AP_HAL_ESP32/targets/'+target+'/esp-idf') env.AP_PROGRAM_FEATURES += ['esp32_ap_program'] env.ESP_IDF_PREFIX_REL = 'esp-idf' @@ -66,7 +67,7 @@ def pre_build(self): esp_idf = self.cmake( name='esp-idf', cmake_vars=lib_vars, - cmake_src='libraries/AP_HAL_ESP32/targets/esp32/esp-idf', + cmake_src='libraries/AP_HAL_ESP32/targets/'+target+'/esp-idf', cmake_bld='esp-idf_build', )