Author Topic: Kinetis CW10.1 Debugger Configuration  (Read 9212 times)

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3238
    • View Profile
    • uTasker
Kinetis CW10.1 Debugger Configuration
« on: August 13, 2011, 12:21:26 AM »
Hi All

The following is a quick guide to configuring the debugger within CW10.1:

- When the project is imported to CW10.1 there may be a question refering to a Remote System that doesn't exist in the workspace. This concerns the debugger and an answer of "yes" causes the debugger to be created/added to the workspace.

- After building the target, the code can usually be downloaded to the board using the debugger by clicking on the "bug" symbol (green beatle), but this will probably not work the first time and the message "The selection cannot be launched, and there are no recent launches" appears.

- One method of getting this working is to find the ELF file that contains the code and debugging information in the file viewer (usually on the left hand side of the IDE) (Application/uTaskerV1.4/KinetisCodeWarrior/MK60N512VMD100_INTERNAL_RAM/uTaskerV1.4.afx for example). Click on it once and then activate the context menu (right mouse click and select "Debug as" and then "Debug configurations"). Expand the option "CodeWarrior Download" to see two OSJTAG debuggers; one for internal RAM and one for internal FLASH. Click on the one for internal RAM (assuming debuging in internal RAM, which is possible as long as the code is not too large and the target for this option is being used). Make sure that its Application path is pointing to the axf file and then the "Debug" button should become active. Click on this button to start loading and debugging.

- Further work with the debugger should now also be possible by simply clicking in the "Bug" symbol.

However there may still be a debugger configuration missing. For example, the internal FLASH one may not have been created. The following details how to create this manually:

1 - The OSJTAG internal flash configuration in the CodeWarrior Download menu may be empty so the first thing that needs to be done is to set a Remote System, which is performed by clicking in the "New" button, followed by selecting "CodeWarrior Bareboard Debugging" with the "Hardware or Simulator" type.

2 - the New Connection window opens as next step where the connection can be given a name (eg. KinetisFlash). The description is optional. The system type can be selected by chosing the family and chip type in the drop-down list (eg. Kinetis | K60 | K60N512). Then the connection type can be chosen to be P&E ARM or J-Link. Depending on what is chosen, a new window with options appears, whereby it is assumed that the default settings are all suitable and "Finish" can be clicked.

3 - Apply the new configuration and start debugging. The Flash configuration will load to Flash and the code will run from there (rather than from RAM).