Skip to content

Commit

Permalink
Merge branch 'main' into adi
Browse files Browse the repository at this point in the history
  • Loading branch information
HrMitrev authored Nov 18, 2024
2 parents 1a49d86 + 9ac66f5 commit 6f9cd3e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
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

0 comments on commit 6f9cd3e

Please sign in to comment.