From 593b906487cf2e1e51d55d19d376cf9b41b03112 Mon Sep 17 00:00:00 2001 From: lenvm Date: Fri, 17 Jan 2025 10:55:33 +0100 Subject: [PATCH] blackpill-f4/meson: add option to compile blackpill-f4* with SHIELD option, using meson --- meson_options.txt | 7 +++++++ src/platforms/common/blackpill-f4/meson.build | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/meson_options.txt b/meson_options.txt index 0b4f1fca26c..8608c8361b0 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -117,6 +117,13 @@ option( value: '0', description: 'Alternative pinout for probe (only applicable to blackpill-f4*)' ) +option( + 'shield', + type: 'combo', + choices: ['0', '1'], + value: '0', + description: 'Select that blackpill-f4* is used with a shield (only applicable to blackpill-f4*)' +) option( 'trace_protocol', type: 'combo', diff --git a/src/platforms/common/blackpill-f4/meson.build b/src/platforms/common/blackpill-f4/meson.build index 2d399facc76..7a8671d60a9 100644 --- a/src/platforms/common/blackpill-f4/meson.build +++ b/src/platforms/common/blackpill-f4/meson.build @@ -62,6 +62,11 @@ if blackpill_alternative_pinout != '0' probe_blackpill_args += [f'-DALTERNATIVE_PINOUT=@blackpill_alternative_pinout@'] endif +blackpill_shield = get_option('shield') +if blackpill_shield != '0' + probe_blackpill_args += [f'-DSHIELD=@blackpill_shield@'] +endif + if on_carrier_board probe_blackpill_args += ['-DON_CARRIER_BOARD'] endif