【问题标题】:Trying to flash an STM32F3 Discovery board using OpenOCD: `no flash bank found`尝试使用 OpenOCD 刷新 STM32F3 探索板:`no flash bank found`
【发布时间】:2015-09-01 13:50:50
【问题描述】:

我克隆了this repo 并尝试使用make flash 刷新我的STM32F3 探索板。相关规则是这样的:

flash: main.axf
    openocd -f oocd.cfg -c "program main.axf verify reset" -c "shutdown"

oocd.cfg:

telnet_port 4444
gdb_port 3333

source [find board/stm32f3discovery.cfg]

make flash 然后给我以下输出:

Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
none separate
srst_only separate srst_nogate srst_open_drain connect_deassert_srst
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : clock speed 950 kHz
Info : STLINK v2 JTAG v21 API v2 SWIM v0 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 2.883108
Info : stm32f3x.cpu: hardware has 6 breakpoints, 4 watchpoints
adapter speed: 1000 kHz
target state: halted
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x0800234c msp: 0x2000a000
adapter speed: 8000 kHz
** Programming Started **
auto erase enabled
Info : device id = 0x10036422
Info : flash size = 256kbytes
Warn : no flash bank found for address 0
Warn : no flash bank found for address 704
wrote 0 bytes from file main.axf in 0.001628s (0.000 KiB/s)
** Programming Finished **

program 命令显示no flash bank found 并且没有写入任何数据。当然,verify 命令会失败。

我从 0.9 标签构建了 OpenOCD。我使用 aptitude 安装了libusb-1.0-0-dev,这是支持 ST-Link 所必需的。

我的配置有什么问题,或者我可以尝试使用 OpenOCD 的替代方法来完成这项任务吗?

【问题讨论】:

  • 您好,您似乎定义了错误的 FLASH 地址,它从地址 0 闪烁,而不是从 STM32F3 中的 FLASH 所在的 0x08000000 闪烁。我简要查看了 github 存储库,问题似乎在链接器脚本中,在文件 LM4F.ld 中定义的 FLASH 地址在 0x00000000

标签: stm32 jtag openocd


【解决方案1】:

您似乎定义了错误的 FLASH 地址。它是从地址0闪烁,而不是从STM32F3中的FLASH所在的0x08000000

我简要查看了 GitHub 存储库,问题似乎出在链接器脚本中。在文件LM4F.ld 中,FLASH 地址定义在0x00000000

【讨论】:

  • 谢谢,我用来刷STM这个应用程序:github.com/pavelrevak/pystlink虽然不支持GDB或iHex文件,但它有非常简单的命令行界面,不需要任何特殊的配置文件。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多