blackmagic-debug / blackmagic

In application debugger for ARM Cortex microcontrollers.
GNU General Public License v3.0
3.27k stars 774 forks source link

Current master fails to flash stm32f0discovery (stm32f051) #90

Closed maknoll closed 9 years ago

maknoll commented 9 years ago

it works on v1.6-rc0

i will test this on a native probe, but i assume it will be the same result.

No. Att Driver
 1      STM32F0
0xfffffffe in ?? ()
(gdb) load
Loading section .isr_vector, size 0xc4 lma 0x8000000
Error writing data to flash
UweBonnes commented 9 years ago

The flashstubs are compiled for M3. STM32F0 is a M0. Compiling the flashstubs for M0 makes it work again. I have some patches, including this one pending on https://github.com/UweBonnes/blackmagic.git

maknoll commented 9 years ago

That makes sense, thanks! Do you wanna make a pull request?

UweBonnes commented 9 years ago

"Martin" == Martin Knoll notifications@github.com writes:

Martin> That makes sense, thanks! Do you wanna make a pull request?  —
Martin> Reply to this email directly or view it on GitHub.*

Success report before submitting the pull request would help :-)

Uwe Bonnes bon@elektron.ikp.physik.tu-darmstadt.de

Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt --------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------

maknoll commented 9 years ago

Oh, sure :) I don't have the board here now, but i will let you know once i have tested it.

maknoll commented 9 years ago

I have cherry-picked your 3 latest commits an they solve the issue (actually the latest alone does, but i liked the other ones too).

Tested on a STM32F072, not tested on a M3, but since ARMv6 is a subset of v7 it should be allright.

(gdb) load
Loading section .text, size 0x1ec lma 0x8000000
Start address 0x8000170, load size 492
Transfer rate: 9 KB/sec, 492 bytes/write.
(gdb) compare-sections 
Section .text, range 0x8000000 -- 0x80001ec: matched.
gsmcmullin commented 9 years ago

@UweBonnes Thanks for the observation. This is fixed by #92