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

refactor(STM32CubeProgrammer): rework options #2323

Merged
merged 2 commits into from
Jun 20, 2024

Conversation

fpistm
Copy link
Member

@fpistm fpistm commented Mar 29, 2024

  • refactor(STM32CubeProgrammer): rework options

Fixes #2292
This requires STM32Tools versions higher than 2.2.1.
(stm32duino/Arduino_Tools#97)

  • feat(usb): provide default vid/pid

Provided id:

  • Default USB CDC for all series with USB capabilities (0483:5740)
  • STLink VCP, only for ST manufactured boards which embed one (0483:37xx)
  • DFU for default built-in bootloader or dedicated one (0483:df11 and other)
  • Specific USB id.

Example using boards.local.txt

# Add erase option to dfu upload method, --erase could also be used
Nucleo_144.menu.upload_method.dfuMethod.upload.options=-v {upload.vid} -p {upload.pid} -e
# Add dtr/rts level option to serial upload method
Nucleo_144.menu.upload_method.serialMethod.upload.options=-c {serial.port.file} -d low --rts high
# Change vid/pid
Nucleo_144.menu.pnum.NUCLEO_L496ZG-P.upload.vid=0x3840
Nucleo_144.upload.pid=0x11fd

GenF1.menu.upload_method.dfuMethod.upload.options=-v {upload.vid} -p {upload.pid}
GenF1.menu.upload_method.serialMethod.upload.options=-c {serial.port.file} --dtr high -r low

Provided id:
  - Default USB CDC for all series with USB capabilities (0483:5740)
  - STLink VCP, only for ST manufactured boards which embedd one (0483:37xx)
  - DFU for default built-in bootloader or dedicated one (0483:df11 and other)
  - Specific USB id.

Note that vid.0/pid.0 have to be defined for each menu even if no USB
support to have the build.vid/pid properly defined in the platform.txt.
At least a FTDI is defined (ex: STLink VCP)

Signed-off-by: Frederic Pillon <[email protected]>
Fixes stm32duino#2292

This requires STM32Tools versions higher than 2.2.1.

Signed-off-by: Frederic Pillon <[email protected]>
@fpistm fpistm merged commit d852c8b into stm32duino:main Jun 20, 2024
23 checks passed
STM32 core based on ST HAL automation moved this from In progress to Done Jun 20, 2024
@fpistm fpistm deleted the Arduino_compatibility branch June 20, 2024 13:59
fpistm added a commit that referenced this pull request Jun 20, 2024
introduced by previous #2323.

Signed-off-by: Frederic Pillon <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

Request: setting DTR and RTS when using STM32CubeProgrammer (Serial)
1 participant