cancel
Showing results for 
Search instead for 
Did you mean: 

How to clone a ST-link V2 on your own board

rwmao
Senior
Posted on January 21, 2016 at 07:32

I want to build my own board with in-built ST-LINK V2.

Just make it simpler.

Assume we build a board exactly same as the discovery board.

My question is how to program the chip STM32F103C8T6 to be a ST-LINK?

As my understanding, STM32F103C8T6 is just a stm32 chip, we can program it using an external st-link via the pin PA13,PA14, those are JTMS, JTCK. Then the chip is ready as a st-link. Am I right?

And where can i download the hex code for the chip STM32F103C8T6?

Thanks
5 REPLIES 5
qwer.asdf
Senior
Posted on January 21, 2016 at 10:34

The firmware of ST-Link is copyrighted proprietary product of ST. If you and your country's laws don't mind violating copyright, you can try to google these titles:

''Build a mini ST-LINK/V2 programmer/debugger for the STM32''

''Retrieving ST-Link/V2 Firmware from Update Utility''
rwmao
Senior
Posted on January 21, 2016 at 18:25

Thanks for your reply. You are very helpful.

I don't mean to crack st-link. discovery board is everywhere and cheap. Any discovery board has a st-link on board, and st allows to use it as an external debugger.

I am building my own development board. With in-built st-link, it would be more convenient to use.  And it is simply for personal use only.

On the other hand, if USA doens't allow to do this, I would stop on it.

Thanks 

Radosław
Senior II
Posted on January 21, 2016 at 19:29

Remowe STM from STLink from some board or better solution is  cat programmer part from nucleo.  

I use this with changed connector.
devanlai
Associate II
Posted on January 21, 2016 at 21:00

If you're just looking to integrate a debug probe / USB-serial adapter, there are some open source projects you could use that would give you similar functionality to an STLinkv2.

https://github.com/blacksphere/blackmagic/wiki/Hacking

http://akb77.com/g/stm32/cmsis-dap-adapter/

https://github.com/devanlai/dap42

 (disclosure: this is my project)

The two STLink features that you would be missing are:

  1. SWO trace (only recently added to CMSIS-DAP 1.10)
  2. drag'n'drop USB mass-storage-class programming
Otherwise for debug access, all three of the above projects should work with gdb and most IDEs just fine.

rwmao
Senior
Posted on January 21, 2016 at 22:21

Thank you guys for your reply.

I just use it as a debugger.