diff --git a/src/meson.build b/src/meson.build index edf9ad1c131..e833d14cfcd 100644 --- a/src/meson.build +++ b/src/meson.build @@ -51,14 +51,16 @@ bmd_core_sources = files( bmd_core_args = [] # Debug output handling -if(get_option('debug_output')) +debug_output = get_option('debug_output') +if debug_output bmd_core_args += [ '-DENABLE_DEBUG=1' ] endif # RTT support handling -if get_option('rtt_support') +rtt_support = get_option('rtt_support') +if rtt_support bmd_core_sources += files( 'rtt.c', ) @@ -85,3 +87,8 @@ bmd_core = declare_dependency( # TODO: when support for build as a host library is added, this can be conditional? subdir('platform') subdir('probe') + +summary({ + 'Debug output': debug_output ? 'Yes' : 'No', + 'RTT support': rtt_support ? 'Yes' : 'No', +}, section: 'Black Magic Debug') diff --git a/src/probe/96b_carbon/meson.build b/src/probe/96b_carbon/meson.build index 752a6c4247f..7f77ed90001 100644 --- a/src/probe/96b_carbon/meson.build +++ b/src/probe/96b_carbon/meson.build @@ -66,3 +66,9 @@ probe_bootloader = declare_dependency( link_args: probe_96b_carbon_link_args, dependencies: platform_stm32f4_dfu, ) + +summary({ + 'Name': '96b Carbon', + 'Platform': 'STM32F4', + 'Bootloader': 'OEM Bootloader', +}, section: 'Probe') diff --git a/src/probe/f072/meson.build b/src/probe/f072/meson.build index 31cb9805a9c..b19df697f26 100644 --- a/src/probe/f072/meson.build +++ b/src/probe/f072/meson.build @@ -52,3 +52,9 @@ probe_host = declare_dependency( link_args: probe_f072_link_args, dependencies: [platform_common, platform_stm32f0, fixme_platform_stm32_traceswo], ) + +summary({ + 'Name': 'STM32F072', + 'Platform': 'STM32F0', + 'Bootloader': 'OEM ST Bootloader', +}, section: 'Probe') diff --git a/src/probe/f3/meson.build b/src/probe/f3/meson.build index 84bf9a42100..8c8130fd8ae 100644 --- a/src/probe/f3/meson.build +++ b/src/probe/f3/meson.build @@ -52,3 +52,9 @@ probe_host = declare_dependency( link_args: probe_f3_link_args, dependencies : [platform_common, platform_stm32f3, fixme_platform_stm32_traceswo], ) + +summary({ + 'Name': 'STM32F303', + 'Platform': 'STM32F3', + 'Bootloader': 'OEM ST Bootloader', +}, section: 'Probe') diff --git a/src/probe/f4discovery/meson.build b/src/probe/f4discovery/meson.build index 71234f6a810..8248dac3545 100644 --- a/src/probe/f4discovery/meson.build +++ b/src/probe/f4discovery/meson.build @@ -40,7 +40,9 @@ probe_f4discovery_dfu_sources = files( 'usbdfu.c', ) -probe_f4discovery_dfu_serial_length = get_option('bmd_bootloader') ? '9' : '13' +bmd_bootloader = get_option('bmd_bootloader') + +probe_f4discovery_dfu_serial_length = bmd_bootloader ? '9' : '13' probe_f4discovery_args = [ f'-DDFU_SERIAL_LENGTH=@probe_f4discovery_dfu_serial_length@', @@ -70,3 +72,9 @@ probe_bootloader = declare_dependency( link_args: probe_f4discovery_commonn_link_args, dependencies: platform_stm32f4_dfu, ) + +summary({ + 'Name': 'STM32F407 Discovery', + 'Platform': 'STM32F4', + 'Bootloader': bmd_bootloader ? 'Black Magic Debug Bootloader' : 'OEM ST Bootloader', +}, section: 'Probe') diff --git a/src/probe/hydrabus/meson.build b/src/probe/hydrabus/meson.build index 97d99bfbfd3..67fac31822c 100644 --- a/src/probe/hydrabus/meson.build +++ b/src/probe/hydrabus/meson.build @@ -64,3 +64,9 @@ probe_bootloader = declare_dependency( link_args: probe_hydrabus_link_args, dependencies: platform_stm32f4_dfu, ) + +summary({ + 'Name': 'Hydrabus', + 'Platform': 'STM32F4', + 'Bootloader': 'OEM Bootloader', +}, section: 'Probe') diff --git a/src/probe/launchpad-icdi/meson.build b/src/probe/launchpad-icdi/meson.build index 730b7795b9b..670f2bbd564 100644 --- a/src/probe/launchpad-icdi/meson.build +++ b/src/probe/launchpad-icdi/meson.build @@ -67,3 +67,9 @@ probe_host = declare_dependency( link_args: probe_launchpad_icdi_link_args, dependencies: [platform_common, platform_tm4c], ) + +summary({ + 'Name': 'Launchpad ICDI', + 'Platform': 'TM4C', + 'Serial Number': serialno, +}, section: 'Probe') diff --git a/src/probe/native/meson.build b/src/probe/native/meson.build index e4beaec3290..8ce4264085c 100644 --- a/src/probe/native/meson.build +++ b/src/probe/native/meson.build @@ -69,3 +69,10 @@ probe_bootloader = declare_dependency( link_args: probe_native_common_link_args, dependencies: platform_stm32f1_dfu, ) + +summary({ + 'Name': 'Black Magic Probe (native)', + 'Platform': 'STM32F1', + 'Bootloader': 'Black Magic Debug Bootloader', + 'Load Address': '0x8002000', +}, section: 'Probe') diff --git a/src/probe/stlink/meson.build b/src/probe/stlink/meson.build index 144a372b51d..0e5f6d4af9c 100644 --- a/src/probe/stlink/meson.build +++ b/src/probe/stlink/meson.build @@ -75,7 +75,9 @@ endif probe_stlink_dependencies = [platform_common, platform_stm32f1] -if probe == 'stlink' and get_option('stlink_swim_as_uart') +stlink_swim_as_uart = get_option('stlink_swim_as_uart') + +if probe == 'stlink' and stlink_swim_as_uart probe_stlink_args += [ '-DSWIM_AS_UART=1' ] @@ -98,3 +100,11 @@ probe_bootloader = declare_dependency( link_args: probe_stlink_common_link_args, dependencies: platform_stm32f1_dfu, ) + +summary({ + 'Name': probe == 'stlink' ? 'ST-Link' : 'BluePill', + 'Platform': 'STM32F1', + 'Bootloader': bmd_bootloader ? 'Black Magic Debug Bootloader' : 'OEM ST Bootloader', + 'Load Address': probe_stlink_load_address, + 'SWIM as UART': probe == 'stlink' and stlink_swim_as_uart ? 'Yes' : 'No', +}, section: 'Probe') diff --git a/src/probe/stlinkv3/meson.build b/src/probe/stlinkv3/meson.build index 756d9b51e64..484b23faaf2 100644 --- a/src/probe/stlinkv3/meson.build +++ b/src/probe/stlinkv3/meson.build @@ -42,7 +42,9 @@ probe_stlinkv3_dfu_sources = files( 'usb_f723.c', ) -probe_stlinkv3_load_address = get_option('bmd_bootloader') ? '0x08020000' : '0x08000000' +bmd_bootloader = get_option('bmd_bootloader') + +probe_stlinkv3_load_address = bmd_bootloader ? '0x08020000' : '0x08000000' probe_stlinkv3_args = [ '-DDFU_SERIAL_LENGTH=25', @@ -73,3 +75,10 @@ probe_bootloader = declare_dependency( link_args: probe_stlinkv3_common_link_args, dependencies: platform_stm32f7_dfu, ) + +summary({ + 'Name': 'STLINK-V3', + 'Platform': 'STM32F7', + 'Bootloader': bmd_bootloader ? 'Black Magic Debug Bootloader' : 'OEM ST Bootloader', + 'Load Address': probe_stlinkv3_load_address, +}, section: 'Probe') diff --git a/src/probe/swlink/meson.build b/src/probe/swlink/meson.build index 08185aeeaf0..2584ea8bd9c 100644 --- a/src/probe/swlink/meson.build +++ b/src/probe/swlink/meson.build @@ -70,3 +70,10 @@ probe_bootloader = declare_dependency( link_args: probe_swlink_common_link_args, dependencies: platform_stm32f1_dfu, ) + +summary({ + 'Name': 'STM8S Discovery and STM32F103 Minimum System Development Board', + 'Platform': 'STM32F1', + 'Bootloader': 'Black Magic Debug Bootloader', + 'Load Address': '0x8002000', +}, section: 'Probe') diff --git a/src/target/meson.build b/src/target/meson.build index 3124f648508..31e8f684625 100644 --- a/src/target/meson.build +++ b/src/target/meson.build @@ -153,8 +153,10 @@ target_ti = declare_dependency( dependencies: target_cortexm, ) +enabled_targets = get_option('targets') + enabled_target_deps = [] -foreach target: get_option('targets') +foreach target: enabled_targets enabled_target_deps += get_variable(f'target_@target@') endforeach @@ -164,3 +166,8 @@ bmd_targets = declare_dependency( sources: target_common_sources, dependencies: enabled_target_deps, ) + +summary({ + 'Warning': 'Not all enabled targets may be listed here', + 'Targets': enabled_targets, +}, section: 'Targets')