Would it be possible to debug/program another PCB including an STM32 MCU with the debug connector provide on the Nucleo-G474RE? (I don't have an external programmer yet)

What would you recommend for future designs. add a JTAG connector on the PCB and always flash the STM via the JTAG or create a bootloader and do it over USB? I guess if I want to want to flash a bootloader in the STM, I will need the JTAG connector anyway, so the USB connector will only cost me space on the PCB. Or is there another way to load a bootloader?

  • \$\begingroup\$ yes you can use the debug end of a nucleo board for other boards even for other chip vendors. I would not say there is a 100% expectation of success, but it is well above zero. I have used them on breakout boards for various other chis including other brands. \$\endgroup\$
    – old_timer
    May 6 '21 at 23:58

The board manual says it is used to connect an external debugging tool to debug the target MCU on the Nucleo board. However, I see no reason why the onboard ST-LINK debugger cannot be used to debug another target (as I have done this on another Nucleo board), but the on-board target needs to be disconnected from the ST-LINK debugger pins (physically, or loading a firmware that disables the target debugging port).

You don't need to create or load a bootloader. The STM32G474RE already has a non-erasable factory bootloader that allows user firmware to be loaded over USART, I2C, SPI, and USB interfaces. If you want to program a custom bootloader you can load it via the factory bootloader. You only need the JTAG connector if you want to debug or load firmware via JTAG. And I see no reason to not wanting to debug via JTAG, except when product is ready so final version can omit JTAG.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.