-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
STM32F4 writing does not work #10
Comments
You've made the same mistake as I made in the beginning. :) Even though stlink runs as a remote gdb server, you still need to be running an arm gdb. the gdb you are loading is trying to run for "x86_64-linux-gnu" you should be running "arm-eabi-none-gdb" then "target exte :4242" instead of just "gdb" Cheers, |
Ah, that explains it. I was able to get writes to sram to work, but writes to flash do not fail with an error, but do not seem to work. |
for me, both the flash tool and the arm-none-eabi-gdb "load" command never complete on the STM32F4 Discovery board. The debug output shows repeated wait and status running messages. I can run gdb fine on the SRAM version. |
man, how did you all get your F4 boards so fast! jealous they're still wildly out of stock at digikey and mouser. |
I ordered mine the day they came out, and recieved it Monday. |
Have any of you had any success with linking with the math library or getting it working with the FPU in Linux? I found the following page quite helpful getting started. http://cu.rious.org/make/stm32f4-discovery-board-with-linux/ Thanks, Rob |
tech2077: f4 writing to flash should be working with current texane master branch. It's working for a few people in chat room, but all fixes are now merged in, and I'd like to close this ticket :) |
Tested yesterday and today, with clean builds and proper GDB, and the flash utility works perfectly, but i can't write to flash with GDB still. Also, where is the chat room, if there are people which were able to make it work, I would like to talk to them. |
irc.freenode.org channel: ##stm32 |
After modifying the blink_flash example to work with the STM32F4 cortex-m4 family, I built and tried to write the program to flash. It stalled and outputted this repeatedly:
core status: running
*** stlink_status ***
submit_wait(req)
submit_wait(rep)
status == 0x80
data_len = 5 0x5
80 00 00 00 00
on both the "flash" and "gdbserver" applications. Reading seems to work, but i can't test if the reads are correct without a write to write the resulting file back. All other gdb commands seem to work.
Edit
On further testing, it shows that it writes to ram, but fails to execute. It occasionally gives several different errors and messages.
matthew@matthew-desktop:~/stlink/example/blink$ gdb
GNU gdb (Ubuntu/Linaro 7.3-0ubuntu2) 7.3-2011.08
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
http://bugs.launchpad.net/gdb-linaro/.
(gdb) tar ext :4242
Remote debugging using :4242
0x00000000 in ?? ()
(gdb) kill
Kill the program being debugged? (y or n) y
(gdb) load blink.elf
Loading section .text, size 0x38 lma 0x20000000
Load failed
(gdb) load blink.elf
Loading section .text, size 0x38 lma 0x20000000
Load failed
(gdb) continue
The program is not being run.
(gdb) kill
The program is not being run.
(gdb) r
Starting program:
Could not write register "orig_eax"; remote failure reply 'E00'
(gdb) load blink.elf
Loading section .text, size 0x38 lma 0x20000000
Start address 0x20000000, load size 56
Transfer rate: 356 bytes/sec, 56 bytes/write.
(gdb) continue
Continuing.
^C
Program received signal SIGTRAP, Trace/breakpoint trap.
The text was updated successfully, but these errors were encountered: