Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STM32F1 load fail #182

Closed
dimitraPat opened this issue Oct 4, 2013 · 13 comments
Closed

STM32F1 load fail #182

dimitraPat opened this issue Oct 4, 2013 · 13 comments

Comments

@dimitraPat
Copy link

Hi!
I've found this utility for flashing the STM32 mcu and I think it's very cool.

However, I've been trying to flash the STM32F1 and while at the beginning seems to load correctly, when it reaches add 0x08080000 the flash loader fails.

Does the utility support F1? Do I have to change anything in order to work correctly?

Thanks!

@visstro
Copy link

visstro commented Oct 5, 2013

Does your mcu have more than 512kB of memory?

@dimitraPat
Copy link
Author

Yes, the mcu is with dual flash banks. The second bank must be defined somehow.

@jsarenik
Copy link

jsarenik commented Oct 9, 2013

I have the same problem on current version of stlink (a13e75a) with STM32VL-DISCOVERY and STM32F105 (both over STLINKv1).

When I try to 'load' via arm-none-eabi-gdb, I get following on the st-util terminal:
ERROR src/stlink-common.c: flash loader run error
ERROR src/stlink-common.c: run_flash_loader(0x8000000) failed! == -1

and on the GDB terminal I get 'Error finishing flash operation'.

When I use st-flash, it works with the latest version, using
st-flash write out.bin 0x08000000

I have tried to compile older stlink (as I remember it worked back then),
29d03e9 and 'load' via GDB works
with that version. Sorry I cannot bisect at the moment but in case I do,
will let you know which commit breaks it.

Thanks and good luck!

@jsarenik
Copy link

My problem is fixed by using "-1" flag for st-util. Tested with latest commit.

@AmazingPants
Copy link

@jsarenik please can you explain in detail what did you do?

@jsarenik
Copy link

There is not much to explain. I just run "st-util -1" whenever I would run "st-util"... does that make sense?

@idubrov
Copy link

idubrov commented May 23, 2014

Somehow adding "-v" fixes similar problem to me. I.e, "st-util" fails whenether I try to load image & debug from Eclipse, "st-util -v" works. Bizarre.

@xor-gate
Copy link
Member

Feel free to open a new issue when the problem still remains with v1.2.0 or master. Thanks all for your contributions.

@jonbinney
Copy link

-v fixed the problem for me as well... very strange....

@jsarenik
Copy link

Yes, I remember that behavior. With -v it worked, without it needed -1 to work. I no longer have the HW to try v1.2.0.

@xor-gate
Copy link
Member

@jonbinney do you still need -v with v1.2.0 ?

@jonbinney
Copy link

I did have this problem yesterday with the current git master version (hash 3f7d0f9df3b1b551ac317b9d3a185c48f19c0c97 )

But today (after a reboot) I can't reproduce the problem at all. It works with or without -v. I tried it 5 times and didn't have any problems.

@xor-gate
Copy link
Member

xor-gate commented Jun 20, 2016

Probably when adding -v printf output takes CPU time and "sleeps" te original code. This seems a timing issue, I have seen an issue with a broken usb cables resulted in super weird behaviour. Probably you could also inspect dmesg | tail when running under linux.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants