Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stlink: add config for the ISOL variant #1990

Merged
merged 1 commit into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cross-file/stlink.ini
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ targets = 'cortexm,lpc,nrf,nxp,renesas,sam,stm,ti'
rtt_support = false
stlink_swim_nrst_as_uart = false
bmd_bootloader = false
stlink_v2_isol = false
6 changes: 6 additions & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ option(
value: true,
description: 'Use the BMD bootloader (not always applicable)'
)
option(
'stlink_v2_isol',
type: 'boolean',
value: false,
description: 'Build for the ISOL variant of ST-Link v2'
)
option(
'stlink_swim_nrst_as_uart',
type: 'boolean',
Expand Down
5 changes: 5 additions & 0 deletions src/platforms/stlink/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ probe_stlink_dfu_sources = files(
'usbdfu.c',
)

stlink_v2_isol = get_option('stlink_v2_isol')

bmd_bootloader = get_option('bmd_bootloader')

probe_stlink_dfu_serial_length = bmd_bootloader ? '9' : '25'
Expand All @@ -48,6 +50,9 @@ probe_stlink_load_address = bmd_bootloader ? '0x8002000' : '0x8004000'
probe_stlink_args = [
f'-DDFU_SERIAL_LENGTH=@probe_stlink_dfu_serial_length@',
]
if stlink_v2_isol
probe_stlink_args += ['-DSTLINK_V2_ISOL']
endif
if not bmd_bootloader
probe_stlink_args += ['-DST_BOOTLOADER']
endif
Expand Down
Loading