EECS 373 Lab 2: Software Toolchain - Question Sheet

Student names:

Student unique names:

Q: What does the "My First Assembly File" application do?




Q: Can you tell in the debugger if you are still counting, or already in the busy loop? How? Write your new main code in the Answersheet.




Q: Explain the difference between the GDB commands step and stepi. Use the GDB help command to find the difference.




Q: Disassemble the main.o file. Do you see the function call into your gpio.o file? Explain.




Q: In the left window pane, Project Explorer, open Lab2->Debug->Lab2.lst file. Does it look familiar? Explain the contents of the file.




Post-Lab Assignments

Write the initGPIO and setGPIO assembly functions in gpio.s. Use main.s as an example for modifying gpio.s. Comments were provided in the function stubs suggesting content. Reread section 5 before writing code.

Is LED 1 really permanently turned on? Verify using an oscilloscope to see if LED 1 is really turned on continuously. What is the frequency of the signal that you see? How does this related to the CPU clock frequency?




First, initalize all 8 LEDs (GPIO 24-31). Have only one LED on at a time but round-robin through all the LEDs. Add enough delay between each LED transition such that it is visible to the Human eye. Demo it.



For the truly ambitious, create a "Knight Rider" effect with all the LEDs in pure Assembly. The LEDs should fade, not just toggle, between each other.



You may work with a partner for this assignment. Provide your source code (gpio.s and main.s) for the 8 LED round-robin. Demonstrate to any instructor. Submit the instructors dated signature for these parts. Demonstrate Knight Ryder Bonus if you choose to do this.