cancel
Showing results for 
Search instead for 
Did you mean: 

Standalone programmer for MCU

bsuthar
Senior

Hello Team,

We want to have Standalone Programmer based on ST`s Existing Flash Module Like St-Link V2, V3 Or Mini PCB tools.

I should be able to Use External ST MCU to Command this SWD module for Flashing n all task , like CubeProgrammer.

Basic Interface like Pushbutton to Start the Flash and Some LED to showcase any Error.   

We would not prefer expensive available off-the-Shelf Programmer like Segger..... Not want to use Rpi as well.  

This basically for FAE.

Regards,

10 REPLIES 10
Andrew Neil
Super User

If all you want to do is programming, you could just use the System Bootloader ?

Or a Custom Bootloader ?

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
Pavel A.
Super User

based on ST`s Existing Flash Module Like St-Link V2, V3 Or Mini

These devices indeed contain a STM32 MCU, but the firmware is closed, so you need some host to drive it over USB.  If not RPi, then maybe a phone. The host device will also hold the files for programming.

 

Andrew Neil
Super User

You could look at how DAPLink does it ...

eg, https://os.mbed.com/handbook/DAPLink

 

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
mfgkw
Senior III

If you need a ST-Link permanently connected to your circuit you could have a look on STLINK-V3MODS https://www.st.com/en/development-tools/stlink-v3mods.html#overview

bsuthar
Senior

Hello Friends,

Thanks for Sugegstions , However all Seems from USB Only and Needs USB Host. Like PC / Rpi.

Thinking kind of UART / SPI interface to Programmer ( SWD based Only ).  

I am sure some has Needed / Done some kind of workaround this.

Hoiwever , Found this link : https://github.com/ataradov/embedded-swd

Says Possiblity , that i am thinking About. 

 

 


@bsuthar wrote:

all Seems from USB Only and Needs USB Host.


Not true.

Again, look at DAPLink: that will show you how to have one microcontroller program another.

You take that without the USB part ...

 


@bsuthar wrote:

Thinking kind of UART / SPI interface to Programmer


So why not use a UART or SPI bootloader?

PS:

ARM SWD documentation:

https://developer.arm.com/documentation/ihi0031/a/The-Serial-Wire-Debug-Port--SW-DP-/Introduction-to-the-ARM-Serial-Wire-Debug--SWD--protocol

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
bsuthar
Senior

 @Andrew Neil ,

 

"So why not use a UART or SPI bootloader?"

if u are talking about system bootloader , In that case I have to exexute BooT0 pin & RST pin High low Seqence mechanisum , Manually. Not directly , plug n Play. Also, System bootloader access not available after RDP1. 

 

For , "Again, look at DAPLink: that will show you how to have one microcontroller program another."

Are you talking about Following Scenario ? Just confirming if we r on same page.

DAPDiagram.jpg


@bsuthar wrote:

In that case I have to exexute BooT0 pin & RST pin High low Seqence mechanisum , Manually. Not directly , plug n Play.  


You could include that in what your "programmer" device does.

Or you can call the System bootloader from your application: How to jump to system bootloader from application code on STM32 microcontrollers

Or you could use a Custom bootloader which doesn't rely on BOOT0 or NRST.

 


@bsuthar wrote:

Are you talking about Following Scenario ? 

DAPDiagram.jpg


Not really sure what you're saying there?

My point is that DAPLink includes code to enable one microcontroller to drive the SWD lines to program another microcontroller - so that's the part you need to extract.

 

(You will, of course, also need some way to get the code from your development system into your programmer)

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

Also, System bootloader access not available after RDP1. 

The whole SWD is not available after RDP2. Is RDP relevant to your use case?