Makefile and debugging

Lab  – Makefile and debugging

 

  1. Create a simple hello application
  2. Write a Makefile to build it

  1. Change the debug level
  2. Change the compiler to arm compiler
  3. Add install target to the file and run make install to copy executable to root file system
  4. Add another file to your project with a simple add function and update the makefile
  5. Run the program on target using gdbserver

  1. Run gdb debugger on host and load the executable

  1. Connect to target and debug the code

  1. Strip the code and run it again on target

  1. Change the code to access a wrong address
  2. Run the code to get an error
  3. Create a core dump

  1. Run the gdb debugger using the core dump and examine the error
  2. Write a fault handler to catch common errors and print useful information