3 years ago.

custom hardware

hello im new to mbed, and i write some test programs with nucleo boards

now i wand to design my own board with stm chip please how to program the stm? can i use the stlink? the mbed support this?

thanks

1 Answer

3 years ago.

Which STM processor ? Some CPUs will be supplied with a bootloader so you can use the bootloader to upload your code. JTAG will be be the fastest method to flash your CPU. Review the schematic of your Nucleo board to see how you can 'hack' the front end of the circuit for your external / target CPU to act as a low cost programmer. That will be the lowest cost solution.

http://vedder.se/2014/12/connecting-a-programmerdebugger-my-custom-stm32-pcbs/

http://andybrown.me.uk/2014/09/09/stlinkv2/

http://forum.segger.com/index.php?page=Thread&threadID=655

http://forum.segger.com/index.php?page=Thread&threadID=763

http://forum.43oh.com/topic/6573-flashing-stm32-using-segger-j-link-and-j-flash/

Hello George,
As Sanjiv suggested, one simple way to program your custom STM board is using (hacking) the front end (called ST-LINK/V2-1 programmer/debugger) of your NUCLEO board. In order to use it you need to find (or make available if you design the board by yourself) the SWCLK, SWDIO, RESET (is optional) and GND pins of your custom board. For more details have a look at the User Manual, chapter 6.2.4 Using ST-LINK/V2-1 to program and debug an external STM32 application. Also the following examples might help:
https://developer.mbed.org/users/hudakz/code/STM32F103C8T6_Hello/
https://developer.mbed.org/users/hudakz/code/MapleMini_Hello/

posted by Zoltan Hudak 05 Dec 2016