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

STM32F407IGT6: Device not flashing #638

Closed
5 tasks done
banuprathap opened this issue Sep 28, 2017 · 6 comments · Fixed by #1113
Closed
5 tasks done

STM32F407IGT6: Device not flashing #638

banuprathap opened this issue Sep 28, 2017 · 6 comments · Fixed by #1113

Comments

@banuprathap
Copy link

banuprathap commented Sep 28, 2017

Hi,
I am unable to flash the compiled file. I am using STM32F407IGT6 on a custom board. It shows stlink_fwrite_flash() == -1 error. I tried reinstalling stlink but to no avail.

  • Programmer/board type: Stlink/v2
  • Operating system: 4.4.0-96-generic # 119~14.04.1-Ubuntu SMP i686 GNU/Linux
  • Stlink tools version and/or git commit hash: 1.4.0-9-g6511a7e
  • Stlink commandline tool name: st-flash
  • Target chip (and optional board): STM32F407IGT6
    A as-detailed description possible of the problem with debug output when available.

Output:

st-flash write build/flash.enc 0x8010000
st-flash 1.4.0-9-g6511a7e
2017-09-28T12:43:48 INFO src/common.c: Loading device parameters....
2017-09-28T12:43:48 INFO src/common.c: Device connected is: F4 device, id 0x10036413
2017-09-28T12:43:48 INFO src/common.c: SRAM size: 0x30000 bytes (192 KiB), Flash: 0x100000 bytes (1024 KiB) in pages of 16384 bytes
2017-09-28T12:43:48 INFO src/common.c: Attempting to write 257772 (0x3eeec) bytes to stm32 address: 134283264 (0x8010000)
Flash page at addr: 0x08040000 erasedEraseFlash - Sector:0x6 Size:0x20000 
2017-09-28T12:43:54 INFO src/common.c: Finished erasing 3 pages of 131072 (0x20000) bytes
2017-09-28T12:43:54 INFO src/common.c: Starting Flash write for F2/F4/L4
2017-09-28T12:43:54 INFO src/flash_loader.c: Successfully loaded flash loader in sram
enabling 32-bit flash writes
size: 32768
2017-09-28T12:44:04 ERROR src/flash_loader.c: flash loader run error
2017-09-28T12:44:04 ERROR src/common.c: stlink_flash_loader_run(0x8010000) failed! == -1
stlink_fwrite_flash() == -1

It was working fine couple of days ago but wouldn't work anymore. Am I doing anything wrong?

Thank you!

@xor-gate
Copy link
Member

Flash loader problems are hard to debug. Maybe you can find some usefull information from other open and closed issues by filtering: https://github.com/texane/stlink/labels/error%2Fflash-loader.

@fernandolopez
Copy link

I had a similar problem with a STM32F446RET6 (writing at address 0x8000000). After a mass erase it started to work.

@Nightwalker-87 Nightwalker-87 modified the milestones: General, Feedback required Feb 19, 2020
@Nightwalker-87 Nightwalker-87 self-assigned this Feb 21, 2020
@Nightwalker-87
Copy link
Member

Please verify if problem still exists in Release v1.6.0.

@banuprathap
Copy link
Author

I tried v1.6.0 as I couldn't find v1.6.1 and it seems to work now. Thank you!

@Nightwalker-87
Copy link
Member

v1.6.1 is only the milestone of the next upcoming release. Nothing to worry about. You did everything right! Thank you for your feedback - very helpful to us. :-)

@Nightwalker-87 Nightwalker-87 modified the milestones: Feedback required, v1.6.0 Feb 27, 2020
@Nightwalker-87 Nightwalker-87 modified the milestones: v1.6.0, Flash-loader errors Apr 6, 2020
@Nightwalker-87 Nightwalker-87 changed the title STM32F4 not flashing STM32F407IGT6: Device not flashing Apr 6, 2020
@Nightwalker-87
Copy link
Member

Reopening this as the underlying problem that causes this issue remains unsolved.

@Nightwalker-87 Nightwalker-87 reopened this Apr 6, 2020
@Nightwalker-87 Nightwalker-87 removed their assignment Apr 6, 2020
@Nightwalker-87 Nightwalker-87 modified the milestones: c) Flash loader run errors, a) Old issues, Old issues, v1.6.2 Mar 11, 2021
@stlink-org stlink-org locked as resolved and limited conversation to collaborators Mar 25, 2021
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