Lab 10 Department of Computer Science and Information Engineering National Taiwan University Lab10 – Debugging II 2014/12/2 1 /16.

Slides:



Advertisements
Similar presentations
COMPUTERS: TOOLS FOR AN INFORMATION AGE Chapter 3 Operating Systems.
Advertisements

Computer System Laboratory
U-Boot and Linux Kernel Debug using CCSv5
Lab 4 Department of Computer Science and Information Engineering National Taiwan University Lab4 - Bootloader 2014/10/14/ 13 1.
1 Introduction to Programming Environment Using MetroWerks CodeWarrior and Palm Emulator.
Computer System Laboratory
Software Development and Software Loading in Embedded Systems.
Installing software on personal computer
Computer System Laboratory
Introduction Purpose Objectives Content Learning Time
COMPUTER SYSTEM LABORATORY Lab8 - Debugging II. Lab 8 Experimental Goal Learn how to debug Linux in source-level by Domingo and diagnose target boards.
COMPUTER SYSTEM LABORATORY Lab4 - Bootloader. Lab 4 Experimental Goal Learn how to build U-Boot bootloader for PXA /10/8/ 142.
1 Introduction to Tool chains. 2 Tool chain for the Sitara Family (but it is true for other ARM based devices as well) A tool chain is a collection of.
Embedded Systems Principle of Debugger. Reference Materials kl.de/avr_projects/arm_projects/#winarmhttp://
U-Boot Debug using CCSv5 In this session we will cover fundamentals necessary to use CCSv5 and a JTAG to debug a TI SDK-based U-Boot on an EVM platform.
Lab 3 Department of Computer Science and Information Engineering National Taiwan University Lab3 - Cross Tools 2014/10/7/ 20 1.
Computer System Laboratory
Tutorial 11 Installing, Updating, and Configuring Software
COMPUTER SYSTEM LABORATORY Lab10 - Sensor II. Lab 10 Experimental Goal Learn how to write programs on the PTK development board (STM32F207). 2013/11/19/
N ETWORKED & D ISTRIBUTED COMPUTING S YSTEMS L AB Programming Assignments EE323 Computer Networks.
Computer System Laboratory
CPSC203 Introduction to Computers Lab 69 By Jie Gao.
Lab 11 Department of Computer Science and Information Engineering National Taiwan University Lab11 - Porting 2014/12/9/ 26 1.
GBT Interface Card for a Linux Computer Carson Teale 1.
Lab 1 Department of Computer Science and Information Engineering National Taiwan University Lab1 - Sensor 2014/9/23/ 13 1.
Conventions Department of Computer Science and Information Engineering National Taiwan University Conventions 2014/9/16/ 3 1.
Introduction Purpose This training course covers debugging an application on an SH target in the Renesas HEW (High-performance Embedded Workshop) development.
Debugging an Application Lab. Build/Debug Process A start Load Closest Sample “debug” into MULTI editor Cut and Paste Changes into Sample Build Modified.
COMPUTER SYSTEM LABORATORY Lab6 - Root Filesystem.
Unit - VI. Linux and Real Time: Real Time Tasks Hard and Soft Real Time Tasks Linux Scheduling Latency Kernel Preemption Challenges in Kernel Preemption.
Implementation of Embedded OS Lab3 Linux Kernel Modules.
Lab 14 Department of Computer Science and Information Engineering National Taiwan University Lab14 – Camera 2014/12/30 1 /14.
Lab 13 Department of Computer Science and Information Engineering National Taiwan University Lab13 – Interrupt + Timer 2014/12/23 1 /16.
Implementation of Embedded OS Lab4 Cortex-M3 Programming.
Lab 12 Department of Computer Science and Information Engineering National Taiwan University Lab12 – Driver 2014/12/16 1 /21.
Implementation of Embedded OS Lab3 Porting μC/OS-II.
Lab 5 Department of Computer Science and Information Engineering National Taiwan University Lab5 – Bootloader + OS Kernel 2015/10/27/ 25 1.
Lab 1 Department of Computer Science and Information Engineering National Taiwan University Lab1 - Environment Setup 2015/9/15/ 30 1.
Lab 8 Department of Computer Science and Information Engineering National Taiwan University Lab8 - Root Filesystem 2015/11/10/ 22 1.
Lab 9 Department of Computer Science and Information Engineering National Taiwan University Lab9 - Debugging I 2014/11/4/ 28 1.
Implementation of Embedded OS
Lab 7 Department of Computer Science and Information Engineering National Taiwan University Lab7 – uCOS Application 2015/11/10/ 10 1.
Virtual Machines Module 2. Objectives Define virtual machine Define common terminology Identify advantages and disadvantages Determine what software is.
Lab 5 Department of Computer Science and Information Engineering National Taiwan University Lab5 - OS Kernel 2014/10/21/ 16 1.
Chap. 4 ARM Boot Loader Internals. 2 S3C2500 ARM940T Core module ARM9TDMI CoreIC.
Linux on ARM7TDMI or Nothing is as easy as it looks Helicon technologies Ltd. How to run uClinux on NXP LPC22xx.
| © 2007 LenovoLenovo Confidential Use WinDBG Tool to Analyze BSOD —— Lenovo Service Support Training.
Virtual Machine and VirtualBox
Computer System Laboratory
Implementation of Embedded OS
Lab 1: Using NIOS II processor for code execution on FPGA
PL-IV (Group B-12) Printer Server
Computer System Laboratory
Implementation of Embedded OS
Computer System Laboratory
Computer System Laboratory
PRU-ICSS Programming with CCS
Hands-On Virtualization in the Classroom
Computer System Laboratory
ECE 3567 Microcontroller Lab
Virtual Machine and VirtualBox
Software Setup & Validation
Reverse engineering through full system simulations
Computer System Laboratory
Computer System Laboratory
Virtual Machine and VirtualBox
Computer System Laboratory
Computer System Laboratory
Computer System Laboratory
Virtual Machine and VirtualBox
Presentation transcript:

Lab 10 Department of Computer Science and Information Engineering National Taiwan University Lab10 – Debugging II 2014/12/2 1 /16

Lab 10 Department of Computer Science and Information Engineering National Taiwan University  Learn how to debug Linux in source-level by Domingo. 2014/12/2 2 /16

Lab 10 Department of Computer Science and Information Engineering National Taiwan University  Host System  Windows XP  Build System  VirtualBox + Ubuntu 8.04  Target System  Creator XScale PXA270  Software  Domingo  Linux kernel  You can download all software from RSWiki CSL Course SoftwareRSWiki CSL Course Software 2014/12/2 3 /16

Lab 10 Department of Computer Science and Information Engineering National Taiwan University  Debugging is a methodical process of finding and reducing the number of bugs, or defects, in a computer program or a piece of electronic hardware, thus making it behave as expected.  In Lab2, we introduce Domingo, which is an integrated development environment developed by Microtime Computer Inc.  Domingo can be used to not only transfer binaries to RAM but also debug in source-level.  In this lab, we will introduce how to debug Linux kernel in source-level. 2014/12/2 4 /16

Lab 10 Department of Computer Science and Information Engineering National Taiwan University  We prepare a Linux kernel with some bugs for this Lab.  Step 1: download Linux source codes (linux lab10.tar.gz).linux lab10.tar.gz  Step 2: please refer to Lab5 to configure creator_pxa270_partitions[] for your filesystem.  Step 3: compile the new Linux kernel.  Step 4: convert to U-Boot bootable image.  You can set image name in mkimage to identify different kernel images.  Step 5: copy to PXA /12/2 5 /16

Lab 10 Department of Computer Science and Information Engineering National Taiwan University  Step 1: create a new project for PXA270.  Step 2: configure “OS support”.  “Config”  “OS support”  “Linux 2.6”  Step 3: configure Linux path.  “Linux 2.6”  “Linux Path Setting...”  Linux Debug Information ( vmlinux ) = the path of vmlinux  Linux dist Path = the path of linux directory  Device Driver Path = the path of device drivers  S is your network drive of samba server. 2014/12/2 6 /16

Lab 10 Department of Computer Science and Information Engineering National Taiwan University  Step 4: since the path of Linux source codes in Ubuntu is different from Windows XP, we need to configure “ELF path substitution” to replace the path.  “Debug”  “Default ELF Path Substitution...”  Path Prefix = your path of kernel compilation  Replace As = S:\ 2014/12/2 7 /16

Lab 10 Department of Computer Science and Information Engineering National Taiwan University  Step 1: connect to your PXA270 in Domingo.  Step 2: load debug module.  “Debug”  “Load Module...”  Choose vmlinux.  Step 3-1: configure the module.  ModuleFormat = Elf for ARM  Options = ELF path substitution  Download Raw Data = unchecked  Goto Main Address = 0xa ;start_kernel  Linux - Dynamic Loaded Module = checked 2014/12/2 8 /16

Lab 10 Department of Computer Science and Information Engineering National Taiwan University  Step 3-2:  Additional Modules... =  Set the path of zImage, i.e., \arch\arm\boot\zImage.  Set the start address to P;a  Step 4: execute “UART View” or putty to access the console of PXA270.  Step 5: click “Ok” to start downloading Linux. 2014/12/2 9 /16

Lab 10 Department of Computer Science and Information Engineering National Taiwan University  After downloading is complete, you will see the Linux is stopped at start_kernel () function.  Now, you can start debugging the Linux kernel. 2014/12/2 10 /16

Lab 10 Department of Computer Science and Information Engineering National Taiwan University  If you can not download the Linux image, you may refer to the following settings (TA’s):  Workgroup = MSHOME  =  = /home/lab202/CSL/10201/lab8/pxa270/  = Creator  Path of linux directory = /home/lab202/CSL/10201/lab8/pxa270/linux  Path of vmlinux = /home/lab202/CSL/10201/lab8/pxa270/linux/vmlinux  Path of Linux device drivers = /home/lab202/CSL/10201/lab8/pxa270/linux/drivers 2014/12/2 11 /16

Lab 10 Department of Computer Science and Information Engineering National Taiwan University  You can select specific functions on the menu bar for debugging.  M: images.  F: source files in the specific image M.  L: functions in the specific source file F. 2014/12/2 12 /16

Lab 10 Department of Computer Science and Information Engineering National Taiwan University  You can set breakpoints by clicking the line number.  Breakpoints can be cancelled by clicking again.  After setting breakpoints, you can continue the program by following operations. breakpoints 2014/12/2 13 /16

Lab 10 Department of Computer Science and Information Engineering National Taiwan University  You can see register values in register window.  You also can watch variables in watch list.  Please refer to Domingo tutorial for more information.  “View”  “Tutorial” 2014/12/2 14 /16

Lab 10 Department of Computer Science and Information Engineering National Taiwan University  Please use Domingo to find out why the values of memory clock and system bus clock are zero. ? 2014/12/2 15 /16

Lab 10 Department of Computer Science and Information Engineering National Taiwan University  Show how you find and correct the bug of Linux kernel we gave. 2014/12/2 16 /16