This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Segger JLink tools on Raspberry Pi -

[EDIT]  The solution is posted in one of my replies.

I'd like to set up a programming and test station for the nRF52832.  Segger JLink tools work fine in Windows, but I'd like to use an inexpensive Raspberry Pi for ease of distribution to other places.  Specifically, I want to use RTT logging and use J-Flash to program nRF52832.

Segger's J-Link software provides a version for ARM hosts computers, which seems to run on the Raspberry Pi (PI 3B+, using Stretch version of Raspbian).  But I'm confused about the actual commands I need to enter.  According to a couple of previous posts, I need to have "JLinkExe" running first on one window, and then start RTT program on another?

I tried the following (shown in screen shots attached)

1)  connect

2)  specify target device.  I used the identifier in the pull down available on the Windows UI for Jlink.  "NRF52832_XXAA"

3)  defaults for the rest of the settings, just press enter.  It seems to find the nRF52832 attached to a segger j-link.  So that's good.

Then I started "JLinkRTTLogger", but as you can see from the attached screen shot, nothing is logged.  I also wanted to try the equivalent of RTTViewer, but looking at the Linux ARM software, I'm confused what that equivalent would be.  There is "JLinkRTTClient", which just shows elipses when I run it, and "JLinkSWOViewer", which seems to connect, but doesn't show any output.  I'm fairly certain that there should be RTT output when I'm doing these tests.

Overall, the LInux ARM version of J-Link utilities don't have a UI, and I'm having trouble figuring out what I'm suppose to do via command line to view RTT output. 

Parents
  • I have never used RTT on my RPi but flashing with JLinkExe is entirely possible as I have designed a custom flashing device for nRF52832s and test them using the RPi as the main controller straight from power-up. The RPi can also be set up to flash nRFs remotely both via JLinkRemoteServer (albeit this was a pain if the device is not hooked up to a router that has been set-up for port forwarding), or just using VNC to remote into the Pi and just entering the commands in manually (or via shell scripts like I do).

    Do you have to use RTT to test the devices? Have you managed to flash the nRF52 with JLinkExe?

  • Thanks for sharing your experience.  Yes, I'm able to erase and flash hex file using the CLI tools on the Raspberry Pi via this:

    ./JLinkExe

    >loadfile FILENAME.hex

    I want to use RTT because it's what's being used in other work flows for manufacturing and testing.

  • RTT logging worked on my PI 3B with driver v.6.46 and the J-link lite debugger.  

  • Edit:  Thanks Vidar.  I was able to find my issue.  The windows RTT viewer has more smarts - it always found the right channel/terminal for me and I never had to know about which RTT terminal I need to specify.  The Linux version of RTT doesn't have the smarts.  So I had to specify terminal "0" in the Linux RTT logger.

    I also had to specify the interface correctly - "SWD" was the correct input.  Which clashes with the flash utility which uses "S".

    I really wish the ARM Linux host version of J-Link tools also came with a RTT Viewer and not just an RTT Logger.  But this work at least.

    Thanks again!

Reply
  • Edit:  Thanks Vidar.  I was able to find my issue.  The windows RTT viewer has more smarts - it always found the right channel/terminal for me and I never had to know about which RTT terminal I need to specify.  The Linux version of RTT doesn't have the smarts.  So I had to specify terminal "0" in the Linux RTT logger.

    I also had to specify the interface correctly - "SWD" was the correct input.  Which clashes with the flash utility which uses "S".

    I really wish the ARM Linux host version of J-Link tools also came with a RTT Viewer and not just an RTT Logger.  But this work at least.

    Thanks again!

Children
No Data
Related