If a language is selected at the box above this line you will see page translation via google translate
Do not use google translate if there is a native translation existent of the page - try a look at the little flag at the right top of every page!
.

Segger provides a probe - J-Link - that can be used for programming and debugging. For non-commercial use Segger offers the low priced J-Link Edu probe.

Segger supports the Cortex M7 SWV interface used on OVI40 UI and offers plug-ins for MCU eclipse.

For Debug output Segger offers an two options in MCU eclipse:

  • TRACESWO output as defined by CORTEX M7. This requires a dedicated pin, currently used for M3 pushbutton switch
  • Segger Real Time Tracing (RTT) with outputs debug messages in high speed via SWV debug lines (CLK and SWData). No need for an additional line to printout debug messages (as is the case with TRACESWO).

The J-Link makes use of the Cortex-M feature, which allows accessing the memory via the debug interface while the target is running. How this works in general is described here.

The speed advantage of RTT - according to Segger data - is impressive:

RTT speed comparison, from Segger web site here

Debian SW Install

$ sudo dpkg -i nameofdebpackage.deb

Windows SW Install

ToDo

As part of the Segger J-Link SW pack the “J-Link Configurator” utility. In Windows it can be started using the Windows start menu

Segger J-Link Configurator - Firmware update tool

See here

Install Packs

For installing CMSIS packs see here

  • Install the GNU MCU Eclipse Packs
  • Download CMSIS packs from Keil, see
  • Install local cop of STM32F7 and STM32H7
  • Describe Eclipse seetings (MCU, CMSIS, probe settings, …) to use J-link probe on Eclipse with uHSDR

Segger Real Time Terminal RTT

  • See here
  • See AN08005 (although this is for Cortex-A / Cortex-R and not the Cortex-M used by OVI40 it still gives some insights)

- is it really 100 times faster than SWO print and 10.000 times fasster than semi-hosting? Segger says here that Cortex-M supports background memory access and that RTT will have no impact on Cortex-M execution speed

RTT target code

The RTT target code is shipped as part of the J-Link Software and Documentation Pack which can be downloaded here. The RTT sources can be found in the J-Link software package under: Samples/RTT

Calling SEGGER_RTT print from within interrupts / make it re-entrant

During RTT output the functions SEGGER_RTT_LOCK() and SEGGER_RTT_UNLOCK() are called by default in RTT, but the function bodies of those functions are empty and need to be implemented according to MCU used and use case.

Please implement

Segger provides a “STM32 unlock” utility as part of the standard J-Link SW pack. The tool can be started in Windows using the “start” menue and resets all values to factory default:

Segger J-Link STM32 unlock utility

Note: The unlock utility resets the brown out reset (BOR) to “level 0”, equalling about 1.7 Volt.

Further reading:

  • Check Option Byte support on J-Link, see here and here for a starting point.
  • See here and here
  • See 3.12.2 J-Link STM32 Unlock (Command line tool) in J-Link User Guide
  • J-Link adapter seems to support option byte programming via J-link utility and/or J-Flash utility. This is indicated in previous versions of the J-Link or J-Flash user guides, but not in the current ones. See for example section 7.5.1.2 here
    • ToDo: Verify and try out

As part of the Segger J-Link SW pack the flash utility “J-Link lite” is provided. Start J-Flash using Windows “start” button. Note: J-Flash does not support .dfu files. Use the UHSDR .bin files. Load bootloader at address 0x08000000 and load firmware at 0x08010000.

Segger J-Flash Lite tool
  • Certain STM32 development boards contain an ST-Link probe.
  • For experiments with J-Link (not related to OVI40, but in order to get to know J-Link HW & SW) the on-board ST-Link board of those boars can be converted to J-Link, see here.
  • Compatible STM32 that can be re-flashed are listed here.

ToDo

Further Reading

You could leave a comment if you were logged in.