在使用SWD进行下载的时候,首次进行下载是没问题的,但是第二次下载就会报错。这种现象是偶发的,不是所有板子都有这个现象。
SEGGER J-Link GDB Server V7.56 Command Line Version
JLinkARM.dll V7.56 (DLL compiled Oct 7 2021 16:12:50)
Command line: -if swd -device CYW43907 -endian little -speed auto -port 2331 -swoport 2332 -telnetport 2333 -vd -ir -localhostonly 1 -singlerun -strict -
timeout 0 -nogui
-----GDB Server start settings-----
GDBInit file: none
GDB Server Listening port: 2331
SWO raw output listening port: 2332
Terminal I/O port: 2333
Accept remote connection: localhost only
Generate logfile: off
Verify download: on
Init regs on start: on
Silent mode: off
Single run mode: on
Target connection timeout: 0 ms
------J-Link related settings------
J-Link Host interface: USB
J-Link script: none
J-Link settings file: none
------Target related settings------
Target device: CYW43907
Target interface: SWD
Target interface speed: auto
Target endian: little
Connecting to J-Link...
J-Link is connected.
Firmware: J-Link V9 compiled May 7 2021 16:26:12
Hardware: V9.30
S/N: 12345678
Checking target voltage...
Target voltage: 3.32 V
Listening on TCP/IP port 2331
Connecting to target...
Connected to target
Waiting for GDB connection...Connected to 127.0.0.1
Reading all registers
Read 4 bytes @ address 0x00000000 (Data = 0xB496F154)
Received monitor command: speed 1000
Target interface speed set to 1000 kHz
Received monitor command: clrbp
Received monitor command: reset
Resetting target
Received monitor command: halt
Halting target CPU...
...Target halted (PC = 0x005994F8)
Received monitor command: regs
PC = 005994F8, CPSR = 000001D3 (SVC mode, ARM FIQ dis. IRQ dis.)
R0 = 00000004, R1 = 00000001, R2 = 004BF439, R3 = 005994EC
R4 = 881FD404, R5 = 05050505, R6 = 06060606, R7 = 07070707
USR: R8 =08080808, R9 =00941D94, R10=00000000, R11 =11111111, R12 =00000000
R13=004A2000, R14=004A019B
FIQ: R8 =C5504827, R9 =B05BC937, R10=820823F6, R11 =B8644115, R12 =944EF512
R13=004C2100, R14=E62D02D5, SPSR=5E05FF98
SVC: R13=004C1C98, R14=0055A2E2, SPSR=6000003F
ABT: R13=004C1CE8, R14=004A17CE, SPSR=4000007F
IRQ: R13=004C2100, R14=00559D86, SPSR=6000003F
UND: R13=004C1CE8, R14=005994EC, SPSR=000001D3
Reading all registers
Received monitor command: speed auto
Select auto target interface speed (1000 kHz)
Received monitor command: flash breakpoints 0
Flash breakpoints disabled
Read 4 bytes @ address 0x005994F8 (Data = 0x2101024B)
WARNING: Failed to read memory @ address 0x11111111
Read 4 bytes @ address 0x0055A2E2 (Data = 0x8F6FF3BF)
WARNING: Failed to read memory @ address 0x11111111
Read 4 bytes @ address 0x0055A2E2 (Data = 0x8F6FF3BF)
WARNING: Failed to read memory @ address 0x11111111
Received monitor command: clrbp
Received monitor command: reset
Resetting target
Received monitor command: halt
Halting target CPU...
...Target halted (PC = 0x005994F8)
Received monitor command: loadbin D:/CYW43907/CYW43907/build/APP_CYW943907AEVAL1F/Debug/mtb-example-cyw43907-tcp-client.trx.bin 0x14000000
Loading binary file [D:/CYW43907_20240909/CYW43907/build/APP_CYW943907AEVAL1F/Debug/mtb-example-cyw43907-tcp-client.trx.bin] ...
Downloading 953024 bytes @ address 0x14000000 - Verified OK
Binary file loaded successfully (953024 bytes downloaded)
Received monitor command: reset
Comparing flash [....................] Done.
Erasing flash [....................] Done.
ERROR: PC of target system has unexpected value after erasing sectors. (PC = 0x005994E6)!
---------------------------------------------------------------------- Registers -------------------------------------------------------------------------------------
PC = 004A2000
Current: R0 = 004A1D98, R1 = 00000001, R2 = 004BF439, R3 = 004A17CE
R4 = 881FD404, R5 = 05050505, R6 = 06060606, R7 = 07070707
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Failed to erase sectors.
Resetting target
Received monitor command: go
Starting target CPU...
GDB closed TCP/IP connection (Socket 2176)