Skip to main content
LYS
Associate II
July 15, 2021
Question

How to flash firmware to STM32 by STM32 with SWD?

  • July 15, 2021
  • 3 replies
  • 3132 views

I want to make A project that can flash firmware to STM32 by another STM32.

(not Act as ST-Link, Ack as standalone Writer like CYCLONE writer)

but I do not know what I should know to make the flash writter with SWD.

If you have any examples or any experience, please share with ME.

Best Regards,

Lee

    This topic has been closed for replies.

    3 replies

    Javier1
    Principal
    July 15, 2021

    Hi @LYS im also interested in this, i didnt got any answers about a SWD master

    https://community.st.com/s/question/0D53W00000tqUmYSAU/how-to-swd-serial-wire-as-a-master

    hit me up in https://www.linkedin.com/in/javiermuñoz/
    LYS
    LYSAuthor
    Associate II
    July 15, 2021

    Thank you for the reply.

    if I get some information, I will let you know.

    Javier1
    Principal
    July 15, 2021

    We basically want to take a look at the firmware inside stlink chips (stm32f103c8)

    This guy reverse engineered limited functionalities https://eevblog.com/forum/microcontrollers/dumping-and-reverse-engineering-st-link-v22-1-firmware/

    hit me up in https://www.linkedin.com/in/javiermuñoz/
    Tesla DeLorean
    Guru
    July 15, 2021

    Interacting with the ARM core via the JTAG​/SWD scan chains is non-trivial.

    Should perhaps looks to generic debugging implementation rather than STM32 specific for the bit level protocol and core control.

    T​he STM32 specific stuff would be addresses used for peripherals, and code uploaded to run in core and write/interact with the flash controller, QSPI, or whatever.

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
    Uwe Bonnes
    Chief
    July 15, 2021

    Understand and reuse the code from open source debuggers like OpenOcd, PyOcd or Bl*ckm*g*c Debug probe.

    Javier1
    Principal
    July 15, 2021

    thanks @Uwe Bonnes​  i didnt know about https://1bitsquared.com/products/black-magic-probe

    This is what i was looking for!

    hit me up in https://www.linkedin.com/in/javiermuñoz/