Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- raspberry pi 4
- sudo apt-get install openocd
- openocd.cfg
- adapter driver bcm2835gpio
- bcm2835gpio_peripheral_base 0xFE000000
- bcm2835gpio_speed_coeffs 236181 60
- bcm2835gpio_swd_nums 25 24
- transport select swd
- set CHIPNAME nrf52840
- source [find target/nrf52.cfg]
- adapter speed 1000
- init
- targets
- reset halt
- SB1 soldered, SB2 cut
- downloaded pca10059_bootloader-0.6.2.zip
- extracted pca10059_bootloader-0.6.2_s140_6.1.1.hex
- modified /usr/share/openocd/scripts/target/nrf52.cfg
- #swj_newdap $_CHIPNAME cpu -expected-id $_CPUTAPID
- swj_newdap $_CHIPNAME cpu -expected-id
- sudo openocd
- Open On-Chip Debugger 0.10.0+dev-00114-g41bcbc67d-dirty (2021-01-18-16:43)
- Licensed under GNU GPL v2
- For bug reports, read
- http://openocd.org/doc/doxygen/bugs.html
- Info : BCM2835 GPIO JTAG/SWD bitbang driver
- Info : clock speed 1000 kHz
- Info : SWD DPIDR 0x2ba01477
- Info : nrf52840.cpu: hardware has 6 breakpoints, 4 watchpoints
- Error: nrf52840.cpu -- clearing lockup after double fault
- Info : starting gdb server for nrf52840.cpu on 3333
- Info : Listening on port 3333 for gdb connections
- target halted due to debug-request, current mode: Thread
- xPSR: 0x01000000 pc: 0xfffffffe msp: 0xfffffffc
- Info : Listening on port 6666 for tcl connections
- Info : Listening on port 4444 for telnet connections
- telnet localhost 4444
- targets
- TargetName Type Endian TapName State
- -- ------------------ ---------- ------ ------------------ ------------
- 0* nrf52840.cpu cortex_m little nrf52840.cpu halted
- flash banks
- #0 : nrf52840.flash (nrf5) at 0x00000000, size 0x00000000, buswidth 1, chipwidth 1
- #1 : nrf52840.uicr (nrf5) at 0x10001000, size 0x00000000, buswidth 1, chipwidth 1
- reg
- ===== arm v7m registers
- (0) r0 (/32): 0x00000000
- (1) r1 (/32): 0x00000000
- (2) r2 (/32): 0x00000000
- (3) r3 (/32): 0x00000000
- (4) r4 (/32): 0x00000000
- (5) r5 (/32): 0x00000000
- (6) r6 (/32): 0x00000000
- (7) r7 (/32): 0x00000000
- (8) r8 (/32): 0x00000000
- (9) r9 (/32): 0x00000000
- (10) r10 (/32): 0x00000000
- (11) r11 (/32): 0x00000000
- (12) r12 (/32): 0x00000000
- (13) sp (/32): 0xfffffffc
- (14) lr (/32): 0xffffffff
- (15) pc (/32): 0xfffffffe
- (16) xPSR (/32): 0x01000000
- (17) msp (/32): 0xfffffffc
- (18) psp (/32): 0x00000000
- (19) primask (/1): 0x00
- (20) basepri (/8): 0x00
- (21) faultmask (/1): 0x00
- (22) control (/2): 0x00
- (23) d0 (/64): 0x0000000000000000
- (24) d1 (/64): 0x0000000000000000
- (25) d2 (/64): 0x0000000000000000
- (26) d3 (/64): 0x0000000000000000
- (27) d4 (/64): 0x0000000000000000
- (28) d5 (/64): 0x0000000000000000
- (29) d6 (/64): 0x0000000000000000
- (30) d7 (/64): 0x0000000000000000
- (31) d8 (/64): 0x0000000000000000
- (32) d9 (/64): 0x0000000000000000
- (33) d10 (/64): 0x0000000000000000
- (34) d11 (/64): 0x0000000000000000
- (35) d12 (/64): 0x0000000000000000
- (36) d13 (/64): 0x0000000000000000
- (37) d14 (/64): 0x0000000000000000
- (38) d15 (/64): 0x0000000000000000
- (39) fpscr (/32): 0x00000000
- ===== Cortex-M DWT registers
- nrf5 mass_erase
- nRF52840-xxAA(build code: D0) 1024kB Flash, 256kB RAM
- Flash protection of this nRF device is not supported
- Failed to check chip's write protection
- flash erase_check 0
- successfully checked erase state
- Bank is erased
- flash write_image /home/pi/openocd-config/bootloader.hex
- Padding image section 0 at 0x00000b00 with 1280 bytes
- Flash write discontinued at 0x00025de8, next section at 0x000f4000
- SWD DPIDR 0x2ba01477
- Failed to write memory at 0x20001948
- Failed to write to nrf5 flash
- error writing to flash at address 0x00000000 at offset 0x00000000
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement