-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[reset] flashing: reliably flashing, loading and running code. #238
Comments
OK. analysing the source... |
OK. More research... : |
The links on the discovery and nucleo boards that disconnect the onboard stlink from the target do NOT interrupt the NRST line. so whenever you reset the non-onboard-cpu, the one on the board will also reset.... |
Old issue, please open a new one when tested with latest tools and firmware when still exists. |
@rewolff: What is the current state of this topic? Is there a correlation to issue 290 in terms of being delay-related? |
Two things. edit: correction: three things:
So.... If you try to reset the CPU to make it stop interfering with your download, asserting the hardware reset line doesn't always work. As my STLINKs don't have the hardware reset hooked up, I've stopped using the wire from the stlink to the target. 2b: I think there should be a command through SWD that can halt the CPU. Somehow that didn't always work, or wasn't issued at all. I think that the "flash loader run error" issues have been fixed. On the most recent version I've not seen them anymore. My suggestion is to just close all these issues and wait for it to happen again before we sink more time into this.
|
Thank you very much for the detailed explanation which is indeed very helpful. As it reads, point 2) does seem hardware related. As I understand it this is related to a non-unified pinout between original STLink-v2 programmers and STLink-V2 clones regarding the Reset-Line. 2b) should have a new, separate issue opened (if it does not exist yet) which solely addresses this feature request and nothing else. |
The reset line not being wired up can be considered a "hardware issue". But it explains a few things. First of all, original developer may have had that reset line hooked up and "debugged until it worked". So that might explain why this stlink software "requires" it. The combination of these two means that we can improve stlink to the point that it no longer requires the hardware reset line to work properly every time. I have retested the flash loader error. I can now reproduce it in v1.2.0, I can't compile v1.3.0 to v1.5.0 and v1.6.0 is fixed. |
Summary:
|
To reliably flash, and run a new version of my program I need to:
I think it should be possible to reset the target from inside GDB.
I found somewhere:
monitor reset init
which does not do the trick.
While sometimes I see a flash error, I usually end up running an older version of the software.
What I want is that I press "control-C" in my gdb window, then reset, load, run the newly compiled code.
I have the impression that the "continue" will not restart at the reset vector, but in the middle of my now-different program (i.e. possibily crashing, usually I change the init code, so I SEE the old behaviour). The "monitor reset init" doesn't seem to help.
The text was updated successfully, but these errors were encountered: