From c7c0680352f3cad3c7b1fb0c4375862d9ad71554 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 7 Jan 2024 12:59:50 +1100 Subject: [PATCH] waf: enable sim on hw for esp32 empty builds --- Tools/ardupilotwaf/boards.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Tools/ardupilotwaf/boards.py b/Tools/ardupilotwaf/boards.py index 386727a203..9330bb6e02 100644 --- a/Tools/ardupilotwaf/boards.py +++ b/Tools/ardupilotwaf/boards.py @@ -917,7 +917,6 @@ class esp32(Board): cfg.load('esp32') env.DEFINES.update( CONFIG_HAL_BOARD = 'HAL_BOARD_ESP32', - AP_SIM_ENABLED = 0, ) tt = self.name[5:] #leave off 'esp32' so we just get 'buzz','diy','icarus, etc @@ -929,6 +928,15 @@ class esp32(Board): HAL_HAVE_HARDWARE_DOUBLE = '1', ) + if self.name.endswith("empty"): + # for empty targets build as SIM-on-HW + env.DEFINES.update(AP_SIM_ENABLED = 1) + env.AP_LIBRARIES += [ + 'SITL', + ] + else: + env.DEFINES.update(AP_SIM_ENABLED = 0) + env.AP_LIBRARIES += [ 'AP_HAL_ESP32', ]