Difference between revisions of "Keil MDK-ARM"

From SEGGER Wiki
Jump to: navigation, search
m (Erik moved page Keil MDK to Keil MDK-ARM)
(Using J-Link Flashloader)
Line 32: Line 32:
 
*Click Settings
 
*Click Settings
 
*Check Verify Code Download and Download to Flash as shown in the screenshot below<br>[[File:IDE-Integr-Keil-Disable_FlashLoader_03.png]]
 
*Check Verify Code Download and Download to Flash as shown in the screenshot below<br>[[File:IDE-Integr-Keil-Disable_FlashLoader_03.png]]
  +
  +
'''Please note that flash download through the "''Download''" (F8) is not supported for J-Link right now.'''
  +
'''Support may be added in future versions of Keil MDK.'''
   
 
== Using J-Link Script Files ==
 
== Using J-Link Script Files ==

Revision as of 16:56, 22 January 2018

Keil MDK is a visual Studio style, commercial toolchain including a non-GCC compiler. We recommend to always install the latest J-Link software and documentation pack to make sure that Keil MDK uses the latest J-Link DLL.

Using J-Link with an existing project

  • Open the project to configure
  • Select Project --> Options for Target ... from the main menu
  • Click the Device tab and select the proper device
    IDE-Integr-Keil-Options-Device.png

  • Click on the Debug tab and make sure that Cortex-M/R J-LINK / J-Trace is selected
    IDE-Integr-Keil-Options-Debug.png

  • In order to modify J-Link specific settings click the Settings button in the debug menu and a new dialog will show up:
    IDE-Integr-Keil-Driver-Setup.gif

  • Now the project is ready to be debugged with J-Link / J-Trace.
    IDE-Integr-Keil-Driver-Debug-Session.png

Using J-Link Flashloader

First, choose the right device in the project settings if not already done:

  • Click Project | Options for Target from the main menu
  • Switch to the Device tab
  • Select the appropriate device, for example STM32F207IG
    IDE-Integr-Keil-Disable FlashLoader 00.png

Secondly, enable SEGGER flash loader:

  • Click Project | Options for Target from the main menu
  • Switch to the Utilities tab
  • Check Use Target Driver for Flash Programming
  • Select J-LINK / J-Trace Cortex in order to use the J-Link built-in flashloader
    IDE-Integr-Keil-Disable FlashLoader 01.png

Thirdly, configure flash loader:

  • Click Project | Options for Target from the main menu
  • Switch to the Debug tab
  • Select J-LINK / J-Trace Cortex
    IDE-Integr-Keil-Disable FlashLoader 02.png
  • Click Settings
  • Check Verify Code Download and Download to Flash as shown in the screenshot below
    IDE-Integr-Keil-Disable FlashLoader 03.png
Please note that flash download through the "Download" (F8) is not supported for J-Link right now.
Support may be added in future versions of Keil MDK.

Using J-Link Script Files

Keil MDK-ARM does not provide any native support for J-Link script files so usage of them cannot be configured from within the GUI of the IDE itself. Anyhow, it is possible to use a J-Link script file by making use of the auto-search feature of the DLL:

  • Navigate to the folder where the uVision project (*.uvproj, *.uvprojx) is located that shall use the script file.
    JLinkScriptFile Use MDK-ARM 0.png
  • Copy the J-Link script file to there
  • Rename the J-Link script to JLinkSettings.JLinkScript
    JLinkScriptFile Use MDK-ARM 1.png

The JLinkSettings.ini is a settings file created by the J-Link DLL on debug session start. If no script file is explicitly passed to the DLL, it will search in the directory of the JLinkSettings.ini for a script file named like the settings file only with a different file extension.