Я пытаюсь использовать Eclipse с J-Link на ATMEL ATSAME70Q21.Я могу отлаживать код идеально, когда начальный адрес кода по умолчанию 0x00400000.Он загружает код, останавливается на главной точке останова и т. Д. Кажется, что все команды отладки работают нормально.
Когда я изменяю адрес на 0x00420000 в файле компоновщика, код загружается, но точка останова наОсновная функция не ударил.На консоли видно много сообщений (см. Ниже).
Я попытался установить для регистра VTOR значение 0x0420000, введя следующую команду в разделе «Отладка конфигурации |Запуск |Мониторинг команд запуска / перезапуска memU32 0xE000ED08 = 0x0420000, но он продолжает работать так же.Я полагаю, что ARM пытается выполнить код по адресу, отличному от начальной точки, определенной в памяти 0x00420004 ...
Есть идеи?
Вывод консоли можно найти ниже.Вспышка запрограммирована и проверена.Однако последние 2 строки указывают на то, что что-то не так ...
SEGGER J-Link GDB Server V6.34h Command Line Version
JLinkARM.dll V6.34h (DLL compiled Oct 9 2018 15:50:01)
Command line: -if swd -device ATSAME70Q21 -endian little -speed 1000 -port 2331 -swoport 2332 -telnetport 2333 -vd -ir -localhostonly 1 -log /home/user/svn/SDCO-504/AtmelSAM-2/FreeRTOS_IP_SAME70_v3/Debug/GDBlog -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: on
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: ATSAME70Q21
Target interface: SWD
Target interface speed: 1000kHz
Target endian: little
Connecting to J-Link...
J-Link is connected.
Firmware: J-Link V10 compiled Sep 4 2018 11:24:21
Hardware: V10.10
SAM-ICE found !
S/N: 20125801
OEM: SAM-ICE
Feature(s): RDI, GDB
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 = 0x20459B48)
Read 2 bytes @ address 0x00000000 (Data = 0x9B48)
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 = 0x0040E410)
Received monitor command: regs
R0 = 00000000, R1 = 00000000, R2 = 00000000, R3 = 00000000
R4 = 00000000, R5 = 00000000, R6 = 00000000, R7 = 00000000
R8 = 00000000, R9 = 00000000, R10= 00000000, R11= 00000000
R12= 00000000, R13= 20459B48, MSP= 20459B48, PSP= 00000000
R14(LR) = FFFFFFFF, R15(PC) = 0040E410
XPSR 01000000, APSR 00000000, EPSR 01000000, IPSR 00000000
CFBP 00000000, CONTROL 00, FAULTMASK 00, BASEPRI 00, PRIMASK 00
Reading all registers
Read 4 bytes @ address 0x0040E410 (Data = 0xB084B580)
Read 2 bytes @ address 0x0040E410 (Data = 0xB580)
Received monitor command: speed auto
Select auto target interface speed (2000 kHz)
Received monitor command: flash breakpoints 1
Flash breakpoints enabled
Read 4 bytes @ address 0x0040E410 (Data = 0xB084B580)
Read 2 bytes @ address 0x0040E410 (Data = 0xB580)
Downloading 16128 bytes @ address 0x00420000 - Verified OK
Downloading 16080 bytes @ address 0x00423F00 - Verified OK
Downloading 16112 bytes @ address 0x00427DD0 - Verified OK
Downloading 16128 bytes @ address 0x0042BCC0 - Verified OK
Downloading 16064 bytes @ address 0x0042FBC0 - Verified OK
Downloading 14764 bytes @ address 0x00433A80 - Verified OK
Downloading 8 bytes @ address 0x0043742C - Verified OK
Downloading 2536 bytes @ address 0x00437434 - Verified OK
Comparing flash [....................] Done.
Verifying flash [....................] Done.
Writing register (PC = 0x 420000)
Read 4 bytes @ address 0x00420000 (Data = 0x20459B48)
Read 2 bytes @ address 0x00420000 (Data = 0x9B48)
Read 2 bytes @ address 0x0042FD5A (Data = 0xF7FF)
Read 2 bytes @ address 0x0042FD5A (Data = 0xF7FF)
Received monitor command: clrbp
Received monitor command: reset
Resetting target
Received monitor command: halt
Halting target CPU...
...Target halted (PC = 0x0040E410)
Received monitor command: memU32 0xE000ED08 = 0x0420000
Writing 0x00420000 @ address 0xE000ED08
Read 2 bytes @ address 0x0042FD5A (Data = 0xF7FF)
Read 2 bytes @ address 0x0042FD5A (Data = 0xF7FF)
Read 2 bytes @ address 0x0042FD5A (Data = 0xF7FF)
Received monitor command: regs
R0 = 00000000, R1 = 00000000, R2 = 00000000, R3 = 00000000
R4 = 00000000, R5 = 00000000, R6 = 00000000, R7 = 00000000
R8 = 00000000, R9 = 00000000, R10= 00000000, R11= 00000000
R12= 00000000, R13= 20459B48, MSP= 20459B48, PSP= 00000000
R14(LR) = FFFFFFFF, R15(PC) = 0040E410
XPSR 01000000, APSR 00000000, EPSR 01000000, IPSR 00000000
CFBP 00000000, CONTROL 00, FAULTMASK 00, BASEPRI 00, PRIMASK 00
Reading all registers
Read 4 bytes @ address 0x0040E410 (Data = 0xB084B580)
Read 2 bytes @ address 0x0040E410 (Data = 0xB580)
Read 2 bytes @ address 0x0042FD5A (Data = 0xF7FF)
Read 2 bytes @ address 0x0042FD5A (Data = 0xF7FF)
WARNING: Failed to read memory @ address 0xFFFFFFFE
WARNING: Failed to read memory @ address 0xFFFFFFFE