Testing, Simulation and Debugging Techniques and Tools: Lesson-1
Testing on Host Machine
2008
Chapter-14L01: "Embedded Systems - Architecture, Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc.
1. Host and Test Systems During Development Process
2008
Chapter-14L01: "Embedded Systems - Architecture, Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc.
Host and Target Test Systems During Development Process Two systems with different CPUs or microcontroller and hardware architecture. One system host, generally PC or laptop or workstation. Other system target, actual hardware for the embedded system under development
Chapter-14L01: "Embedded Systems - Architecture, Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc.
2008
Host and Target Target independent and target dependent code. Code has two parts: hardware independent code and hardware dependent code. Port and devices have fixed addresses on hardware
2008 Chapter-14L01: "Embedded Systems - Architecture, Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc. 4
Host Testing and debugging at each stage as well as at the final stage when the modules are put together. Test at initial stages at the host Host used to test hardware independent codes. Host also used to run simulator
2008 Chapter-14L01: "Embedded Systems - Architecture, Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc. 5
Target Used to test hardware independent codes. Target also used to run monitor
2008
Chapter-14L01: "Embedded Systems - Architecture, Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc.
Host and Target Test Systems During Development Process
2008
Chapter-14L01: "Embedded Systems - Architecture, Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc.
Testing Steps at Host Machine 1. Initial Tests each module or segment at initial stage itself and on host itself 2. Test data all possible combinations of data designed and taken as test data 3. Exception condition tests all possible exceptions for the test
2008 Chapter-14L01: "Embedded Systems - Architecture, Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc. 8
Testing Steps at Host Machine
2008
Chapter-14L01: "Embedded Systems - Architecture, Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc.
Testing Steps at Host Machine
4. Tests-1: hardware independent code 5. Tests-2:scaffold software, software running on host the target dependent codes and which have same start of code and port and device addresses as at the hardware. Instructions given from file or keyboard inputs. Outputsat hosts LCD display and saves at file
2008 Chapter-14L01: "Embedded Systems - Architecture, Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc. 10
Testing Steps at Host Machine 6. Test Interrupt Service routines hardware independent part sections of interrupt service routines are called, which are hardware independent and tested 7. Test Interrupt Service routines hardware dependent part
2008 Chapter-14L01: "Embedded Systems - Architecture, Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc. 11
Testing Steps at Host Machine
8. Timer tests Hardware dependent code timing functions, clock tick set, counts get, counts put, delay 9. Assert-Macro tests insert the codes in the program that check whether a condition or a parameter actually turns true or false. If it turns false the program stops. Use the assert macro at different critical places in the application program
2008 Chapter-14L01: "Embedded Systems - Architecture, Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc. 12
Summary
2008
Chapter-14L01: "Embedded Systems - Architecture, Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc.
13
We learnt System codes tested on the host system Host system has application development tools, large memory and windows or powerful GUIs.
2008
Chapter-14L01: "Embedded Systems - Architecture, Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc.
14
We learnt Each module tested at initial stage of its development as well as by integrating all modules. Steps for hardware (target) independent and dependent code software testing on host machine.
2008
Chapter-14L01: "Embedded Systems - Architecture, Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc.
15
End of Lesson-1 of chapter 14 on
Testing on Host Machine
2008
Chapter-14L01: "Embedded Systems - Architecture, Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc.
16