RTT viewer logging doesn't show device log on custom application.

We tried to see device logs from our target.

We use dfu bootloader for our custom target.

I enable RTT logging on our custom source for our target.

Then we can see device logs of bootloader but can't see logs of main application.

For logs, we set the jlink.exe and RTT Viewer. we can't see logs even though connecting target with swd of jlink OB of nRF52833 DK on RTT Viewer app.

For logs, after connecting RTT Viewer, I do again connect jlink.exe via jlink OB apart from RTT Viewer and then input commands like "reset" and "go".

Anyway, after doing here, I can see the logs of bootloader but we can't see logs of main application as I said before.

1. command on jlink.exe

C:\Program Files\SEGGER\JLink_V822>JLink.exe
SEGGER J-Link Commander V8.22 (Compiled Mar 19 2025 15:48:32)
DLL version V8.22, compiled Mar 19 2025 15:47:39

Connecting to J-Link via USB...O.K.
Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Jul 24 2017 17:30:12
Hardware version: V1.00
J-Link uptime (since boot): N/A (Not supported by this model)
S/N: 685079944
License(s): RDI, FlashBP, FlashDL, JFlash, GDB
VTref=3.300V


Type "connect" to establish a target connection, '?' for help
J-Link>connect
Please specify device / core. <Default>: NRF52833_XXAA
Type '?' for selection dialog
Device>
Please specify target interface:
  J) JTAG (Default)
  S) SWD
  T) cJTAG
TIF>S
Specify target interface speed [kHz]. <Default>: 4000 kHz
Speed>
Device "NRF52833_XXAA" selected.


Connecting to target via SWD
InitTarget() start
InitTarget() end - Took 8.50ms
Found SW-DP with ID 0x2BA01477
DPv0 detected
CoreSight SoC-400 or earlier
Scanning AP map to find all available APs
AP[2]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x24770011, ADDR: 0x00000000)
AP[1]: JTAG-AP (IDR: 0x02880000, ADDR: 0x01000000)
Iterating through AP map to find AHB-AP to use
AP[0]: Core found
AP[0]: AHB-AP ROM base: 0xE00FF000
CPUID register: 0x410FC241. Implementer code: 0x41 (ARM)
Found Cortex-M4 r0p1, Little endian.
FPUnit: 6 code (BP) slots and 2 literal slots
CoreSight components:
ROMTbl[0] @ E00FF000
[0][0]: E000E000 CID B105E00D PID 000BB00C SCS-M7
[0][1]: E0001000 CID B105E00D PID 003BB002 DWT
[0][2]: E0002000 CID B105E00D PID 002BB003 FPB
[0][3]: E0000000 CID B105E00D PID 003BB001 ITM
[0][4]: E0040000 CID B105900D PID 000BB9A1 TPIU
[0][5]: E0041000 CID B105900D PID 000BB925 ETM
Memory zones:
  Zone: "Default" Description: Default access mode
Cortex-M4 identified.
J-Link>r
Reset delay: 0 ms
Reset type: NORMAL (https://wiki.segger.com/J-Link_Reset_Strategies)
Reset: Halt core after reset via DEMCR.VC_CORERESET.
Reset: Reset device via AIRCR.SYSRESETREQ.
J-Link>g
Memory map 'after startup completion point' is active
J-Link> 

2. bootloader log

Please let us know how to also see device logs of main application.

Thanks,

Jaehong

Parents
  • Hello,

    The way that RTT works is by being assigned a partition in the RAM, and it just stores whatever you write to your log into the RAM starting at that address. The RTT Viewer just looks through the RAM for this keyword, and when it finds it, it will start reading the RAM from there during runtime. 

    When you have two applications running, it will just find the first one, and countinue reading from there. So the absolute simplest way to access the RTT log from the application would be to disable RTT Logging in the bootloader. If that doesn't work, you can look at the map file in your build folder, and look for the location of the application's RTT buffer, and enter this when starting your RTT viewer, either as an address, or a search range. 

    I wish the RTT Viewer would say somewhere on what address it found the RTT buffer, because then you could just set up a search range after the initial buffer, but unfortunately it doesn't. On top of that, every time you build your application, the buffer location may change, so you need to locate it again. Therefore, I suggest that you disable the RTT Logging in the bootloader, if you don't have any issues with the bootloader at the moment. 

    Best regards,

    Edvin

  • Hi,

    Our custom linker file has a different RAM address and size between DFU bootloader and main application.

    After setting RAM address and size of main app. on RTT Viewer, we checked the device logs.

    Thanks,

    Jaehong Park

Reply Children
No Data
Related