Tools: make esp32.py more flexible
This commit is contained in:
parent
7a9ceb7241
commit
d16cde3b31
@ -19,6 +19,7 @@ import subprocess
|
|||||||
|
|
||||||
def configure(cfg):
|
def configure(cfg):
|
||||||
|
|
||||||
|
target = "esp32"
|
||||||
bldnode = cfg.bldnode.make_node(cfg.variant)
|
bldnode = cfg.bldnode.make_node(cfg.variant)
|
||||||
def srcpath(path):
|
def srcpath(path):
|
||||||
return cfg.srcnode.make_node(path).abspath()
|
return cfg.srcnode.make_node(path).abspath()
|
||||||
@ -30,7 +31,7 @@ def configure(cfg):
|
|||||||
|
|
||||||
#define env and location for the cmake esp32 file
|
#define env and location for the cmake esp32 file
|
||||||
env = cfg.env
|
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.AP_PROGRAM_FEATURES += ['esp32_ap_program']
|
||||||
|
|
||||||
env.ESP_IDF_PREFIX_REL = 'esp-idf'
|
env.ESP_IDF_PREFIX_REL = 'esp-idf'
|
||||||
@ -66,7 +67,7 @@ def pre_build(self):
|
|||||||
esp_idf = self.cmake(
|
esp_idf = self.cmake(
|
||||||
name='esp-idf',
|
name='esp-idf',
|
||||||
cmake_vars=lib_vars,
|
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',
|
cmake_bld='esp-idf_build',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user