The purpose of this lab is to introduce the Arm Cortex-M processor, the one used in the TI MSP432 micro-controller. For this lab, you're going to need just the MSP432 Launchpad. And in this particular portion of the lab, you will learn some debugging techniques. Now let's get started. Now I've written the solution to lab three here, and the solution here exists in the convert.asm file. And I'm just going to debug or test it, OK? So the first step here is to build, which is to compile and link the device. I have my MSP432 plugged in, and so when I hit the de-bug, it will erase the flash, download the object code and launch the debugger. Now the trick of debugging is two steps. The first is control. In other words, can I make my software execute where and when I want, OK? And one of the tools here is the step, and this is a single step here in assembly language. That is a tool to control what executes. The second phase is observability. Now it's assembly language, so in this particular case, I'm interested in the registers. These are the registers used by the program, all right? So if I step a single line, it executes a single line. Now this line 63 is going to load up into R0, a test case. So I'm going to pass into the function the number 2,000. Now another debugging tool is Step Over. Now what Step Over will do is execute the entire function and return me back. So you notice the input parameter is 2,000. And if I execute the whole function, I see my output parameter is 800. Now the rest of this test program is to run a number of 16 cases through here and see if it gets them all right. So I'm just going to hit the Go button here, and that will run all 16 cases, and then I'll do a stop. And now it turns out R4 is the number I got correct. I got all 16 correct. And R5 and R6 represent the number of errors I had, and I did not have any errors in this example. So again, you're done in lab 3 when you get a 16 here in R4 and a 00. Now if I wanted to quit the debugger, I would hit the Terminate button which would bring me back to the editor version. In this lab you learned a little bit about the Arm Cortex-M, and some of the debugging techniques we can use in Code Composer Studio. The understanding of how the processor works is essential for the design of embedded systems. Have fun.