Resources | developer.brewmp.com Resources | developer.brewmp.com

Developer

resources

Managing debug configurations

The Eclipse debug configuration is managed by the Eclipse Plugin. The following instructions are provided for developers who would like to modify the managed debug configuration, or create a new debug configuration.

  1. Within Eclipse, select Run > Debug Configurations.
  2. In the Debug Configurations dialog, expand the Brew MP Application node. Here you can either create a new debug configuration, or modify an existing configuration. To create a new configuration, right-click on C/C++ Application and select New. To edit an existing debug configuration, select it.

Main tab

  1. Once
    1. Within Eclipse, select Run > Debug Configurations.
    2. In the Debug Configurations dialog, expand the Brew MP Application node. Here you can either create a new debug configuration, or modify an existing configuration. To create a new configuration, right-click on C/C++ Application and select New. To edit an existing debug configuration, select it.
    you have selected or created your debug configuration, in the right pane, select the Main tab.
  2. In the Main tab of the Debug Configuration dialog, enter a name for the debug configuration in the Name field. Specify the project name in the Project field. In the C/C++ Application field, specify the ELF file for your module. The ELF file is generated as part of the device build.

Arguments tab

  1. Select the Arguments tab in the Debug Configurations dialog. This is where you will specify the working directory for your application.

    If your application directory path name does not have spaces in it, the default can be used (e.g. ${workspace_loc:capp} ) and this step can be skipped. But if it does have spaces you need to get the DOS short path name for it. If you have cygwin installed, the command 'cygpath -wsa " can be used to get the path name with out spaces. Alternatively entering a command.com shell from the directory would show the DOS short path name for it.

Debugger tab

  1. Select the Debugger tab of the Debug Configurations dialog.
  2. In the Debugger field, to debug on device, specify gdbserver Debugger from the drop-down menu. To debug on the Simulator, select Brew MP Debugger.
  3. Be sure Stop on startup at: is unchecked.
  4. In the GDB Debugger field, provide the path of the Codesourcery ARM EABI GDB.
  5. If you specify a .gdbinit command file, make sure that there is no ''target remote \\.\COMX" command in it. The remote connection is specified from the Eclipse debug configuration (See next step). Doing it a second time from .gdbinit causes GDB to kill the debugger in session that was connected first.

  6. In the Debugger Options panel of the Debugger tab, click the Connection tab.

    • For Developer mode, do the following.

      In the Type drop-down menu, select TCP. Host name or IP address should be localhost. Port number should be 60891, as shown in the following image.

    • If you are not in Developer mode, do the following.

      You need to specify the Modem Port for the device. In the Type drop-down menu, select Serial. In the Device field, enter the port.

      Notice that there is a minor difference to the port name here. If the port is COMX it is specified as \.\COMX. This is different from what was specified for a command line session. There is only one leading backslash character instead of two. If your COM port number X is less than 10 you can also specify it as 'COMX' without any backslash characters.

    The debug configuration is now ready to be used.
  7. Save the debug configuration by clicking Apply.