Skip to main content
Javier1
Principal
October 25, 2021
Solved

(linux) openOCD, trying to flash a stm32F072 with a rasberryPi

  • October 25, 2021
  • 1 reply
  • 1757 views

Im following this adafruit tutorial (gpio bitbanging swd).

As they are flashing an AVR chip and i want to flash an stm32f072 chip im using a different .cfg file:

source [find interface/raspberrypi2-native.cfg]
transport select swd
 
set WORKAREASIZE 0x2000 
 
source [find target/stm32f0x.cfg]
 
reset_config srst_only srst_nogate
 
#transport select swd
 
adapter srst delay 100
adapter srst pulse_width 100
 
init
targets
reset halt
program myfirmware.bin verify reset
shutdown

im using a RaspberryPi 3 model B v1.2.

my stm32 chip is externaly powered.

Wiring is made as follows:

0693W00000FDdHMQA1.png 

Once i do "sudo openocd" i get randomly 3 different errors in reading IDR:

  • IDR 0x0000000
  • IDR 0xdeadbeef,
  • cannot read IDR

 0693W00000FDdK7QAL.png 

0693W00000FDdNUQA1.png 

This topic has been closed for replies.
Best answer by Javier1

i followed this other tutorial and now it detects DPIR

https://zansprojects.blogspot.com/2019/01/stm32-remote-debugging-with-raspberry.html

I used now my rasberry zero , rewired everything as this new tutorial says , and im trying to flash an stm32f105

0693W00000FDdlqQAD.png 

im still suspicious about not being able to halt the chip "target not halted"

im not able to halt the chip nor flash any programm.

1 reply

Javier1
Javier1AuthorBest answer
Principal
October 25, 2021

i followed this other tutorial and now it detects DPIR

https://zansprojects.blogspot.com/2019/01/stm32-remote-debugging-with-raspberry.html

I used now my rasberry zero , rewired everything as this new tutorial says , and im trying to flash an stm32f105

0693W00000FDdlqQAD.png 

im still suspicious about not being able to halt the chip "target not halted"

im not able to halt the chip nor flash any programm.

hit me up in https://www.linkedin.com/in/javiermuñoz/