diff --git a/src/target/meson.build b/src/target/meson.build index 12ed59aa77b..086e594bd29 100644 --- a/src/target/meson.build +++ b/src/target/meson.build @@ -81,6 +81,13 @@ if is_firmware_build 'ti': 'Texas Instruments parts', 'xilinx': 'Xilinx parts', } + + # Check to see if the set of enabled targets is all of them and the + # firmware is to be built for a STM32F1 based probe (requires a restriction) + if probe in ['bluepill', 'native', 'stlink', 'swlink'] and enabled_targets.length() == target_names.keys().length() + warning('Disabling some targets as your build will not fit the target probe otherwise') + enabled_targets = ['cortexm', 'efm', 'hc32', 'lpc', 'nrf', 'nxp', 'renesas', 'rp', 'sam', 'stm', 'ti'] + endif endif # Conditional file compilation based on target selection