ON Semiconductor


ON Semiconductor (Nasdaq: ON) is a leading provider of power efficient semiconductor solutions to customers in the power supply, automotive, communications, computer, consumer, medical, wireless, mobile phone, industrial and military/ aerospace markets.

You are viewing an older revision! See the latest version

Eclipse Debugging on NCS36510

Eclipse Debugging on the ON Semiconductor NCS36510

This note will document the steps required to configure Eclipse Oxygen for editing, compiling, and debugging an mbed 5 project.

Installation, Setup, and Creating a New Project

  • Ensure that the mbed CLI package, including all of its dependencies, is installed. A complete installation package is provided here Make sure that the system PATH variable includes a reference to the mbed executable (i.e. PATH = C:\Python27\Scripts)
  • Open Eclipse and select / create a workspace. From inside Eclipse, select Help -> Install New Software. In the "Work with" dialogue, enter "GNU ARM Eclipse Plug-ins - http://gnuarmeclipse.sourceforge.net/updates". At least the PyOCD package must be selected, then click "Next" and finish the installation process. Upon completion, Eclipse will restart, and the package will be available.
  • Open up a command line window and navigate to a folder to be used as a workspace for mbed projects. Then use the mbed CLI tools to either create or import a new mbed project. An example of this is shown below:

mbed import mbed-os-example-blinky

Note: it is important that the Eclipse workspace and the project code are not in the same folder on the hard drive. If they are, it is possible that the code import will not work properly.

  • Next, return to Eclipse, and import the existing mbed project through the "File->New->Makefile Project With Existing Code" dialogue. From this dialogue, browse to the location where the new mbed project is located. Select the folder itself, and then click "Ok". The project title will automatically be updated. Flick "Finish" and the code will be imported and will appear in the Project Explorer panel. At this point, Eclipse will automatically begin to index the project.

Note: Because the Eclipse exporter in mbed has not yet been enabled, there are many many #include and #define statements that will be missing in the code. This will result in Eclipse displaying many code errors, however the mbed CLI toolchain will generate these statements prior to compile-time based on the specifications in the project's .json config files.

Configuring the New Project for Compiling and Debugging

  • By default, the project will be set to build using the Make toolchain. The NCS36510 requires the mbed CLI toolchain to compile. To change this, right click on the project in the Project Explorer panel, and click on "Properties". In the left-hand column of the properties dialogue, select "C/C++ Build". Un-check the box titled "Use default build command". In the box titled "Build command", enter "mbed".

All wikipages