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

Nucleo-F091RC: st-util can't flash firmware #597

Closed
6 tasks done
master-q opened this issue May 20, 2017 · 7 comments · Fixed by #1113
Closed
6 tasks done

Nucleo-F091RC: st-util can't flash firmware #597

master-q opened this issue May 20, 2017 · 7 comments · Fixed by #1113

Comments

@master-q
Copy link

master-q commented May 20, 2017

There is rare case that st-util can't flash firmware onto NUCLEO-F091RC.

  • Programmer/board type: Stlink/v2-1-onboard
  • Programmer firmware version: v1.3.1-19-g55c0572
  • Operating system: Debian GNU/Linux sid
  • Stlink tools version and/or git commit hash: 55c0572
  • Stlink commandline tool name: st-util
  • Target chip (and optional board): STM32F091RCT6 on NUCLEO-F091RC

st-util output:

$ sudo st-util
--snip--
2017-05-20T17:04:06 ERROR src/gdbserver/gdb-server.c: cannot recv: -2
2017-05-20T17:04:07 INFO src/gdbserver/gdb-server.c: Listening at *:4242...
2017-05-20T17:04:07 INFO src/gdbserver/gdb-server.c: Found 4 hw breakpoint registers
2017-05-20T17:04:07 INFO src/gdbserver/gdb-server.c: GDB connected.
2017-05-20T17:04:08 INFO src/gdbserver/gdb-server.c: Found 4 hw breakpoint registers
2017-05-20T17:04:09 INFO src/common.c: Attempting to write 2048 (0x800) bytes to stm32 address: 134217728 (0x8000000)
Flash page at addr: 0x08000000 erased
2017-05-20T17:04:09 INFO src/common.c: Finished erasing 1 pages of 2048 (0x800) bytes
2017-05-20T17:04:09 INFO src/common.c: Starting Flash write for VL/F0/F3/F1_XL core id
2017-05-20T17:04:09 INFO src/flash_loader.c: Successfully loaded flash loader in sram
2017-05-20T17:04:13 ERROR src/flash_loader.c: flash loader run error
2017-05-20T17:04:13 ERROR src/common.c: stlink_flash_loader_run(0x8000000) failed! == -1

gdb output:

$ cat ../gdbwrite.boot
tar ext localhost:4242
monitor reset halt
load
monitor reset halt
$ arm-none-eabi-gdb -x ../gdbwrite.boot build/ch.elf
GNU gdb (7.12-6+9+b2) 7.12.0.20161007-git
Copyright (C) 2016 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 "--host=x86_64-linux-gnu --target=arm-none-eabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from build/ch.elf...done.
_idle_thread.lto_priv.58 (p=0x0) at ../../../ChibiOS_16.1.6/os/rt/src/chsys.c:65
65      static void _idle_thread(void *p) {
Loading section startup, size 0xc0 lma 0x8000000
Loading section .text, size 0x62fc lma 0x80000c0
Loading section .data, size 0xb8 lma 0x80063c0
../gdbwrite.boot:3: Error in sourced command file:
Error finishing flash operation

Expected/description: I think gdb can do flash everytime.

@xor-gate
Copy link
Member

Could you try a little older commit from the master branch? Probably there is something wrong with the flash locking/unlocking.

@xor-gate xor-gate added this to the Unplanned (Contributions Welcome) milestone Jun 10, 2017
@master-q
Copy link
Author

O.K. I'll try that. Please give me some times....

@Nightwalker-87 Nightwalker-87 modified the milestones: Unplanned (Contributions Welcome), Next Feb 19, 2020
@Nightwalker-87 Nightwalker-87 modified the milestones: General, v1.7.0, Feedback required Mar 14, 2020
@Nightwalker-87 Nightwalker-87 changed the title There is rare case that st-util can't flash firmware onto NUCLEO-F091RC Nucleo-F091RC: st-util can't flash firmware Mar 31, 2020
@Nightwalker-87 Nightwalker-87 modified the milestones: Feedback required, Device issues Mar 31, 2020
@Nightwalker-87 Nightwalker-87 modified the milestones: Device issues, Flash-loader errors Apr 6, 2020
@rileylyman
Copy link

I'm having the exact same issue on v1.6.1

@Nightwalker-87 Nightwalker-87 removed this from the c) Flash loader run errors milestone Aug 20, 2020
@Nightwalker-87
Copy link
Member

@Ant-ON Can you check this one as well? I think though st-util was used, this may also be addressed by #1113.

@Ant-ON
Copy link
Collaborator

Ant-ON commented Mar 25, 2021

@Nightwalker-87 Old error descriptions are not informative. Most likely this issue is closed by #1113.

@Nightwalker-87
Copy link
Member

Yeah, true. However, as the error code

2017-05-20T17:04:13 ERROR src/flash_loader.c: flash loader run error
2017-05-20T17:04:13 ERROR src/common.c: stlink_flash_loader_run(0x8000000) failed! == -1

is identical to what we've seen before one should be safe to assume the issue is fixed by now.

@Ant-ON
Copy link
Collaborator

Ant-ON commented Mar 25, 2021

@Nightwalker-87 Yes, otherwise someone with the error can open a new issue with a new log

@stlink-org stlink-org locked as resolved and limited conversation to collaborators Mar 25, 2021
@Nightwalker-87 Nightwalker-87 moved this to Done in Release v1.7.0 Apr 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants