简体   繁体   中英

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. My boot0 and boot1 pins was grounded.

flash write_image erase blinkled.hex

I forgot to specified the typical init memory map 0x08000000 at the end of the command. 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? I am using Linux by the way.

I put together a CMake based build project yesterday. The CMakeLists has the OpenOCD commands for flashing and debugging.

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

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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