In this example we show how to create a new project using one of the built-in Carbide templates, how to build it into an executable, and how to launch the debugger to verify program accuracy. The steps to do this include:
NOTE You can only debug compiled programs. Use the Build Project command to compile project sources into a binary file if you do not already have an executable in the project. A symbolics (.sym) file is also required for debugging on a target device. Ensure that a .sym file has been created. If you are importing an existing application, you may have to rebuild the application and create a related .sym file. Make sure a .sym file has been created in the output directory.
For this example you should choose the HelloWorld project created in Step 1 of this tutorial.
Open the \src\HelloWorldAppUi.cpp file and set a breakpoint in the HandleCommandL routine on Line 103.
To run the project on the chosen target and start a debug session use one of the following actions. Clicking Debug is the most common choice as it enables you to assume control of the executable should you encounter a problem.
The emulator is launched and the Debug perspective appears to manage the debug session.
Which returns control to the Debug perspective in Carbide. Use the various views to examine the program as it runs. Examine variables, set more breakpoints, etc.
The HelloWorld program stops, the emulator exits, and control returns to Carbide.
That's it. Congratulations on creating, building, and debugging a Carbide project.