Revision as of 16:07, 2 February 2024 by Registered User

1. Overview

Before reading this article, it is highly recommended to read STM32CubeMonitor:Introduction and main principles of STM32CubeMonitor, to better understand the STM32CubeMonitor concepts.

JLink is a probe distributed by Segger. STM32CubeMonitor is compatible with JLink probe. We will describe here how to use JLink probe with STM32CubeMonitor.

2. JLink connection

J-Link probe have to be connected to STM32 board using the SWD connector. Jumper wires could be used. Hereafter, the mapping between JlinkProbe and CN4 (SWD) connector on Nucleo Board. Please note that in this configuration Nucleo board is still powered by ST-Link using USB cable.

For further informations, please visit: https://wiki.segger.com/Connecting_to_STM32_Nucleo_boards

Below is a photography of a JLink probe connected by wires to a Nucleo board.

3. JLink nodes

Two nodes are dedicated to JLink:

acqjlinkout.png Allow to define and/or select a Jlink probe configuration (probe name), open and close the connection and send commands to the selected probe.

acqjlinkin.png Allow to define and/or select a Jlink probe configuration (probe name), and receive data from the selected probe.


4. Import the Basic Jlink Flow

Import the following flow into the STM32CubeMonitor workspace:

[{"id":"7b9ed63e.2138f8","type":"tab","label":"Basic_Jlink_Flow","disabled":false,"info":"# Basic flow to start with STM32CubeMonitor."},{"id":"1ebbb430.dac7dc","type":"ui_chartst","z":"7b9ed63e.2138f8","group":"f9c34dde.1e2f4","name":"myChart","order":4,"width":15,"height":9,"chartType":"line","curveType":"linear","duration":"10","ymin":"","ymax":"","x":600,"y":220,"wires":[]},{"id":"d59587ff.cd1748","type":"variables","z":"7b9ed63e.2138f8","groupname":"myVariables","accesspoint":0,"execonfig":"897b911b63836df1","variablelist":[],"triggerstartmode":"manual","triggername":"SystemCoreClock","triggerthreshold":"30000","frequency":"","frequencyType":"0","snapshotheader":"","mode":"direct","lastImportedTime":1705497951818,"openStatus":true,"x":330,"y":120,"wires":[["89aa67caea52677b"],["f14d0398.f1861"]]},{"id":"fc00295e.79ada8","type":"ui_button","z":"7b9ed63e.2138f8","name":"","group":"f9c34dde.1e2f4","order":3,"width":5,"height":1,"passthru":false,"label":"Clear Graphs","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"clear","x":470,"y":320,"wires":[["1ebbb430.dac7dc"]]},{"id":"5fd51c96.2330e4","type":"ui_button","z":"7b9ed63e.2138f8","name":"","group":"f9c34dde.1e2f4","order":1,"width":5,"height":1,"passthru":false,"label":"START Acquisition","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"start","x":110,"y":80,"wires":[["d59587ff.cd1748"]]},{"id":"52eadfe3.2c8cc","type":"ui_button","z":"7b9ed63e.2138f8","name":"","group":"f9c34dde.1e2f4","order":2,"width":5,"height":1,"passthru":true,"label":"STOP Acquisition","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"stop","x":110,"y":160,"wires":[["d59587ff.cd1748"]]},{"id":"a7c3e070.5a6c","type":"processing","z":"7b9ed63e.2138f8","groupname":"myVariables","groupid":"d59587ff.cd1748","expressions":[],"statistics":[],"logmode":"no","logformat":"stcm","x":330,"y":220,"wires":[["1ebbb430.dac7dc"],[]]},{"id":"f14d0398.f1861","type":"ui_toast","z":"7b9ed63e.2138f8","position":"top right","displayTime":"3","highlight":"","sendall":true,"outputs":0,"ok":"OK","cancel":"","raw":false,"topic":"","name":"","x":630,"y":160,"wires":[]},{"id":"89aa67caea52677b","type":"acquisition jlink out","z":"7b9ed63e.2138f8","name":"ProbeJlink_out","probeconfig":"caa2ca14406125bf","x":560,"y":60,"wires":[]},{"id":"379cf07d39eef2f4","type":"acquisition jlink in","z":"7b9ed63e.2138f8","name":"ProbeJlink_in","probeconfig":"caa2ca14406125bf","x":90,"y":280,"wires":[["a7c3e070.5a6c"],[]]},{"id":"f9c34dde.1e2f4","type":"ui_group","name":"Chart","tab":"17d09b07.741a55","order":1,"disp":true,"width":15,"collapse":false},{"id":"897b911b63836df1","type":"exe-config","name":"test","exefile":"C:\\Users\\username\\STM32CubeIDE\\workspace_1.13.1\\THIRD\\Debug\\THIRD.elf","exefolder":"C:\\Users\\username\\STM32CubeIDE\\workspace_1.13.1\\THIRD\\Debug\\","exevariablelist":[{"address":"0x20000004","name":"uwTickPrio","type":5,"checked":false},{"address":"0x20000008","name":"uwTickFreq","type":2,"checked":true},{"address":"0x20000028","name":"uwTick","type":5,"checked":true},{"address":"0x20000000","name":"SystemCoreClock","type":5,"checked":true},{"address":"0x080012c0","name":"AHBPrescTable[0]","type":1,"checked":false}],"expand":false,"filename":"THIRD.elf","exeModifiedTime":1692890036290,"configLastUpdate":1705497951482},{"id":"caa2ca14406125bf","type":"probejlink","probeid":"36410082","probename":"Jlink (36410082)","mcuname":"STM32F411RE","nickname":"Jlink"},{"id":"17d09b07.741a55","type":"ui_tab","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]

Menu > Import > Clipboard and Copy/Paste the .json formatted flow in the area, click on Import. The flow is now imported into the STM32CubeMonitor workspace.

5. Basic Jlink Flow

Here you can see an example of a basic flow to perform an acquisition with a Jlink probe. Instead of using STlink acquisition nodes, JLink acquisition nodes are used.

basic jlink flow.png

The Jlink probe must be configured by selecting it from the picklist and indicating the name of the acq jlink node.

basic jlink flow nodeconfig.png

The version of the DLL used by the Jlink probe is indicated.

basic jlink flow probe config.png

Unlike the STLink, the user must specify the type of board to monitor. They make this choice by selecting the product. Once he has completed these operations, he can click on deploy and perform an acquisition, just like with an STLink.

selectproduct.png


Troubleshoot

File not found" appears in the MCU pick list when the SupportedHW.txt file is not present in the directory xxxxxxxxx. The file "SupporedHW.txt" is part of the installer Setupxxxxx.zip.