Comments (9)
Connecting the debugger to a live board is also somewhat dangerous if you don't ensure level grounds before connecting.
from stabilizer.
That doesn't happen here for me. And it doesn't look like this has anything to do with stabilizer
. It seems to be related to your openocd
version. I suspect the fix should be in openocd and not in the README here.
from stabilizer.
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 openocd
a few months ago, and it's likely the version on both @jordens and my machine are older.
It is possible that they recently added changes that require the usage of gdb_memory_map disable
. We should update our references here to specify a specific openocd tag that we support to avoid these issues in the future.
from stabilizer.
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 target/stm32h7x_dual_bank.cfg
exists (2017-10-07, openocd-org/openocd@6090a5b), I get a different error - "open failed":
$ openocd -f stabilizer.cfg &
Open On-Chip Debugger 0.10.0+dev-snapshot (2020-09-09-04:59)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 1800 kHz
adapter_nsrst_delay: 100
srst_only separate srst_nogate srst_open_drain connect_deassert_srst
none separate
Info : clock speed 1800 kHz
Error: open failed
in procedure 'init'
in procedure 'ocd_bouncer'
Please note that I am using an ST-Link v2 debugger, so I have to change the 1st line of stabilizer.cfg to source [find interface/stlink-v2-1.cfg]
. (Edit: the latest versions of OpenOCD don't need such change, as it can detect v2 through interface/stlink.cfg
directly.)
On the other hand, the earliest OpenOCD commit I found that would require the gdb_memory_map disable
command is openocd-org/openocd@678fb4f, which is also the 2nd (and latest) commit applied to target/stm32h7x_dual_bank.cfg
(see file history here).
from stabilizer.
For reference, my openocd -v
command returns the following output:
Open On-Chip Debugger 0.10.0+dev-01267-g4c364b45-dirty (2020-06-04-21:57)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
The -dirty
appears to be due to build artifacts in the directory, although I am unsure. I have not modified the OpenOCD configuration and the repository I built from is still on my machine.
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 openocd
in the future as probe-rs
develops further. We currently only use openocd
to support gdb
-based debugging, but this isn't necessary for simple flashing operations. I would recommend we update the flashing instructions to instead use probe-rs
and cargo flash
.
from stabilizer.
Sorry, even with your OpenOCD version I still get the (See this reply)mem2array: Read @ 0x5c001004, w=4, cnt=1, failed
error.
Yes, it sounds nice to use other tools like probe-rs
and/or cargo flash
. I can take a look at how to use them when I have time, and hopefully I can help draft the new instructions using those tools!
from stabilizer.
I have finally figured out the problem. I got errors and couldn't load
the binary to the flash because I powered the board BEFORE connecting the ST-Link debugger to it. I was unaware that the sequence of supplying power to the board would make such a huge difference.
Because of this, perhaps we could (1) tag the OpenOCD commit needed without using gdb_memory_map disable
, and (2) remind the user to connect 12V before the JTAG adaptor/ debugger.
from stabilizer.
I've been following the correct power sequence to flash the board successfully with OpenOCD/GDB. However, the mem2array: Read @ 0x5c001004, w=4, cnt=1, failed
error has reappeared lately, and it seems to never happen without power-cycling the board after re-flashing some firmware to it. When that happen, there's a workaround I found - use DFU to erase the board first. The dfu-util
command I use is:
dfu-util -D dummy.file -a 0 -s 0x08000000:mass-erase:force
The mass-erase
parameter is to erase the flash, and the file passed to -D
will be ignored so any file can be used for that purpose. After erasing with DFU, you can either download a new binary to the board via DFU, or use OpenOCD/GDB again.
from stabilizer.
Closing as this seems to:
- refer to some spurious flashing issue that we haven't been able to reproduce
- refer to old flashing instructions that are outdated w.r.t. #401
Please open new issues if anything here is still pertinent.
from stabilizer.
Related Issues (20)
- Analyze low batch size timing HOT 7
- Batch size of 1 is broken
- May I ask some questions? HOT 3
- LTC2320 SPI delay estimation HOT 1
- Driver Software Development
- failed eeprom EUI reads make program execution stop HOT 6
- Relay aka. MCP23008 I2C shift register driver design HOT 6
- temperature sensor support (cpu on stabilizer and lm75 on pounder) HOT 1
- RTIC Monotonic Frequency limits Driver header ADC sampling rate HOT 1
- Stabilizer MCU internal ADCs show an offset error. HOT 14
- Move `shared-adc` to a separate crate to allow easily sharing ADC channels HOT 2
- CPU temperature measurement unstable HOT 16
- Review `DelayUs/DelayMs` API and possible migrate away.
- Driver DAC11001A support/notes HOT 1
- Minimum supported python version not documented HOT 4
- Stabilizer as streaming data sink
- rename driver interlock/interlock to interlock/interlocked HOT 1
- `y_min` value trumps `y_max` HOT 2
- Document influxdb/telegraf/grafana HOT 2
- Peripheral clock seems to be off. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stabilizer.