-
Notifications
You must be signed in to change notification settings - Fork 25
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
Suggestion: Better instructions for flashing/debugging with JTAG #135
Comments
That doesn't happen here for me. And it doesn't look like this has anything to do with |
It's very likely that this is related to a recent update from OpenOCD (your log indicates an OpenOCD built today). The OpenOCD used during development was built from It is possible that they recently added changes that require the usage of |
Thank you for the replies. The OpenOCD version I was using is indeed very recent (2020-09-06, openocd-org/openocd@1457a1a). However, when I switched to the oldest OpenOCD commit that
Please note that I am using an ST-Link v2 debugger, so I have to change the 1st line of stabilizer.cfg to On the other hand, the earliest OpenOCD commit I found that would require the |
For reference, my
The This corresponds to openocd-org/openocd@4c364b4 However, this is done using the ST-link v3 debugger - it is possible that the command is related to the debug probe used, although I'm not familiar enough with OpenOCD to say either way. Ideally, we will be able to avoid using |
Yes, it sounds nice to use other tools like |
I have finally figured out the problem. I got errors and couldn't Because of this, perhaps we could (1) tag the OpenOCD commit needed without using |
Connecting the debugger to a live board is also somewhat dangerous if you don't ensure level grounds before connecting. |
I've been following the correct power sequence to flash the board successfully with OpenOCD/GDB. However, the
The |
Closing as this seems to:
Please open new issues if anything here is still pertinent. |
Update: the error is produced because of a wrong sequence of supplying power to the board - see this reply. However, the need to use the OpenOCD command
gdb_memory_map disable
might still be needed in the latest unstable of OpenOCD.When testing the JTAG programming option with the latest commit of OpenOCD (openocd-org/openocd@1457a1a), running
openocd -f stabilizer.cfg
would always produce the following error:Then, running
cargo run
would produce another error:After Google search, the error lines
mem2array: Read @ 0x5c001004, w=4, cnt=1, failed
andtimed out while waiting for target halted
might be related to a missinggdb_memory_map disable
OpenOCD command. Thus, there is a solution online that would solve this issue: https://codelv.com/blog/2020/1/attaching-to-stm32-with-openocd-during-sleep . Simply put, the steps to properly use OpenOCD/GDB on the board are:openocd -f stabilizer.cfg -c "gdb_memory_map disable" &
to run it in background in the same shell.3. Rungdb
and usetarget remote :3333
to verify the connection.4. Kill the OpenOCD and GDB again.5. Runopenocd -f stabilizer.cfg &
.cargo run --release
.I am not sure how to simplify these steps yet, but above is what I would suggest to be added to the README for the time being.
The text was updated successfully, but these errors were encountered: