Manage Error and Warning Messages

During compilation, embedXcode generates two kinds of messages:

  • An error message is highlighted in red and stops the compilation. It points at the line that originated the error.

Error

LED was not declared in this scope.

Examples include unknown variable, unknown function.

  • A warning message is highlighted in yellow and doesn’t stop the compilation. It points at a possible cause of error.

Warning

unusedVariable is an unused variable.

Examples include unused variable, unused function.

By default, the warning messages are switched off.

embedXcode+ allows to define the scope of the warning messages and define warning statements.

Manage Error Messages

In case of a failed compilation, the Issue navigator display messages, either warning messages or error messages.

An error message is highlighted in red and stops the compilation. It points at the line that originated the error.

Here, the board isn't connected and thus the serial port is not available.

The warning messages are explained in the next section.

Here, LED was not declared in this scope.

The Report navigator on the right side provides more details.

The Issue navigator provides a list of all the errors found during compilation.

To display the list of error messages and the corresponding lines of code,

  • Click on the icon of the middle to display the Issue navigator:

  • Click once on the message highlighted in red to display the line where the error is located.

The cursor points at LED line 89: the correct variable name is myLED. The error is just a misspelling. Note that the whole line is in black.

  • Change LED for myLED. The line is coloured back.

This feature doesn't work on the LaunchPad C2000 and on the BeagleBone.

Manage Warning Messages

A warning message is highlighted in yellow and doesn’t stop the compilation, but points at possible cause of errors.

To display the list of warning messages and the corresponding lines of code,

  • Select a target among All, Build, Make, Fast and click on Run.

  • Click on the icon of the middle to display the Issue navigator:

  • Click once on the message highlighted in yellow to display the line where the warning was generated.