-
Notifications
You must be signed in to change notification settings - Fork 128
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
Problem to unlock the nrf chip with Blackmagic #6
Comments
@BenRoe Cool to see someone else making these. Before the module is unlocked there is only one target available (the After that, when you connect or do the next Here are a couple of pastes from the logs I've been keeping as I go... Side note: I set up some udev rules so the black magic probe always gets the same name: cat <<EOF | sudo tee -a /etc/udev/rules.d/99-blackmagic.rules
# Black Magic Probe
# there are two connections, one for GDB and one for uart debugging
SUBSYSTEM=="tty", ATTRS{interface}=="Black Magic GDB Server", SYMLINK+="ttyBmpGdb"
SUBSYSTEM=="tty", ATTRS{interface}=="Black Magic UART Port", SYMLINK+="ttyBmpTarg"
EOF
sudo service udev restart That lets me use On to the unlocking: $ arm-none-eabi-gdb --ex "target extended-remote /dev/ttyBmpGdb" --ex "mon swdp_scan"
GNU gdb (GNU Tools for Arm Embedded Processors 7-2018-q3-update) 8.1.0.20180315-git
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-pc-linux-gnu --target=arm-none-eabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
Remote debugging using /dev/ttyBmpGdb
Target voltage: unknown
Available Targets:
No. Att Driver
1 Nordic nRF52 Access Port
(gdb) att 1
Attaching to Remote target
warning: while parsing target description: no element found
warning: Could not load XML target description; ignoring
PC register is not available
(gdb) mon erase_mass
(gdb) detach
Detaching from program: , Remote target
(gdb) quit at which point I had to reboot, then: $ arm-none-eabi-gdb --ex "target extended-remote /dev/ttyBmpGdb" --ex "mon swdp_scan"
[...]
Target voltage: unknown
Available Targets:
No. Att Driver
1 Nordic nRF52 M3/M4
2 Nordic nRF52 Access Port
(gdb) att 1
Attaching to Remote target
warning: No executable has been specified and target does not support
determining executable automatically. Try using the "file" command.
0xfffffffe in ?? ()
(gdb) mon erase_mass
erase..
(gdb) load pca10056_bootloader-0.2.11_s140_6.1.1.hex
Loading section .sec1, size 0xb00 lma 0x0
Loading section .sec2, size 0xf000 lma 0x1000
Loading section .sec3, size 0x10000 lma 0x10000
Loading section .sec4, size 0x5de8 lma 0x20000
Loading section .sec5, size 0x70c8 lma 0xf4000
Loading section .sec6, size 0x8 lma 0x10001014
Start address 0x0, load size 182712
Transfer rate: 31 KB/sec, 966 bytes/write.
(gdb) detach
Detaching from program: , Remote target
(gdb) quit
$ (Notice above that the new unlocked target Then power off BMP; power on BMP; power on USB to nrfmicro; mount the drive that appears. (Note that this was unlocking and flashing the raw module before connecting to the nrfmicro PCB, so I needed the BMP powered on to supply 3.3v to the module -- since yours is assembled you should just be able to connect it directly to the USB). Now you can copy the precompiled test firmware to check each GPIO can flash a test LED as described on the wiki: $ cp blink.uf2 /media/len/NRF52BOOT/ After the file copies, the volume will disappear, and the blink code is running, you can then proceed to verifying the pins on the nrfmicro. In all of the ones I soldered I had to wick some more solder to some of the inner pads to get the LED flashing, it's a neat design trick that @joric used there! I've got my nrfmicros working with the test master/slave keyboard firmware on a corne, and am currently (when I can grab bits of time) updating to get the keymap I normally use working. |
Great to see someone else experiences problems with my project! Also take a look at that AndruPol/nrf52832-recover#1 (link from References in the Software article). |
I try to unlock the nrf chip on Linux Debian.
Port is correct (ttyACM0 and ttyACM1 are available).
Wirering should be correct (see picture).
Any idea what the problem could be?
I can't figure out what the problem is.
I also get only one available target in gdb.
The text was updated successfully, but these errors were encountered: