waf: enable sim on hw for esp32 empty builds

This commit is contained in:
Andrew Tridgell 2024-01-07 12:59:50 +11:00
parent 40e9b94f58
commit c7c0680352
1 changed files with 9 additions and 1 deletions

View File

@ -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',
]