cancel
Showing results for 
Search instead for 
Did you mean: 

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

Javier1
Principal

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 

we dont need to firmware by ourselves, lets talk
1 ACCEPTED SOLUTION

Accepted Solutions
Javier1
Principal

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.

we dont need to firmware by ourselves, lets talk

View solution in original post

1 REPLY 1
Javier1
Principal

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.

we dont need to firmware by ourselves, lets talk