Skip to content

J-Link support when using STM32CubeProgrammer #2452

Closed
@jamesy0ung

Description

@jamesy0ung
Contributor

STM32CubeProgrammer has support for J-Link probes, however the Arduino core only allows it to use SWD with ST-Link, DFU or UART

I'd like to be able to upload using a J-Link probe from the Arduino IDE. Thank you!

Screenshot 2024-07-18 170617

Activity

fpistm

fpistm commented on Jul 18, 2024

@fpistm
Member

Hi @jamesy0ung
Feel free to contribute and provide a PR.

jamesy0ung

jamesy0ung commented on Jul 18, 2024

@jamesy0ung
ContributorAuthor

I haven't done any work on Arduino cores before, but I got the STM32CubeProgrammer CLI working by using the following flag. -c port=JLINK ap=0

I tried to modify boards.txt to add support but I can't see it in the Arduino IDE as a programmer


GenF1.menu.upload_method.jlinkMethod=STM32CubeProgrammer (J-Link)
GenF1.menu.upload_method.jlinkMethod.upload.protocol=swd
GenF1.menu.upload_method.jlinkMethod.upload.options=-c port=JLINK ap=0
GenF1.menu.upload_method.jlinkMethod.upload.tool=stm32CubeProg

Is there anything I'm missing?

fpistm

fpistm commented on Jul 18, 2024

@fpistm
Member

I would recommend to check the script:
https://github.com/stm32duino/Arduino_Tools/blob/main/stm32CubeProg.sh

And simply add a new interface (protocol): jlink then in the script simply call it with correct option.
About the fact it is not in the menu, this is an Arduino IDE issue. You have to delete the cache.

Path:

  • Linux: $HOME/.config/arduino-ide/
  • Windows: C:\Users\<login>\AppData\Roaming\arduino-ide
jamesy0ung

jamesy0ung commented on Jul 18, 2024

@jamesy0ung
ContributorAuthor

I've opened 2 PR's

One adds a case to the flashing script, and the other adds support under the STM32F1, I'll look into adding J-Link programmer support for other boards, but I don't have any other hardware to test with

fpistm

fpistm commented on Jul 18, 2024

@fpistm
Member

Thanks @jamesy0ung for the PR's.
I will try on my side and see if it is OK for other series.
I never used J-Link so have to ramp-up.

added this to the 2.9.0 milestone on Jul 18, 2024
Amir1387aht2

Amir1387aht2 commented on Sep 29, 2024

@Amir1387aht2

Guys Any New Info? I Wanna Use Jlink Flasher And There's No Straight Option

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Relationships

    None yet

      Development

      Participants

      @jamesy0ung@fpistm@Amir1387aht2

      Issue actions

        J-Link support when using STM32CubeProgrammer · Issue #2452 · stm32duino/Arduino_Core_STM32