Hello,
I am trying to debug U-Boot SPL on a Cyclone V Soc. I have a J-Link Ultra + that is connected via JTAG to the Cyclone V.
My Operating System is Ubuntu 20.04 LTS running in a Virtual Box.
The JLink FW Version is:
Firmware: J-Link Ultra V5 compiled Jun 29 2021 16:14:06
Hardware: V5.00
So far I have managed to connect to the Device with the command:
The JLink Script File is necessary to enable the monitor reset command in gdb. It contains:
Display All
I can now connect to the Target form within gdb-multiarch load U-Boot SPL and start execution:
Display All
As requested gdb halts @ spl_boot_device:
When I try to single step now, gdb hangs and I get an endless loop in the JLinkGDBServer Output:
Display All
What am I missing?
Best regards,
Martin
I am trying to debug U-Boot SPL on a Cyclone V Soc. I have a J-Link Ultra + that is connected via JTAG to the Cyclone V.
My Operating System is Ubuntu 20.04 LTS running in a Virtual Box.
The JLink FW Version is:
Firmware: J-Link Ultra V5 compiled Jun 29 2021 16:14:06
Hardware: V5.00
So far I have managed to connect to the Device with the command:
The JLink Script File is necessary to enable the monitor reset command in gdb. It contains:
Brainfuck Source Code
- /*********************************************************************
- * (c) SEGGER Microcontroller GmbH & Co. KG *
- * The Embedded Experts *
- * www.segger.com *
- **********************************************************************
- -------------------------- END-OF-HEADER -----------------------------
- File : Altera_Cyclone_V.JLinkScript
- Purpose : Script file for Cyclone V series devices
- Literature:
- [1] J-Link User Guide
- Additional information:
- For more information about public functions that can be implemented in order to customize J-Link actions, please refer to [1]
- */
- /*********************************************************************
- *
- * ConfigTargetSettings
- */
- int ConfigTargetSettings(void) {
- //
- // For the Cyclone V device to work with J-Link the Core type needs to be set manually.
- //
- CPU = CORTEX_A9;
- return 0;
- }
- /*************************** end of file ****************************/
Source Code
- (gdb) target remote localhost:2331
- (gdb) file u-boot-spl
- (gdb) monitor reset
- (gdb) load
- Loading section .text, size 0xa448 lma 0xffff0000
- Loading section .rodata, size 0x25f8 lma 0xffffa448
- Loading section .data, size 0x54 lma 0xffffca40
- Loading section .u_boot_list, size 0x70c lma 0xffffca94
- Start address 0xffff0000, load size 53664
- Transfer rate: 221 KB/sec, 8944 bytes/write.
- (gdb) b spl_boot_device
- (gdb) cont
Source Code
- Setting breakpoint @ address 0xFFFF173A, Size = 2, BPHandle = 0x0056
- Starting target CPU...
- ...Breakpoint reached @ address 0xFFFF173A
- Reading all registers
- Removing breakpoint @ address 0xFFFF173A, Size = 2
- Read 2 bytes @ address 0xFFFF173A (Data = 0x6020)
- Read 2 bytes @ address 0xFFFF173A (Data = 0x6020)
- Read 2 bytes @ address 0xFFFF173A (Data = 0x6020)
- Read 2 bytes @ address 0xFFFF173A (Data = 0x6020)
- Read 2 bytes @ address 0xFFFF173A (Data = 0x6020)
- Read 4 bytes @ address 0xFFFF173A (Data = 0xBD106020)
- Read 2 bytes @ address 0xFFFF173A (Data = 0x6020)
- Read 2 bytes @ address 0xFFFF173A (Data = 0x6020)
- Read 2 bytes @ address 0xFFFF173A (Data = 0x6020)
- Setting breakpoint @ address 0xFFFF173A, Size = 2, BPHandle = 0x0057
- Starting target CPU...
- ...Breakpoint reached @ address 0xFFFF173A
- Reading all registers
- Removing breakpoint @ address 0xFFFF173A, Size = 2
- Read 2 bytes @ address 0xFFFF173A (Data = 0x6020)
- Read 2 bytes @ address 0xFFFF173A (Data = 0x6020)
- Read 2 bytes @ address 0xFFFF173A (Data = 0x6020)
- Read 2 bytes @ address 0xFFFF173A (Data = 0x6020)
- Read 2 bytes @ address 0xFFFF173A (Data = 0x6020)
- Read 4 bytes @ address 0xFFFF173A (Data = 0xBD106020)
- Read 2 bytes @ address 0xFFFF173A (Data = 0x6020)
- Read 2 bytes @ address 0xFFFF173A (Data = 0x6020)
- Read 2 bytes @ address 0xFFFF173A (Data = 0x6020)
- Setting breakpoint @ address 0xFFFF173A, Size = 2, BPHandle = 0x0058
- Starting target CPU...
Best regards,
Martin