Posts by Torsten Robitzki
-
-
Hello,
first of all, let me say thank you for this great debugger. I switched from GDB after experiencing a lot of crashes. So far, Ozone is stable and serves me well.When displaying local data, the corresponding view tries to display the type with up to 512 characters. This extends the main window to span the used monitor multiple times. I know, that 512 is extreme, but using C++ templates, this is not unusual (CRTP). Maybe, it would be an option to have a horizontal scroll bar in the type display?
best regards
Torsten
-
Hi Alex,
well I'm not sure, if I really want to understand the inner details of your RTT implementation. According to the white paper on your website, it is basically polling some memory regions via SWD. So from technical perspective, I can not see, why the viewer / JTrace stops polling when there was an error condition, but of cause I'm not familiar with all the necessary details.Anyway, my task was to replace a debug UART by RTT, which seems to be not possible, because we would always miss the most important part of the logging, namely the startup.
Thank you both for your time and the insights into RTT.
best regards und schönes Wochenende
Torsten
-
Hi Fabian,
I reset the device in two situations:
- While flashing new firmware, where the reset is then executed by the JTrace
- By simply performing a hardware reset (pull nReset to low)In both cases, I have to do the reconnect, which is somehow annoying. I do not power down the JTrace, nor do I disconnect the JTrace. To me, this doesn't look like uncommon use cases
Do you think, this could be improved somehow?
best regards
Torsten
Other observation: When I do some logging with a frequency of 1Hz, I see that log line with a frequency of 0.5Hz being displayed in JLinkRTTViewer
-
Hello,
I have a problem, porting an nRF5340 based Zephyr project from logging to an UART to logging via RTT. I have a J-Trace Pro Cortex-A/R/M connected to a Nordic nRF53. JLink Software Version 7.96c. Maybe someone here has made similar experiences and has an idea as to how to overcome them.Observation: Zephyr is configured to use RTT as logging backend. I have small test program, that just writes some log messages. Logging to JLinkRTTViewer stops as soon, as I reset the device. Once, I disconnect and connect again, messages are visible again.
Is this expected behavior? My Nordic-flavor of Zephyr uses this version of RTT: https://github.com/zephyrproject-rtos/segger
best regards
Torsten
-
Hi Fabian,
I would require both.best regards,
Torsten -
Hi,
currently I have to work with a TMS320F28379D from TI. There seems to be no support from Segger for these kind of chips. Are there plans to support them in future? If not, why not?best regards,
Torsten -
Hi Fabian,
looks like this would have been the solution. Haven't tried to flash the firmware, but the JLinkExe is reporting correctly the CoreSights components of the controller. Thank you very much for further looking into this!best regards,
Torsten -
Hi Fabian,
please find attached a picture from the setup I've used yesterday. I've checked the 3.3V on the connector at the lower left side of the board, I attached the logic analyzer to the TMS and TCK pins on the left connector side.best regards,
Torsten -
This is a follow up to [SOLVED] LAUNCHXL CC26X2R1 + Code Composer + JLINK EDU MINI unfortunately the thread is closed and I would like to ask the OP how he managed to flash the board, using a JLink. I've removed all jumpers that where not necessary to provide power to the board and connected my J-Trace (using latest SW version V6.72b). JLinkExe just gave similar error messages (trying to reset the board):
Code
Display MoreDevice "CC2652R1F" selected. Connecting to target via SWD InitTarget: Can not find ICE-Pick (IDCODE mismatch). Expected 0x0B00002F, found: 0x3FFFFFFF InitTarget: Can not find ICE-Pick (IDCODE mismatch). Expected 0x0B00002F, found: 0x3FFFFFFF InitTarget: Can not find ICE-Pick (IDCODE mismatch). Expected 0x0B00002F, found: 0x3FFFFFFF InitTarget: Can not find ICE-Pick (IDCODE mismatch). Expected 0x0B00002F, found: 0x3FFFFFFF InitTarget: Can not find ICE-Pick (IDCODE mismatch). Expected 0x0B00002F, found: 0x3FFFFFFF InitTarget: Can not find ICE-Pick (IDCODE mismatch). Expected 0x0B00002F, found: 0x3FFFFFFF InitTarget: Can not find ICE-Pick (IDCODE mismatch). Expected 0x0B00002F, found: 0x3FFFFFFF InitTarget: Can not find ICE-Pick (IDCODE mismatch). Expected 0x0B00002F, found: 0x3FFFFFFF ****** Error: InitTarget(): PCode returned with error code -1
I've attached a logic analyzer and at least saw traffic on the SWDIO and SWDCLK lines. Finally, I gave up and installed the TI software to operate the on board debugger, with which is was possible to install firmware on the board, without any problems (after putting the pulled jumpers back in place). I tried the JTrace after using the TI software once more, but without success.
Any idea, what could be wrong here?
Best regards,
Torsten -
Hi Fabian,
the J-Trace Pro is less than half a year old. If it helps to speed up this use, I will also open a ticket within your support system. The original message, that flashing with the J-Commander works flawless, was not quite correct. I can see problems there two, but much less. My current workaround is, to close the JLinkGDBServer, start the JLinkExe, flash a new version of the software and then start the JLinkGDBServer again. When flashing with the JlinkExe fails, I try some combinations of `r`, `halt` and `loadfile` until the file is flashed without error message.We do not set the SAM4S security flag. Please find attached a hex file that should reproduce the problem. (this more directed to the support, which I will contact right now).
thanks for looking into this!
best regards,
Torsten -
-
-
While I was searching for similar error messages here in the forum, I found some cases, where the wrong device type caused similar problems (albeit more reproducible). I received the device type with the schematic of the hardware I'm working for. So I got a big magnificent glas and verified, that the actually used type is really a ATSAM4SD32C.
-
As I'm still looking for a solution, I'm poking around a little bit and realized, that the J-Flash Lite software that comes with the J-Trace Pro, also has problems erasing the flash (I dunno, if that is somehow related to my problem):
Quote from J-Flash LiteConnecting to J-Link...
Connecting to target...
Erasing...
ERROR: Could not erase chip.Done -
Hi Nino,
thanks for looking into this. No, it doesn't work (beside the command for reseting seems to be "r" not "reset"). I'm getting reproducible an error while executing the "erase" command:Quote from Error while erasingJ-Link>erase
Erasing device...****** Error: Failed to erase chip @ address 0x00400000 (Algo47: Sector is locked)
Failed to erase chip.
Failed to execute RAMCode for chip erase!
J-Link: Flash download: Total time needed: 5.174s (Prepare: 0.195s, Compare: 0.000s, Erase: 4.901s, Program: 0.000s, Verify: 0.000s, Restore: 0.077s)
ERROR: Erase returned with error code -5.
J-Link>
As this is deterministic and reproducible, I don't think that this is exactly the issue that is bugging me. I ignored that erase issue and went further down your command list and flashed two different hex files alternating and got no error messages even after at least 10 attempts.When writing an elf file using GDB, the GDB Server runs very quickly into the issue I'm seeing (see above). I've attached a log from my JLinkExe session.
I suspect, that the GDB server is deferring flashing until the CPU is restarted and thus is failing at this point. Are there any other tests, that I can do to bring more insight? Anything to make it more reproducible? (already reduced the SWD frequency).
best regards,
Torsten -
Here is a second example:
Quote from Segger GDB Server logConnected to 127.0.0.1
Reading all registers
Read 4 bytes @ address 0x00403DDE (Data = 0x4770BC80)
Read 2 bytes @ address 0x00403DDE (Data = 0xBC80)
Received monitor command: speed 1000
Target interface speed set to 1000 kHz
Received monitor command: flash breakpoints = 0
Flash breakpoints disabled
Received monitor command: flash download = 1
Flash download enabled
Received monitor command: flash device = ATSAM4SD32C
Selecting device: ATSAM4SD32C
Downloading 15952 bytes @ address 0x00400000 - Verified OK
Downloading 7772 bytes @ address 0x00403E50 - Verified OK
Downloading 240 bytes @ address 0x00405CAC - Verified OK
ERROR: Failed to prepare for programming.
RAM check failed @ addr 0x20000784.
RAM check failed while testing 0x07F0 bytes @ addr 0x20000784.
Writing register (PC = 0x 400000)
Read 4 bytes @ address 0x00400000 (Data = 0x20003B28)
Read 2 bytes @ address 0x00400000 (Data = 0x3B28)
Read 2 bytes @ address 0x004009F0 (Data = 0x3B28)
Read 4 bytes @ address 0x00400000 (Data = 0xAF00B480)
Read 2 bytes @ address 0x00400000 (Data = 0x3B28)
Read 2 bytes @ address 0x0040499C (Data = 0x4A69)
Read 4 bytes @ address 0x00404B44 (Data = 0xB082B580)
Read 2 bytes @ address 0x0040499C (Data = 0x68F8)
Read 2 bytes @ address 0x0040499C (Data = 0x4B2B)
Received monitor command: reset
WARNING: T-bit of XPSR is 0 but should be 1. Changed to 1.
Resetting target
Setting breakpoint @ address 0x0040499C, Size = 2, BPHandle = 0x000B
Starting target CPU...
WARNING: T-bit of XPSR is 0 but should be 1. Changed to 1.
...Target halted (DBGRQ, PC = 0x20000000)
Reading all registersI've started GDB (without flash breakpoints enabled, with just one break point set; without the "monitor reset" command from the .gdbinit above). The log showed the messages above down to the last Downloading Message. I've entered a "monitor reset" command, which does not lead to addition log output. After I've started the debug session ("c"), the error message above appeared. The missing T-bit clearly indicates that the flash content was not correct.
In an other session, the error message above shows up, directly after reseting the controller ("monitor reset"). If I repeat the flash upload (by restating GDB and thus executing the .gdbinit file), I end up without and error messages in the log and then, I'm able to debug my target.
-
Hello,
I'm using a J-Trace Pro to debug an ATSAM4SD32C. While I've tried to figure out, why my code is not doing, what it is supposed to do, I came to the conclusion, that the content of my elf file is not flashed correctly. This is not 100% reproducible but if I inspect for example the interrupt table and compare it with a list file or hex file, I find the address of the Reset_Handler to be "reasonable", but not correct. In the log of the SEGGER J-Link GDB Server V6.54 (GUI Version), I found a clue, that there might have been something wrong:Quote from logConnected to 127.0.0.1
Reading all registers
Read 4 bytes @ address 0x0040035C (Data = 0xF0004801)
Read 2 bytes @ address 0x0040035C (Data = 0x4801)
Received monitor command: speed 1000
Target interface speed set to 1000 kHz
Received monitor command: flash breakpoints = 1
Flash breakpoints enabled
Received monitor command: flash download = 1
Flash download enabled
Received monitor command: flash device = ATSAM4SD32C
Selecting device: ATSAM4SD32C
Downloading 15952 bytes @ address 0x00400000 - Verified OK
Downloading 7452 bytes @ address 0x00403E50 - Verified OK
Downloading 240 bytes @ address 0x00405B6C
- Verified OK
ERROR: Failed to prepare for programming.
RAM check failed @ addr 0x20000785.
RAM check failed while testing 0x07F0 bytes @ addr 0x20000784.
Writing register (PC = 0x 400000)
Read 4 bytes @ address 0x00400000 (Data = 0xFEF7FFFF)
Read 2 bytes @ address 0x00400000 (Data = 0xFFFF)
Read 2 bytes @ address 0x004009F0 (Data = 0xFFFF)
Read 4 bytes @ address 0x00400000 (Data = 0xFFFFFFFF)
Read 2 bytes @ address 0x00400000 (Data = 0xFFFF)
Read 2 bytes @ address 0x00400002 (Data = 0xFFFF)
Read 2 bytes @ address 0x0040499C (Data = 0xFFFF)
Read 2 bytes @ address 0x0040499C (Data = 0xFFFF)
Read 2 bytes @ address 0x0040499C (Data = 0xFFFF)
Read 2 bytes @ address 0x00400A82 (Data = 0xFFFF)
Read 2 bytes @ address 0x00400ABA (Data = 0xAB4B)
Received monitor command: reset
Resetting target
Received monitor command: resetThe line starting with `ERROR` does not appear, when loading the elf file, but when I start my debug sequence with `monitor reset`. In the cases, where it looks it seems to working correctly, the Error message and the two following lines starting with "RAM" are not present in the log file.
I've set the "Verify download" option in the GDB server, but even with this option, I don't get any feedback that I can see in GDB (cli version; 7.12.1). This is how my .gdbinit looks like:
Quote from .gdbinit# set print pretty on
# set debug remote 1target remote localhost:2331
monitor speed 1000
monitor flash breakpoints = 1
monitor flash download = 1
monitor flash device = ATSAM4SD32Cload ../sensor-blp/cmake-build-workspace-none-cortex-m4-debug-gcc/bin/backend_verifications.elf
symbol ../sensor-blp/cmake-build-workspace-none-cortex-m4-debug-gcc/bin/backend_verifications.elfbreak crash_log_hardfault_parameters
break usb.cpp:28
monitor resetIs there a ways to get reliable around this error / to prevent this error? Is there a way to at least get direct feedback in GDB, that such an error occurred?
best regards,
Torsten -
-
Hello,
I just upgraded by JLink software to version V6.10k on OS/X and this broke my build and test environment. We build and execute jlink scripts based on configured build targets. For example, to erase the flash of a device, we generate a file called erase.jlink and use JLinkExe to execute this file. This worked fine, for the last two years, but now with the new version, JLinkExe starts to propt for additional informations:...
Please specify device / core. <Default>: NUC140LE3
Type '?' for selection dialog
Device>q
Please specify target interface:
J) JTAG (Default)
S) SWD
F) FINE
I) ICSP
C) C2
TIF>Is there a way to get the old behavior back, that is backwards compatible for those team members that do not / can not upgrade to the new version?
Thanks, in advance and kind regards,
Torsten Robitzki
Edit: And I see the same issue with version V6.10k