|
发表于 2016-4-26 08:31:29
|
显示全部楼层
转一下 x893 的一个帖子:
http://akb77.com/g/stm32/jlink-ob/
DIY JLink-OB-072 (JLink + COM)
Saturday, April 16 2016
How to make JLink-OB-072 debug adapter.
Easy and correct way - buy from SEGGER and be happy.
Also right way - build it yourself but with some limitation. You can't use firmware update from JLink.exe only via STM DFU utility.
Now need prepare first step. Buy correct beer (Krusovice) and open it.
1. Extract binary part from JLinkARM.dll (from JLink_V512)
For example from offset 7153340 (0x6D26BC) and size 41192 (0x0A0E8).
Use any binary extraction tool as you prefer.
After this you have file with 41192 bytes such as this
Now move to step 2
You need STM32F072C8 chip with simple connection:
Power (see datasheet for STM32F072C8) and USB (PA12, PA11). No more.
Now connect debugger or use BOOT selection and write this file from 0x8000000 addrerss and file from step 1 to 0x8004800 address.
Connect pins on STM32F072C8 with next
PA0 ----- 1K -----|<|---+ 3.3V Activity LED
PA1 ----- 100 om ----TARGET RESET
PA2 ----- 100 om ---- TARGET SWCLK
PA3 -------------------- TARGET SWO
PA4 ----- 100 om ---- TARGET SWDIO
PA9 ----- 100 om ---- (COM TX) TARGET RX
PA10 --- 100 om ---- (COM RX) TARGET TX
For stability you can add crystal (with caps) to pins 5/6 but works w/o crystal.
If JLink say about firware update - you need prepare DFU image from 2 files above and use STM DFU utility to update (after agree to upgrade - device start in STM DFU mode or use BOOT pin).
|
|