2018年6月29日 星期五

STM32F4discovery + Jlink + OpenOCD 0.9.0

1. 安裝openocd
$ sudo apt-get install openocd
2. 查看ST-LINK的vid和pid
pi@raspberrypi:~ $ lsusb
Bus 001 Device 007: ID 1366:0105 SEGGER
3. 修改stm32f4discovery.cfg,將stlink-v2-1.cfg 改為 jlink.cfg 將transport select hla_swd 改為 transport select swd
# This is an STM32F4 discovery board with a single STM32F407VGT6 chip.
# http://www.st.com/internet/evalboard/product/252419.jsp

source [find interface/jlink.cfg]

transport select swd

source [find target/stm32f4x.cfg]

reset_config srst_only
4. 啟用openocd
$ sudo openocd -f board/stm32f4discovery.cfg
5. 參考來源 https://blog.csdn.net/u013944565/article/details/78569746 https://www.linuxidc.com/Linux/2015-08/121321.htm https://stackoverflow.com/questions/31638347/stm32f0-st-link-v2-openocd-0-9-0-open-failed

沒有留言:

張貼留言