I'm able to debug my NXP MIMXRT1051 perfectly fine when running natively on linux and windows, however when using Virtual Box Virtual Box OR VMWare Workstation PRO (Ubuntu 18.04 guest with
4.18.0-21-generic kernel) I get the following error when using the JLinkGDBServer
Display All
And the debugger just hangs there. My settings.jlink file is just `SetResetType = 4`.
On the gdb client side, I run with the following .gdbinit file
Once GDB starts I type "continue" and it instantly hits a SIGTRAP on the client side, with the JLinkGDBServer hanging on the error above. The GDB client application shows the following:
The exact same set of files (.gdbinit, settings.jlink) and same JLink software version/arm-none-eabi-gdb on a native linux system run fine. Is anyone aware of any issues that Virtual Box presents the JLink? I have tried both USB2.0 and USB3.0 controllers on the virtual box side, with no luck.
EDIT: The same thing happens in VMware workstation. So it seems the JLink just does not like to be run in a virual environment. I get the same error in both types of virtual machine managers: "ERROR: Can not read register xxxxx while CPU is running"
4.18.0-21-generic kernel) I get the following error when using the JLinkGDBServer
Source Code
- SEGGER J-Link GDB Server V6.46c Command Line Version
- JLinkARM.dll V6.46c (DLL compiled Jun 3 2019 18:36:33)
- Command line: -if SWD -device MIMXRT1051CVL5B -port 2331 -settingsfile settings.jlink
- -----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: yes
- Generate logfile: off
- Verify download: off
- Init regs on start: off
- Silent mode: off
- Single run mode: off
- Target connection timeout: 0 ms
- ------J-Link related settings------
- J-Link Host interface: USB
- J-Link script: none
- J-Link settings file: settings.jlink
- ------Target related settings------
- Target device: MIMXRT1051CVL5B
- Target interface: SWD
- Target interface speed: 4000kHz
- Target endian: little
- Connecting to J-Link...
- J-Link is connected.
- Firmware: J-Link V10 compiled May 27 2019 15:48:59
- Hardware: V10.10
- S/N: 50121504
- Feature(s): GDB
- Checking target voltage...
- Target voltage: 3.25 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 0x600097AC (Data = 0x0000E7F9)
- Read 2 bytes @ address 0x600097AC (Data = 0xE7F9)
- Received monitor command: reset
- Resetting target
- Received monitor command: halt
- Halting target CPU...
- WARNING: CPU could not be halted
- ERROR: Can not read register 15 (R15) while CPU is running
- ...Target halted (PC = 0x00000000)
- Downloading 1024 bytes @ address 0x00000000
- Downloading 15968 bytes @ address 0x00000400
- Downloading 16112 bytes @ address 0x00004260
- Downloading 16080 bytes @ address 0x00008150
- Downloading 16192 bytes @ address 0x0000C020
- Downloading 8912 bytes @ address 0x0000FF60
- Downloading 8 bytes @ address 0x00012230
- Downloading 4 bytes @ address 0x00012238
- Downloading 4 bytes @ address 0x0001223C
- Downloading 156 bytes @ address 0x00012240
- Writing register (PC = 0x 4b4)
- Starting target CPU...
- ERROR: CPU is not halted
- ERROR: Can not read register 15 (R15) while CPU is running
- Reading all registers
- ERROR: Can not read register 0 (R0) while CPU is running
- ERROR: Can not read register 1 (R1) while CPU is running
- ERROR: Can not read register 2 (R2) while CPU is running
- ERROR: Can not read register 3 (R3) while CPU is running
- ERROR: Can not read register 4 (R4) while CPU is running
- ERROR: Can not read register 5 (R5) while CPU is running
- ERROR: Can not read register 6 (R6) while CPU is running
- ERROR: Can not read register 7 (R7) while CPU is running
- ERROR: Can not read register 8 (R8) while CPU is running
- ERROR: Can not read register 9 (R9) while CPU is running
- ERROR: Can not read register 10 (R10) while CPU is running
- ERROR: Can not read register 11 (R11) while CPU is running
- ERROR: Can not read register 12 (R12) while CPU is running
- ERROR: Can not read register 13 (R13) while CPU is running
- ERROR: Can not read register 14 (R14) while CPU is running
- ERROR: Can not read register 15 (R15) while CPU is running
- ERROR: Can not read register 16 (XPSR) while CPU is running
- ERROR: Can not read register 17 (MSP) while CPU is running
- ERROR: Can not read register 18 (PSP) while CPU is running
- ERROR: Can not read register 24 (PRIMASK) while CPU is running
- ERROR: Can not read register 25 (BASEPRI) while CPU is running
- ERROR: Can not read register 26 (FAULTMASK) while CPU is running
- ERROR: Can not read register 27 (CONTROL) while CPU is running
- ERROR: Can not read register 32 (FPSCR) while CPU is running
- ERROR: Can not read register 33 (FPS0) while CPU is running
- ERROR: Can not read register 34 (FPS1) while CPU is running
- ERROR: Can not read register 35 (FPS2) while CPU is running
- ERROR: Can not read register 36 (FPS3) while CPU is running
- ERROR: Can not read register 37 (FPS4) while CPU is running
- ERROR: Can not read register 38 (FPS5) while CPU is running
- ERROR: Can not read register 39 (FPS6) while CPU is running
- ERROR: Can not read register 40 (FPS7) while CPU is running
- ERROR: Can not read register 41 (FPS8) while CPU is running
- ERROR: Can not read register 42 (FPS9) while CPU is running
- ERROR: Can not read register 43 (FPS10) while CPU is running
- ERROR: Can not read register 44 (FPS11) while CPU is running
- ERROR: Can not read register 45 (FPS12) while CPU is running
- ERROR: Can not read register 46 (FPS13) while CPU is running
- ERROR: Can not read register 47 (FPS14) while CPU is running
- ERROR: Can not read register 48 (FPS15) while CPU is running
- ERROR: Can not read register 49 (FPS16) while CPU is running
- ERROR: Can not read register 50 (FPS17) while CPU is running
- ERROR: Can not read register 51 (FPS18) while CPU is running
- ERROR: Can not read register 52 (FPS19) while CPU is running
- ERROR: Can not read register 53 (FPS20) while CPU is running
- ERROR: Can not read register 54 (FPS21) while CPU is running
- ERROR: Can not read register 55 (FPS22) while CPU is running
- ERROR: Can not read register 56 (FPS23) while CPU is running
- ERROR: Can not read register 57 (FPS24) while CPU is running
- ERROR: Can not read register 58 (FPS25) while CPU is running
- ERROR: Can not read register 59 (FPS26) while CPU is running
- ERROR: Can not read register 60 (FPS27) while CPU is running
- ERROR: Can not read register 61 (FPS28) while CPU is running
- ERROR: Can not read register 62 (FPS29) while CPU is running
- ERROR: Can not read register 63 (FPS30) while CPU is running
- ERROR: Can not read register 64 (FPS31) while CPU is running
- ERROR: Can not read register 33 (FPS0) while CPU is running
- ERROR: Can not read register 34 (FPS1) while CPU is running
- ERROR: Can not read register 35 (FPS2) while CPU is running
- ERROR: Can not read register 36 (FPS3) while CPU is running
- ERROR: Can not read register 37 (FPS4) while CPU is running
- ERROR: Can not read register 38 (FPS5) while CPU is running
- ERROR: Can not read register 39 (FPS6) while CPU is running
- ERROR: Can not read register 40 (FPS7) while CPU is running
- ERROR: Can not read register 41 (FPS8) while CPU is running
- ERROR: Can not read register 42 (FPS9) while CPU is running
- ERROR: Can not read register 43 (FPS10) while CPU is running
- ERROR: Can not read register 44 (FPS11) while CPU is running
- ERROR: Can not read register 45 (FPS12) while CPU is running
- ERROR: Can not read register 46 (FPS13) while CPU is running
- ERROR: Can not read register 47 (FPS14) while CPU is running
- ERROR: Can not read register 48 (FPS15) while CPU is running
- ERROR: Can not read register 49 (FPS16) while CPU is running
- ERROR: Can not read register 50 (FPS17) while CPU is running
- ERROR: Can not read register 51 (FPS18) while CPU is running
- ERROR: Can not read register 52 (FPS19) while CPU is running
- ERROR: Can not read register 53 (FPS20) while CPU is running
- ERROR: Can not read register 54 (FPS21) while CPU is running
- ERROR: Can not read register 55 (FPS22) while CPU is running
- ERROR: Can not read register 56 (FPS23) while CPU is running
- ERROR: Can not read register 57 (FPS24) while CPU is running
- ERROR: Can not read register 58 (FPS25) while CPU is running
- ERROR: Can not read register 59 (FPS26) while CPU is running
- ERROR: Can not read register 60 (FPS27) while CPU is running
- ERROR: Can not read register 61 (FPS28) while CPU is running
- ERROR: Can not read register 62 (FPS29) while CPU is running
- ERROR: Can not read register 63 (FPS30) while CPU is running
- ERROR: Can not read register 64 (FPS31) while CPU is running
- WARNING: Failed to read memory @ address 0xDEADBEEE
And the debugger just hangs there. My settings.jlink file is just `SetResetType = 4`.
On the gdb client side, I run with the following .gdbinit file
The exact same set of files (.gdbinit, settings.jlink) and same JLink software version/arm-none-eabi-gdb on a native linux system run fine. Is anyone aware of any issues that Virtual Box presents the JLink? I have tried both USB2.0 and USB3.0 controllers on the virtual box side, with no luck.
EDIT: The same thing happens in VMware workstation. So it seems the JLink just does not like to be run in a virual environment. I get the same error in both types of virtual machine managers: "ERROR: Can not read register xxxxx while CPU is running"
The post was edited 1 time, last by bigbrett ().