Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| en:uhsdr_dev:segger_j_link [18.02.2018 15:29] – [Install J-Link in GNU MCU Eclipse] df9ts | en:uhsdr_dev:segger_j_link [27.02.2018 08:46] (current) – df9ts_user | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | Segger | + | ==== Segger | 
| + | Segger | ||
| Segger supports the Cortex M7 SWV interface used on OVI40 UI and offers plug-ins for MCU eclipse. | Segger supports the Cortex M7 SWV interface used on OVI40 UI and offers plug-ins for MCU eclipse. | ||
| - | For Debug output Segger offers two options in MCU eclipse: | + | For Debug output Segger offers | 
| * TRACESWO output as defined by CORTEX M7. This requires a dedicated pin, currently used for M3 pushbutton switch | * 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 | + | * [[https:// | 
| + | |||
| + | 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 [[https:// | ||
| The speed advantage of RTT - according to Segger data - is impressive: | The speed advantage of RTT - according to Segger data - is impressive: | ||
| Line 13: | Line 18: | ||
| ==== Install J-Link Software ==== | ==== Install J-Link Software ==== | ||
| + | |||
| === Debian SW Install === | === Debian SW Install === | ||
| + | |||
| * Download .deb J-Link packages from [[http:// | * Download .deb J-Link packages from [[http:// | ||
| - | * Download J-link .deb file, open terminal and go to download folder with terminal< | + | * Download J-link .deb file, open terminal and go to download folder with terminal | 
| + | |||
| + | < | ||
| + | $ sudo dpkg -i nameofdebpackage.deb | ||
| + | </ | ||
| === Windows SW Install === | === Windows SW Install === | ||
| + | |||
| ToDo | ToDo | ||
| + | |||
| + | ==== Segger J-Link adapter Firmware update ==== | ||
| + | |||
| + | As part of the Segger J-Link SW pack the " | ||
| + | |||
| + | [{{: | ||
| ==== Install & Configure J-Link in GNU MCU Eclipse ==== | ==== Install & Configure J-Link in GNU MCU Eclipse ==== | ||
| Line 24: | Line 42: | ||
| See [[https:// | See [[https:// | ||
| - | ==== Install Packs ==== | + | === Install Packs === | 
| For installing CMSIS packs see [[https:// | For installing CMSIS packs see [[https:// | ||
| - |  | + | |
| - | * Download CMSIS packs from Keil, see | + |  | 
| + | * Download CMSIS packs from Keil, see | ||
| * Install local cop of STM32F7 and STM32H7 | * Install local cop of STM32F7 and STM32H7 | ||
| - | ==== J-Link and Eclipse ==== | + | === J-Link and Eclipse === | 
| - | * Describe Eclipse seetings (MCU, CMSIS, probe settings, | + | |
| + | * Describe Eclipse seetings (MCU, CMSIS, probe settings, | ||
| ==== Segger Real Time Terminal RTT ==== | ==== Segger Real Time Terminal RTT ==== | ||
| + | |||
| * See [[https:// | * See [[https:// | ||
| - | * [[https:// | + |  | 
| - | + |  | |
| + | - is it really 100 times faster than SWO print and 10.000 times fasster than semi-hosting? | ||
| + | |||
| + | == RTT target code == | ||
| + | |||
| + | The RTT target code is shipped as part of the J-Link Software and Documentation Pack which can be downloaded [[https:// | ||
| + | |||
| + | === 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_RTT_LOCK() | ||
| + | * SEGGER_RTT_UNLOCK() | ||
| + | * .. and disable interrupts and threads which might use RTT in SEGGER_RTT_LOCK() and enable them again in SEGGER_RTT_UNLOCK(). | ||
| + | * See [https:// | ||
| ==== J-Link support for Option bytes and Lock / Unlock ==== | ==== J-Link support for Option bytes and Lock / Unlock ==== | ||
| + | |||
| + | Segger provides a "STM32 unlock" | ||
| + | |||
| + | [{{: | ||
| + | |||
| + | **Note: | ||
| + | |||
| + | Further reading: | ||
| + | |||
| * Check Option Byte support on J-Link, see [[https:// | * Check Option Byte support on J-Link, see [[https:// | ||
| * See [[https:// | * See [[https:// | ||
| - | * See 3.12.2 J-Link STM32 Unlock (Command line tool) in {{ : | + | * See 3.12.2 J-Link STM32 Unlock (Command line tool) in {{: | 
| - | * 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 [[http:// | + |  | 
| - | * ToDo: Verify and try out | + | * ToDo: Verify and try out | 
| + | |||
| + | ==== Flashing MCU with Segger J-Link ==== | ||
| + | |||
| + | As part of the Segger J-Link SW pack the flash utility " | ||
| + | |||
| + | [{{: | ||
| + | |||
| + | ==== Get to know J-Link: Converting on-board ST-Link On-Board into J-Link On-Board ==== | ||
| + | * 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 [[https:// | ||
| + | * Compatible STM32 that can be re-flashed are listed [[https:// | ||
| ==== ToDo ==== | ==== ToDo ==== | ||
| - |  | + | |
| + |  | ||
| ==== Further Reading ==== | ==== Further Reading ==== | ||
| - | * {{ : | ||
| - | * {{ : | ||
| + | * {{: | ||
| + | * {{: | ||