Skip to content

refactor(STM32CubeProgrammer): rework options #2323

New issue

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

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

Already on GitHub? # to your account

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

@fpistm fpistm added enhancement New feature or request arduino compatibility fix 🩹 Bug fix labels Mar 29, 2024
@fpistm fpistm added this to the 2.8.0 milestone Mar 29, 2024
@fpistm fpistm force-pushed the Arduino_compatibility branch from 3fff79a to 48d9def Compare March 30, 2024 11:18
@fpistm fpistm force-pushed the Arduino_compatibility branch from 48d9def to 57a6e98 Compare June 14, 2024 16:05
fpistm added 2 commits June 20, 2024 08:59
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 <frederic.pillon@st.com>
Fixes stm32duino#2292

This requires STM32Tools versions higher than 2.2.1.

Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
@fpistm fpistm force-pushed the Arduino_compatibility branch from 57a6e98 to 47bb4d8 Compare June 20, 2024 07:07
@fpistm fpistm merged commit d852c8b into stm32duino:main Jun 20, 2024
23 checks passed
@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 <frederic.pillon@st.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
Development

Successfully merging this pull request may close these issues.

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