简体   繁体   English

在错误的内存映射地址处闪烁 STM32f103c8t6

[英]Flashing STM32f103c8t6 at wrong memory map address

I flashed my blue pill board with the following OpenOCD command and then my OpenOCD does not connect to my board anymore.我使用以下 OpenOCD 命令刷新了我的蓝色药丸板,然后我的 OpenOCD 不再连接到我的板。 My boot0 and boot1 pins was grounded.我的 boot0 和 boot1 引脚接地。

flash write_image erase blinkled.hex flash write_image擦除闪烁的.hex

I forgot to specified the typical init memory map 0x08000000 at the end of the command.我忘记在命令末尾指定典型的初始化内存映射 0x08000000。 What just happend?刚刚发生了什么?

Since this mistake, my OpenOCD only connect with the board when boot0 is 1 and boot1 is 0. Does anyone know how to solve the problem?由于这个错误,我的OpenOCD只在boot0为1,boot1为0时才与板子连接。有谁知道如何解决这个问题? I am using Linux by the way.顺便说一下,我正在使用 Linux。

I put together a CMake based build project yesterday.我昨天整理了一个基于 CMake 的构建项目 The CMakeLists has the OpenOCD commands for flashing and debugging. CMakeLists 具有用于刷新和调试的 OpenOCD 命令。

Namely

Flashing:闪烁:

openocd  -c 'source [find interface/stlink-v2.cfg]' -c 'transport select hla_swd' -c 'source [find target/stm32f1x.cfg]' -c 'program ${PROJECT_ELF_FILE} verify reset exit'

where ${PROJECT_ELF_FILE} is your elf file其中 ${PROJECT_ELF_FILE} 是你的精灵文件

Debugging:调试:

See here and here看到这里这里

To read more on the specifics of flashing the board I would look at stm32f1x.cfg where details of the target are given, for example要阅读有关闪烁板的详细信息的更多信息,我会查看stm32f1x.cfg ,其中给出了目标的详细信息,例如

flash bank $_FLASHNAME stm32f1x 0x08000000 0 0 0 $_TARGETNAME

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM