中级会员
- 积分
- 215
- 金钱
- 215
- 注册时间
- 2023-9-1
- 在线时间
- 24 小时
|
20金钱
目前我在做的是在ubuntu22.04系统下通过libopencm3-example下的例子minlink烧录到stm32F429IGT6开发板里
openocd的连接方式为打开一个终端,并输入:openocd -f interface/jtagkey-tiny.cfg -f target/stm32f1x.cfg
$ make flash V=1
Using ../../../../../libopencm3/ path to library
FLASH miniblink.elf
(echo "halt; program /home/tonychen/gitee/libopencm3-examples/examples/stm32/f4/stm32f429i-discovery/miniblink/miniblink.elf verify reset" | nc -4 localhost 4444 2>/dev/null) || \
openocd -f interface/stlink-v2.cfg \
-f target/stm32f4x.cfg \
-c "program miniblink.elf verify reset exit" \
��������Open On-Chip Debugger
> halt; program /home/tonychen/gitee/libopencm3-examples/examples/stm32/f4/stm32f429i-discovery/miniblink/miniblink.elf verify reset
Unable to match requested speed 2000 kHz, using 1800 kHz
Unable to match requested speed 2000 kHz, using 1800 kHz
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x08000258 msp: 0x20030000
Unable to match requested speed 8000 kHz, using 4000 kHz
Unable to match requested speed 8000 kHz, using 4000 kHz
** Programming Started **
** Programming Finished **
** Verify Started **
** Verified OK **
** Resetting Target **
Unable to match requested speed 2000 kHz, using 1800 kHz
Unable to match requested speed 2000 kHz, using 1800 kHz
直接使用结果如上所示,是不是因为这个频率有问题啊?
|
最佳答案
查看完整内容[请看2#楼]
问题1:使用的arm-none-cabi-gcc的版本太旧了,导致程序编译问题,升级后使用make编译正常
问题2:提供的例子中的时钟和LED灯的引脚和实际阿波罗stm32F429IGT6并不匹配,更改demo的代码后正常烧录且可以看到效果,代码更改后如下:
#include
#include
static void gpio_setup(void)
{
/* Enable GPIOB clock. */
rcc_periph_clock_enable(RCC_GPIOB);
/* Set GPIO0 (in GPIO port B) to 'output push-pull'. * ...
|