Debugging your code using print statements

This section deals with debugging. Errors fall into two classes, compilation errors and run-time errors. Compilation errors arise when we compile our programs, and the compiler parses each of the statements to produce executable code. Syntactic errors such as a missing semi-colon or forgetting to declare a variable before assigning it will produce a compilation error. Luckily, uVision5 highlights and checks the syntax of our programs as we type. So, many problems that would have gone undetected in the past are now brought to our attention before compilation. When errors do occur, they are printed in the output window together with details of the file and the line number where the error occurred. In addition ...

Get ARM® Cortex® M4 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.