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

[doc] st-flash --reset parameter (one solution for #356) #642

Closed
6 tasks done
MarekLew opened this issue Oct 12, 2017 · 1 comment
Closed
6 tasks done

[doc] st-flash --reset parameter (one solution for #356) #642

MarekLew opened this issue Oct 12, 2017 · 1 comment

Comments

@MarekLew
Copy link

MarekLew commented Oct 12, 2017

  • Programmer/board type: Stlink/v2
  • Programmer firmware version: e.g STM32 STLink 2
  • Operating system: Raspbian GNU/Linux 8.0 (jessie)
  • Stlink tools version and/or git commit hash: 1.4.0-11-ga2a707e
  • Stlink commandline tool name: e.g st-flash
  • Target chip (and optional board): e.g STM32F030C8

When I stared, I have problem #356. Problem occurs second or third upload.
Output:

user@raspberrypi:~/apps/stm_soft $ st-flash --format ihex write Test.hex
st-flash 1.4.0-11-ga2a707e
2017-10-12T14:16:53 INFO src/common.c: Loading device parameters....
2017-10-12T14:16:53 INFO src/common.c: Device connected is: F0 device, id 0x20006440
2017-10-12T14:16:53 INFO src/common.c: SRAM size: 0x2000 bytes (8 KiB), Flash: 0x10000 bytes (64 KiB) in pages of 1024 bytes
2017-10-12T14:16:53 INFO src/common.c: Attempting to write 19320 (0x4b78) bytes to stm32 address: 134217728 (0x8000000)
Flash page at addr: 0x08004800 erased
2017-10-12T14:16:53 INFO src/common.c: Finished erasing 19 pages of 1024 (0x400) bytes
2017-10-12T14:16:53 INFO src/common.c: Starting Flash write for VL/F0/F3/F1_XL core id
2017-10-12T14:16:53 INFO src/flash_loader.c: Successfully loaded flash loader in sram
2017-10-12T14:16:58 ERROR src/flash_loader.c: flash loader run error
2017-10-12T14:16:58 ERROR src/common.c: stlink_flash_loader_run(0x8000000) failed! == -1
stlink_fwrite_flash() == -1

After that I erase the flash and it`s work good.

Then I use --reset parameter and this work perfect. Works every time.

user@raspberrypi:~/apps/stm_soft $ st-flash --reset --format ihex write Test.hex
st-flash 1.4.0-11-ga2a707e
2017-10-12T14:25:35 INFO src/common.c: Loading device parameters....
2017-10-12T14:25:35 INFO src/common.c: Device connected is: F0 device, id 0x20006440
2017-10-12T14:25:35 INFO src/common.c: SRAM size: 0x2000 bytes (8 KiB), Flash: 0x10000 bytes (64 KiB) in pages of 1024 bytes
2017-10-12T14:25:35 INFO src/common.c: Attempting to write 19320 (0x4b78) bytes to stm32 address: 134217728 (0x8000000)
Flash page at addr: 0x08004800 erased
2017-10-12T14:25:36 INFO src/common.c: Finished erasing 19 pages of 1024 (0x400) bytes
2017-10-12T14:25:36 INFO src/common.c: Starting Flash write for VL/F0/F3/F1_XL core id
2017-10-12T14:25:36 INFO src/flash_loader.c: Successfully loaded flash loader in sram
 19/19 pages written
2017-10-12T14:25:37 INFO src/common.c: Starting verification of write complete
2017-10-12T14:25:37 INFO src/common.c: Flash written and verified! jolly good!

Where is documentation for this?

@Nightwalker-87 Nightwalker-87 added this to the General milestone Feb 19, 2020
@Nightwalker-87 Nightwalker-87 modified the milestones: General, v1.7.0 Mar 14, 2020
@Nightwalker-87 Nightwalker-87 changed the title Anoder solution #356, --reset parameter Another solution for #356, --reset parameter Mar 17, 2020
@Nightwalker-87 Nightwalker-87 modified the milestones: v1.7.0, v1.6.1 Mar 17, 2020
@Nightwalker-87 Nightwalker-87 changed the title Another solution for #356, --reset parameter reset: Another solution for #356, --reset parameter Mar 17, 2020
@Nightwalker-87 Nightwalker-87 modified the milestones: v1.6.1, v1.5.1 Mar 18, 2020
@Nightwalker-87 Nightwalker-87 modified the milestones: v1.5.1, Feedback required Mar 18, 2020
@Nightwalker-87 Nightwalker-87 modified the milestones: Feedback required, Reset issues Mar 28, 2020
@Nightwalker-87
Copy link
Member

A reference to the --reset parameter for st-flash is obviously missing in the documentation...

@Nightwalker-87 Nightwalker-87 modified the milestones: Reset issues, v1.6.1 Mar 31, 2020
@Nightwalker-87 Nightwalker-87 changed the title reset: Another solution for #356, --reset parameter [doc] st-flash --reset parameter (one possible solution for #356) Mar 31, 2020
@Nightwalker-87 Nightwalker-87 changed the title [doc] st-flash --reset parameter (one possible solution for #356) [doc] st-flash --reset parameter (one solution for #356) Mar 31, 2020
@Nightwalker-87 Nightwalker-87 modified the milestones: v1.6.1, Flash loader run errors Apr 9, 2020
@Nightwalker-87 Nightwalker-87 self-assigned this Jun 12, 2020
@Nightwalker-87 Nightwalker-87 modified the milestones: c) Flash loader run errors, v1.6.2 Jun 12, 2020
@stlink-org stlink-org locked as resolved and limited conversation to collaborators Jun 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Status: Done
Development

No branches or pull requests

3 participants