debugging 2013- klaus kolle

97
Status in Teaching Debugging Klaus Kolle ([email protected]) Introducton EDE Background Profile of the EDE engineer Debugging in the Study First Year Second Year Third Year Summary Status in Teaching Debugging Klaus Kolle ([email protected]) Aarhus University School of Engineering ASE 23 October 2013 Status in Teaching Debugging Klaus Kolle ([email protected]) 1

Upload: mediehuset-ingenioren-live

Post on 06-May-2015

172 views

Category:

Technology


0 download

DESCRIPTION

Debugging- for rigtige programmører

TRANSCRIPT

Page 1: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Status in Teaching Debugging

Klaus Kolle([email protected])

Aarhus UniversitySchool of Engineering

ASE

23 October 2013

Status in Teaching Debugging Klaus Kolle ([email protected]) 1

Page 2: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Presentation Outline

1 IntroductonEDE BackgroundProfile of the EDE engineer

2 Debugging in the StudyFirst YearSecond YearThird Year

Status in Teaching Debugging Klaus Kolle ([email protected]) 2

Page 3: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Presentation Outline

1 IntroductonEDE BackgroundProfile of the EDE engineer

2 Debugging in the StudyFirst YearSecond YearThird Year

Status in Teaching Debugging Klaus Kolle ([email protected]) 3

Page 4: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

What is the EDE Study Programme?

• 25 years ago, Vestjysk Teknikum was founded inHerning with E-ingeniør as the first engineeringeducation in the area

• After going through several mergers, EDE - ElectronicDesign Engineer - is now a part of Aarhus UniversitySchool of Engineering

• I’ve been teaching at EDE since 1999; first as afreelancer and since 2006 in a tenure position

Status in Teaching Debugging Klaus Kolle ([email protected]) 4

Page 5: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

What is the EDE Study Programme?

• 25 years ago, Vestjysk Teknikum was founded inHerning with E-ingeniør as the first engineeringeducation in the area

• After going through several mergers, EDE - ElectronicDesign Engineer - is now a part of Aarhus UniversitySchool of Engineering

• I’ve been teaching at EDE since 1999; first as afreelancer and since 2006 in a tenure position

Status in Teaching Debugging Klaus Kolle ([email protected]) 4

Page 6: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

What is the EDE Study Programme?

• 25 years ago, Vestjysk Teknikum was founded inHerning with E-ingeniør as the first engineeringeducation in the area

• After going through several mergers, EDE - ElectronicDesign Engineer - is now a part of Aarhus UniversitySchool of Engineering

• I’ve been teaching at EDE since 1999; first as afreelancer and since 2006 in a tenure position

Status in Teaching Debugging Klaus Kolle ([email protected]) 4

Page 7: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Presentation Outline

1 IntroductonEDE BackgroundProfile of the EDE engineer

2 Debugging in the StudyFirst YearSecond YearThird Year

Status in Teaching Debugging Klaus Kolle ([email protected]) 5

Page 8: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Content of the Study Programme

• Focus is on embedded systems

• The student will learn to design both analogue anddigital electronics as well as the software necessary forthe device

• The student will learn the basic theories and apply themin projects during the whole study

• First year is mainly focused on teaching the basicmathematics, physics, electronics and software

• Second year is building on the skills learnt in first yearand extending those with more software, digital andanalogue electronics, interaction design, web technologyand control systems theory

• Third year (+ half a year) comprises the electivecourses and the company placement. The 7th semesterconcludes with the final project

Status in Teaching Debugging Klaus Kolle ([email protected]) 6

Page 9: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Content of the Study Programme

• Focus is on embedded systems

• The student will learn to design both analogue anddigital electronics as well as the software necessary forthe device

• The student will learn the basic theories and apply themin projects during the whole study

• First year is mainly focused on teaching the basicmathematics, physics, electronics and software

• Second year is building on the skills learnt in first yearand extending those with more software, digital andanalogue electronics, interaction design, web technologyand control systems theory

• Third year (+ half a year) comprises the electivecourses and the company placement. The 7th semesterconcludes with the final project

Status in Teaching Debugging Klaus Kolle ([email protected]) 6

Page 10: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Content of the Study Programme

• Focus is on embedded systems

• The student will learn to design both analogue anddigital electronics as well as the software necessary forthe device

• The student will learn the basic theories and apply themin projects during the whole study

• First year is mainly focused on teaching the basicmathematics, physics, electronics and software

• Second year is building on the skills learnt in first yearand extending those with more software, digital andanalogue electronics, interaction design, web technologyand control systems theory

• Third year (+ half a year) comprises the electivecourses and the company placement. The 7th semesterconcludes with the final project

Status in Teaching Debugging Klaus Kolle ([email protected]) 6

Page 11: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Content of the Study Programme

• Focus is on embedded systems

• The student will learn to design both analogue anddigital electronics as well as the software necessary forthe device

• The student will learn the basic theories and apply themin projects during the whole study

• First year is mainly focused on teaching the basicmathematics, physics, electronics and software

• Second year is building on the skills learnt in first yearand extending those with more software, digital andanalogue electronics, interaction design, web technologyand control systems theory

• Third year (+ half a year) comprises the electivecourses and the company placement. The 7th semesterconcludes with the final project

Status in Teaching Debugging Klaus Kolle ([email protected]) 6

Page 12: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Content of the Study Programme

• Focus is on embedded systems

• The student will learn to design both analogue anddigital electronics as well as the software necessary forthe device

• The student will learn the basic theories and apply themin projects during the whole study

• First year is mainly focused on teaching the basicmathematics, physics, electronics and software

• Second year is building on the skills learnt in first yearand extending those with more software, digital andanalogue electronics, interaction design, web technologyand control systems theory

• Third year (+ half a year) comprises the electivecourses and the company placement. The 7th semesterconcludes with the final project

Status in Teaching Debugging Klaus Kolle ([email protected]) 6

Page 13: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Content of the Study Programme

• Focus is on embedded systems

• The student will learn to design both analogue anddigital electronics as well as the software necessary forthe device

• The student will learn the basic theories and apply themin projects during the whole study

• First year is mainly focused on teaching the basicmathematics, physics, electronics and software

• Second year is building on the skills learnt in first yearand extending those with more software, digital andanalogue electronics, interaction design, web technologyand control systems theory

• Third year (+ half a year) comprises the electivecourses and the company placement. The 7th semesterconcludes with the final project

Status in Teaching Debugging Klaus Kolle ([email protected]) 6

Page 14: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Projects

• In the first two years, there is a project each semester

• The theory acquired should be applied in these projects,i.e. through projects the student gains hands-onexperience with the theory

• The fifth semester project, third year, is always carriedout in cooperation with an industrial partner

• Placements (6th semester) are always in a company -often the same company as the one the studentscooperated with on the 5th semester project

• The final project is always done in cooperation with acompany - often also the company where the studentdid his/her placement

Status in Teaching Debugging Klaus Kolle ([email protected]) 7

Page 15: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Projects

• In the first two years, there is a project each semester

• The theory acquired should be applied in these projects,i.e. through projects the student gains hands-onexperience with the theory

• The fifth semester project, third year, is always carriedout in cooperation with an industrial partner

• Placements (6th semester) are always in a company -often the same company as the one the studentscooperated with on the 5th semester project

• The final project is always done in cooperation with acompany - often also the company where the studentdid his/her placement

Status in Teaching Debugging Klaus Kolle ([email protected]) 7

Page 16: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Projects

• In the first two years, there is a project each semester

• The theory acquired should be applied in these projects,i.e. through projects the student gains hands-onexperience with the theory

• The fifth semester project, third year, is always carriedout in cooperation with an industrial partner

• Placements (6th semester) are always in a company -often the same company as the one the studentscooperated with on the 5th semester project

• The final project is always done in cooperation with acompany - often also the company where the studentdid his/her placement

Status in Teaching Debugging Klaus Kolle ([email protected]) 7

Page 17: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Projects

• In the first two years, there is a project each semester

• The theory acquired should be applied in these projects,i.e. through projects the student gains hands-onexperience with the theory

• The fifth semester project, third year, is always carriedout in cooperation with an industrial partner

• Placements (6th semester) are always in a company -often the same company as the one the studentscooperated with on the 5th semester project

• The final project is always done in cooperation with acompany - often also the company where the studentdid his/her placement

Status in Teaching Debugging Klaus Kolle ([email protected]) 7

Page 18: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Projects

• In the first two years, there is a project each semester

• The theory acquired should be applied in these projects,i.e. through projects the student gains hands-onexperience with the theory

• The fifth semester project, third year, is always carriedout in cooperation with an industrial partner

• Placements (6th semester) are always in a company -often the same company as the one the studentscooperated with on the 5th semester project

• The final project is always done in cooperation with acompany - often also the company where the studentdid his/her placement

Status in Teaching Debugging Klaus Kolle ([email protected]) 7

Page 19: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

International Study Programme

• EDE is an international study programme taught inEnglish

• We have up to 30% students from outside of Denmark

• The foreign students mainly come from EU countriesbut Asia, Africa and North America are also or havebeen represented

• This gives the students a multi-cultural class and astudy environment which will both ’soften’ and ’harden’them before entering the job market

Status in Teaching Debugging Klaus Kolle ([email protected]) 8

Page 20: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

International Study Programme

• EDE is an international study programme taught inEnglish

• We have up to 30% students from outside of Denmark

• The foreign students mainly come from EU countriesbut Asia, Africa and North America are also or havebeen represented

• This gives the students a multi-cultural class and astudy environment which will both ’soften’ and ’harden’them before entering the job market

Status in Teaching Debugging Klaus Kolle ([email protected]) 8

Page 21: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

International Study Programme

• EDE is an international study programme taught inEnglish

• We have up to 30% students from outside of Denmark

• The foreign students mainly come from EU countriesbut Asia, Africa and North America are also or havebeen represented

• This gives the students a multi-cultural class and astudy environment which will both ’soften’ and ’harden’them before entering the job market

Status in Teaching Debugging Klaus Kolle ([email protected]) 8

Page 22: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

International Study Programme

• EDE is an international study programme taught inEnglish

• We have up to 30% students from outside of Denmark

• The foreign students mainly come from EU countriesbut Asia, Africa and North America are also or havebeen represented

• This gives the students a multi-cultural class and astudy environment which will both ’soften’ and ’harden’them before entering the job market

Status in Teaching Debugging Klaus Kolle ([email protected]) 8

Page 23: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Presentation Outline

1 IntroductonEDE BackgroundProfile of the EDE engineer

2 Debugging in the StudyFirst YearSecond YearThird Year

Status in Teaching Debugging Klaus Kolle ([email protected]) 9

Page 24: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Debugging in the First Year of Study

• In first semester, when introduced to the Cprogramming language, debugging is introduced

• For several reasons Eclipse is the chosen platform towork on, but one is that it installs on all majoroperating systems

• The students learn to set break points and inspectvariables as the way to getting their very smallprograms to work as required

• If a situation arises, other aspect of debugging may betaught, e.g. conditional breakpoints may be convenientto know

Status in Teaching Debugging Klaus Kolle ([email protected]) 10

Page 25: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Debugging in the First Year of Study

• In first semester, when introduced to the Cprogramming language, debugging is introduced

• For several reasons Eclipse is the chosen platform towork on, but one is that it installs on all majoroperating systems

• The students learn to set break points and inspectvariables as the way to getting their very smallprograms to work as required

• If a situation arises, other aspect of debugging may betaught, e.g. conditional breakpoints may be convenientto know

Status in Teaching Debugging Klaus Kolle ([email protected]) 10

Page 26: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Debugging in the First Year of Study

• In first semester, when introduced to the Cprogramming language, debugging is introduced

• For several reasons Eclipse is the chosen platform towork on, but one is that it installs on all majoroperating systems

• The students learn to set break points and inspectvariables as the way to getting their very smallprograms to work as required

• If a situation arises, other aspect of debugging may betaught, e.g. conditional breakpoints may be convenientto know

Status in Teaching Debugging Klaus Kolle ([email protected]) 10

Page 27: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Debugging in the First Year of Study

• In first semester, when introduced to the Cprogramming language, debugging is introduced

• For several reasons Eclipse is the chosen platform towork on, but one is that it installs on all majoroperating systems

• The students learn to set break points and inspectvariables as the way to getting their very smallprograms to work as required

• If a situation arises, other aspect of debugging may betaught, e.g. conditional breakpoints may be convenientto know

Status in Teaching Debugging Klaus Kolle ([email protected]) 10

Page 28: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

First Year on Hardware

• Currently we use the Mbed platform for our projects inthe first year projects - blinking LEDs and printf may bea way to debug the robot over the serial line

• The mBed is a small ”arduino-like” platform with anNXP cortex M3 device used through a cloud compilerwith a huge repository of easy-to-use examples andsource code availible

• This allows students to become familiar with embeddedprogramming without having to worry about devicedrivers, makefiles and other complex issues

Status in Teaching Debugging Klaus Kolle ([email protected]) 11

Page 29: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

First Year on Hardware

• Currently we use the Mbed platform for our projects inthe first year projects - blinking LEDs and printf may bea way to debug the robot over the serial line

• The mBed is a small ”arduino-like” platform with anNXP cortex M3 device used through a cloud compilerwith a huge repository of easy-to-use examples andsource code availible

• This allows students to become familiar with embeddedprogramming without having to worry about devicedrivers, makefiles and other complex issues

Status in Teaching Debugging Klaus Kolle ([email protected]) 11

Page 30: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

First Year on Hardware

• Currently we use the Mbed platform for our projects inthe first year projects - blinking LEDs and printf may bea way to debug the robot over the serial line

• The mBed is a small ”arduino-like” platform with anNXP cortex M3 device used through a cloud compilerwith a huge repository of easy-to-use examples andsource code availible

• This allows students to become familiar with embeddedprogramming without having to worry about devicedrivers, makefiles and other complex issues

Status in Teaching Debugging Klaus Kolle ([email protected]) 11

Page 31: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Presentation Outline

1 IntroductonEDE BackgroundProfile of the EDE engineer

2 Debugging in the StudyFirst YearSecond YearThird Year

Status in Teaching Debugging Klaus Kolle ([email protected]) 12

Page 32: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Second Year Project

• In second year focus is on Systems Engineering, i.e.specification and development of a complete embeddedsystem

• This includes learning to work using a method, howeverthis is out of scope of today’s talk

• Last year’s and this year’s project work is our Zenith 33electric car which participated and will be participatingin the Shell EcoMarathon Race in Rotterdam in May

• last year, we ended up fifth out of approximately thirtycars

• this was a very fine result knowing that the car wasbuilt in a hurry and literally ”thrown” together inRotterdam just before the race

Status in Teaching Debugging Klaus Kolle ([email protected]) 13

Page 33: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Second Year Project

• In second year focus is on Systems Engineering, i.e.specification and development of a complete embeddedsystem

• This includes learning to work using a method, howeverthis is out of scope of today’s talk

• Last year’s and this year’s project work is our Zenith 33electric car which participated and will be participatingin the Shell EcoMarathon Race in Rotterdam in May

• last year, we ended up fifth out of approximately thirtycars

• this was a very fine result knowing that the car wasbuilt in a hurry and literally ”thrown” together inRotterdam just before the race

Status in Teaching Debugging Klaus Kolle ([email protected]) 13

Page 34: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Second Year Project

• In second year focus is on Systems Engineering, i.e.specification and development of a complete embeddedsystem

• This includes learning to work using a method, howeverthis is out of scope of today’s talk

• Last year’s and this year’s project work is our Zenith 33electric car which participated and will be participatingin the Shell EcoMarathon Race in Rotterdam in May

• last year, we ended up fifth out of approximately thirtycars

• this was a very fine result knowing that the car wasbuilt in a hurry and literally ”thrown” together inRotterdam just before the race

Status in Teaching Debugging Klaus Kolle ([email protected]) 13

Page 35: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Second Year Project

• In second year focus is on Systems Engineering, i.e.specification and development of a complete embeddedsystem

• This includes learning to work using a method, howeverthis is out of scope of today’s talk

• Last year’s and this year’s project work is our Zenith 33electric car which participated and will be participatingin the Shell EcoMarathon Race in Rotterdam in May

• last year, we ended up fifth out of approximately thirtycars

• this was a very fine result knowing that the car wasbuilt in a hurry and literally ”thrown” together inRotterdam just before the race

Status in Teaching Debugging Klaus Kolle ([email protected]) 13

Page 36: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Second Year Project

• In second year focus is on Systems Engineering, i.e.specification and development of a complete embeddedsystem

• This includes learning to work using a method, howeverthis is out of scope of today’s talk

• Last year’s and this year’s project work is our Zenith 33electric car which participated and will be participatingin the Shell EcoMarathon Race in Rotterdam in May

• last year, we ended up fifth out of approximately thirtycars

• this was a very fine result knowing that the car wasbuilt in a hurry and literally ”thrown” together inRotterdam just before the race

Status in Teaching Debugging Klaus Kolle ([email protected]) 13

Page 37: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Status in Teaching Debugging Klaus Kolle ([email protected]) 14

Page 38: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Status in Teaching Debugging Klaus Kolle ([email protected]) 14

Page 39: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Subcontractors• The students are divided into sub-teams, in which each

team must supply parts for the complete control systemof the car

• This will train the students in cooperation, negotiationand other teamwork disciplines

• Debugging is also part of getting the interoperationbetween stand-alone devices up and running

• Debugging or inspection of network packages usingWireshark is often introduced as a tool to debugsolutions that communicates over TCP/IP

• The students are introduced to a ”full” embeddedplatform with a (legacy) ARM7 (NXP LPC2478) devicecapable of running either ”bare metal” (OS-less)applications, or has the ability to boot a uClinux(MMU-less). In addition the students will becomefamiliar with writing Linux device drivers, andembedded applications

• Along with this platform, the student have to compileand become familiar with the gcc binutils for the ARMplatform

Status in Teaching Debugging Klaus Kolle ([email protected]) 15

Page 40: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Subcontractors• The students are divided into sub-teams, in which each

team must supply parts for the complete control systemof the car

• This will train the students in cooperation, negotiationand other teamwork disciplines

• Debugging is also part of getting the interoperationbetween stand-alone devices up and running

• Debugging or inspection of network packages usingWireshark is often introduced as a tool to debugsolutions that communicates over TCP/IP

• The students are introduced to a ”full” embeddedplatform with a (legacy) ARM7 (NXP LPC2478) devicecapable of running either ”bare metal” (OS-less)applications, or has the ability to boot a uClinux(MMU-less). In addition the students will becomefamiliar with writing Linux device drivers, andembedded applications

• Along with this platform, the student have to compileand become familiar with the gcc binutils for the ARMplatform

Status in Teaching Debugging Klaus Kolle ([email protected]) 15

Page 41: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Subcontractors• The students are divided into sub-teams, in which each

team must supply parts for the complete control systemof the car

• This will train the students in cooperation, negotiationand other teamwork disciplines

• Debugging is also part of getting the interoperationbetween stand-alone devices up and running

• Debugging or inspection of network packages usingWireshark is often introduced as a tool to debugsolutions that communicates over TCP/IP

• The students are introduced to a ”full” embeddedplatform with a (legacy) ARM7 (NXP LPC2478) devicecapable of running either ”bare metal” (OS-less)applications, or has the ability to boot a uClinux(MMU-less). In addition the students will becomefamiliar with writing Linux device drivers, andembedded applications

• Along with this platform, the student have to compileand become familiar with the gcc binutils for the ARMplatform

Status in Teaching Debugging Klaus Kolle ([email protected]) 15

Page 42: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Subcontractors• The students are divided into sub-teams, in which each

team must supply parts for the complete control systemof the car

• This will train the students in cooperation, negotiationand other teamwork disciplines

• Debugging is also part of getting the interoperationbetween stand-alone devices up and running

• Debugging or inspection of network packages usingWireshark is often introduced as a tool to debugsolutions that communicates over TCP/IP

• The students are introduced to a ”full” embeddedplatform with a (legacy) ARM7 (NXP LPC2478) devicecapable of running either ”bare metal” (OS-less)applications, or has the ability to boot a uClinux(MMU-less). In addition the students will becomefamiliar with writing Linux device drivers, andembedded applications

• Along with this platform, the student have to compileand become familiar with the gcc binutils for the ARMplatform

Status in Teaching Debugging Klaus Kolle ([email protected]) 15

Page 43: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Subcontractors• The students are divided into sub-teams, in which each

team must supply parts for the complete control systemof the car

• This will train the students in cooperation, negotiationand other teamwork disciplines

• Debugging is also part of getting the interoperationbetween stand-alone devices up and running

• Debugging or inspection of network packages usingWireshark is often introduced as a tool to debugsolutions that communicates over TCP/IP

• The students are introduced to a ”full” embeddedplatform with a (legacy) ARM7 (NXP LPC2478) devicecapable of running either ”bare metal” (OS-less)applications, or has the ability to boot a uClinux(MMU-less). In addition the students will becomefamiliar with writing Linux device drivers, andembedded applications

• Along with this platform, the student have to compileand become familiar with the gcc binutils for the ARMplatform

Status in Teaching Debugging Klaus Kolle ([email protected]) 15

Page 44: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Subcontractors• The students are divided into sub-teams, in which each

team must supply parts for the complete control systemof the car

• This will train the students in cooperation, negotiationand other teamwork disciplines

• Debugging is also part of getting the interoperationbetween stand-alone devices up and running

• Debugging or inspection of network packages usingWireshark is often introduced as a tool to debugsolutions that communicates over TCP/IP

• The students are introduced to a ”full” embeddedplatform with a (legacy) ARM7 (NXP LPC2478) devicecapable of running either ”bare metal” (OS-less)applications, or has the ability to boot a uClinux(MMU-less). In addition the students will becomefamiliar with writing Linux device drivers, andembedded applications

• Along with this platform, the student have to compileand become familiar with the gcc binutils for the ARMplatform

Status in Teaching Debugging Klaus Kolle ([email protected]) 15

Page 45: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Understand the Hardware

• Together with a couple of other colleagues my colleagueMorten Opprud Jakobsen and I, form the teaching team

• Especially Morten and I have synchronised our teaching

• Morten teaches digital electronics (FPGA design) andsimple ”bare metal” software drivers for embeddedsystems

• Morten states: In order to debug the software, youneed to understand the hardware!

• Identify useful GPIO/UART/other debug hooks• Introduce serial line and JTAG debug options• Understand the bootloader and its influence on the HW

set-up• Perform simple profiling using a scope and GPIO

Status in Teaching Debugging Klaus Kolle ([email protected]) 16

Page 46: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Understand the Hardware

• Together with a couple of other colleagues my colleagueMorten Opprud Jakobsen and I, form the teaching team

• Especially Morten and I have synchronised our teaching

• Morten teaches digital electronics (FPGA design) andsimple ”bare metal” software drivers for embeddedsystems

• Morten states: In order to debug the software, youneed to understand the hardware!

• Identify useful GPIO/UART/other debug hooks• Introduce serial line and JTAG debug options• Understand the bootloader and its influence on the HW

set-up• Perform simple profiling using a scope and GPIO

Status in Teaching Debugging Klaus Kolle ([email protected]) 16

Page 47: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Understand the Hardware

• Together with a couple of other colleagues my colleagueMorten Opprud Jakobsen and I, form the teaching team

• Especially Morten and I have synchronised our teaching

• Morten teaches digital electronics (FPGA design) andsimple ”bare metal” software drivers for embeddedsystems

• Morten states: In order to debug the software, youneed to understand the hardware!

• Identify useful GPIO/UART/other debug hooks• Introduce serial line and JTAG debug options• Understand the bootloader and its influence on the HW

set-up• Perform simple profiling using a scope and GPIO

Status in Teaching Debugging Klaus Kolle ([email protected]) 16

Page 48: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Understand the Hardware

• Together with a couple of other colleagues my colleagueMorten Opprud Jakobsen and I, form the teaching team

• Especially Morten and I have synchronised our teaching

• Morten teaches digital electronics (FPGA design) andsimple ”bare metal” software drivers for embeddedsystems

• Morten states: In order to debug the software, youneed to understand the hardware!

• Identify useful GPIO/UART/other debug hooks• Introduce serial line and JTAG debug options• Understand the bootloader and its influence on the HW

set-up• Perform simple profiling using a scope and GPIO

Status in Teaching Debugging Klaus Kolle ([email protected]) 16

Page 49: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Understand the Hardware

• Together with a couple of other colleagues my colleagueMorten Opprud Jakobsen and I, form the teaching team

• Especially Morten and I have synchronised our teaching

• Morten teaches digital electronics (FPGA design) andsimple ”bare metal” software drivers for embeddedsystems

• Morten states: In order to debug the software, youneed to understand the hardware!

• Identify useful GPIO/UART/other debug hooks

• Introduce serial line and JTAG debug options• Understand the bootloader and its influence on the HW

set-up• Perform simple profiling using a scope and GPIO

Status in Teaching Debugging Klaus Kolle ([email protected]) 16

Page 50: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Understand the Hardware

• Together with a couple of other colleagues my colleagueMorten Opprud Jakobsen and I, form the teaching team

• Especially Morten and I have synchronised our teaching

• Morten teaches digital electronics (FPGA design) andsimple ”bare metal” software drivers for embeddedsystems

• Morten states: In order to debug the software, youneed to understand the hardware!

• Identify useful GPIO/UART/other debug hooks• Introduce serial line and JTAG debug options

• Understand the bootloader and its influence on the HWset-up

• Perform simple profiling using a scope and GPIO

Status in Teaching Debugging Klaus Kolle ([email protected]) 16

Page 51: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Understand the Hardware

• Together with a couple of other colleagues my colleagueMorten Opprud Jakobsen and I, form the teaching team

• Especially Morten and I have synchronised our teaching

• Morten teaches digital electronics (FPGA design) andsimple ”bare metal” software drivers for embeddedsystems

• Morten states: In order to debug the software, youneed to understand the hardware!

• Identify useful GPIO/UART/other debug hooks• Introduce serial line and JTAG debug options• Understand the bootloader and its influence on the HW

set-up

• Perform simple profiling using a scope and GPIO

Status in Teaching Debugging Klaus Kolle ([email protected]) 16

Page 52: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Understand the Hardware

• Together with a couple of other colleagues my colleagueMorten Opprud Jakobsen and I, form the teaching team

• Especially Morten and I have synchronised our teaching

• Morten teaches digital electronics (FPGA design) andsimple ”bare metal” software drivers for embeddedsystems

• Morten states: In order to debug the software, youneed to understand the hardware!

• Identify useful GPIO/UART/other debug hooks• Introduce serial line and JTAG debug options• Understand the bootloader and its influence on the HW

set-up• Perform simple profiling using a scope and GPIO

Status in Teaching Debugging Klaus Kolle ([email protected]) 16

Page 53: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Debugging Embedded Hardware

Status in Teaching Debugging Klaus Kolle ([email protected]) 17

Page 54: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Software Engineering

• In parallel with Mortens more HW oriented approach Iteach the more general principles of debugging

• I’ve taught the art of debugging as part of anothercourse during the past years

• Starting from next summer we will offer a SoftwareEngineering course, which partly is based on thecourse content of the current course

• ”Debugging is twice as hard as writing the code in thefirst place. Therefore, if you write the code as cleverlyas possible, you are, by definition, not smart enough todebug it.” - Brian W. Kernighan.

Status in Teaching Debugging Klaus Kolle ([email protected]) 18

Page 55: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Software Engineering

• In parallel with Mortens more HW oriented approach Iteach the more general principles of debugging

• I’ve taught the art of debugging as part of anothercourse during the past years

• Starting from next summer we will offer a SoftwareEngineering course, which partly is based on thecourse content of the current course

• ”Debugging is twice as hard as writing the code in thefirst place. Therefore, if you write the code as cleverlyas possible, you are, by definition, not smart enough todebug it.” - Brian W. Kernighan.

Status in Teaching Debugging Klaus Kolle ([email protected]) 18

Page 56: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Software Engineering

• In parallel with Mortens more HW oriented approach Iteach the more general principles of debugging

• I’ve taught the art of debugging as part of anothercourse during the past years

• Starting from next summer we will offer a SoftwareEngineering course, which partly is based on thecourse content of the current course

• ”Debugging is twice as hard as writing the code in thefirst place. Therefore, if you write the code as cleverlyas possible, you are, by definition, not smart enough todebug it.” - Brian W. Kernighan.

Status in Teaching Debugging Klaus Kolle ([email protected]) 18

Page 57: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Software Engineering

• In parallel with Mortens more HW oriented approach Iteach the more general principles of debugging

• I’ve taught the art of debugging as part of anothercourse during the past years

• Starting from next summer we will offer a SoftwareEngineering course, which partly is based on thecourse content of the current course

• ”Debugging is twice as hard as writing the code in thefirst place. Therefore, if you write the code as cleverlyas possible, you are, by definition, not smart enough todebug it.” - Brian W. Kernighan.

Status in Teaching Debugging Klaus Kolle ([email protected]) 18

Page 58: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Reliable CodeWriting Reliable Code

Main topic Subtopic Keywords from the content

DebuggingDetermining whereto develop and de-bug

Debug on the development host rather than on the targetmaybe using stubs to emulate absent HW

Local debugging Assertions, ”printf”, Eclipse - breakpoints, watches, etc., gdb+ ddd, unsystematic debugging, systematic debugging andscientific debugging principles

Remote debuggingusing gdb/ddd +gdbserver

Debugging a remote embedded system (working on two dif-ferent CPU architectures)

Code optimisationUse the compileroptions

Compilers are good at reporting potential problems

Lint Static analysis of the code - if the compiler does not reportenough potential problems

Profiling Dynamic analysis of the program. Where does the CPUpower go?

SW testEquivalenceclasses

Defining the sufficient test set

BlackBox Testing without knowing the implementationWhiteBox Testing having insight in the designCoverage Did we test all code?Integration Putting it all togetherContinuous inte-gration

Putting together the pieces continuously

Other topics in the course are: The process of creatingexecutables from source code, make, git, virtualisation anddatabases

Status in Teaching Debugging Klaus Kolle ([email protected]) 19

Page 59: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Where to Develop and Debug• In my opinion it is often much easier to develop and

debug on a well-running development host

• But it requires that stubs are written to mimic themissing HW

• With a deep understanding of the HW, this should beno problem ...

• To quote Morten once again: ”The HW alwaysbehaves a ”bit” different than models (erratasheets, special conditions, interrupts, reset/bootbehaviour, voltage drops, etc...). It is always vitalto verify/profile/investigate the health of the(actual) running system before deployment”

• But of course it is a matter of choice between the timeinvested in developing HW stubs and spending the sameamount of time (or more) in the round-trip time whendeveloping on a low-powered target ...

• But sometimes it is not an option to go on the target asit has not been developed yet

Status in Teaching Debugging Klaus Kolle ([email protected]) 20

Page 60: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Where to Develop and Debug• In my opinion it is often much easier to develop and

debug on a well-running development host• But it requires that stubs are written to mimic the

missing HW

• With a deep understanding of the HW, this should beno problem ...

• To quote Morten once again: ”The HW alwaysbehaves a ”bit” different than models (erratasheets, special conditions, interrupts, reset/bootbehaviour, voltage drops, etc...). It is always vitalto verify/profile/investigate the health of the(actual) running system before deployment”

• But of course it is a matter of choice between the timeinvested in developing HW stubs and spending the sameamount of time (or more) in the round-trip time whendeveloping on a low-powered target ...

• But sometimes it is not an option to go on the target asit has not been developed yet

Status in Teaching Debugging Klaus Kolle ([email protected]) 20

Page 61: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Where to Develop and Debug• In my opinion it is often much easier to develop and

debug on a well-running development host• But it requires that stubs are written to mimic the

missing HW• With a deep understanding of the HW, this should be

no problem ...

• To quote Morten once again: ”The HW alwaysbehaves a ”bit” different than models (erratasheets, special conditions, interrupts, reset/bootbehaviour, voltage drops, etc...). It is always vitalto verify/profile/investigate the health of the(actual) running system before deployment”

• But of course it is a matter of choice between the timeinvested in developing HW stubs and spending the sameamount of time (or more) in the round-trip time whendeveloping on a low-powered target ...

• But sometimes it is not an option to go on the target asit has not been developed yet

Status in Teaching Debugging Klaus Kolle ([email protected]) 20

Page 62: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Where to Develop and Debug• In my opinion it is often much easier to develop and

debug on a well-running development host• But it requires that stubs are written to mimic the

missing HW• With a deep understanding of the HW, this should be

no problem ...• To quote Morten once again: ”The HW always

behaves a ”bit” different than models (erratasheets, special conditions, interrupts, reset/bootbehaviour, voltage drops, etc...). It is always vitalto verify/profile/investigate the health of the(actual) running system before deployment”

• But of course it is a matter of choice between the timeinvested in developing HW stubs and spending the sameamount of time (or more) in the round-trip time whendeveloping on a low-powered target ...

• But sometimes it is not an option to go on the target asit has not been developed yet

Status in Teaching Debugging Klaus Kolle ([email protected]) 20

Page 63: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Where to Develop and Debug• In my opinion it is often much easier to develop and

debug on a well-running development host• But it requires that stubs are written to mimic the

missing HW• With a deep understanding of the HW, this should be

no problem ...• To quote Morten once again: ”The HW always

behaves a ”bit” different than models (erratasheets, special conditions, interrupts, reset/bootbehaviour, voltage drops, etc...). It is always vitalto verify/profile/investigate the health of the(actual) running system before deployment”

• But of course it is a matter of choice between the timeinvested in developing HW stubs and spending the sameamount of time (or more) in the round-trip time whendeveloping on a low-powered target ...

• But sometimes it is not an option to go on the target asit has not been developed yet

Status in Teaching Debugging Klaus Kolle ([email protected]) 20

Page 64: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Where to Develop and Debug• In my opinion it is often much easier to develop and

debug on a well-running development host• But it requires that stubs are written to mimic the

missing HW• With a deep understanding of the HW, this should be

no problem ...• To quote Morten once again: ”The HW always

behaves a ”bit” different than models (erratasheets, special conditions, interrupts, reset/bootbehaviour, voltage drops, etc...). It is always vitalto verify/profile/investigate the health of the(actual) running system before deployment”

• But of course it is a matter of choice between the timeinvested in developing HW stubs and spending the sameamount of time (or more) in the round-trip time whendeveloping on a low-powered target ...

• But sometimes it is not an option to go on the target asit has not been developed yet

Status in Teaching Debugging Klaus Kolle ([email protected]) 20

Page 65: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Local Debugging

• Debugging locally is where the code runs on thedevelopment host

• Introduction to concepts in debugging

• Unsystematic debugging

• Systematic debugging

• Scientific debugging

Status in Teaching Debugging Klaus Kolle ([email protected]) 21

Page 66: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Local Debugging

• Debugging locally is where the code runs on thedevelopment host

• Introduction to concepts in debugging

• Unsystematic debugging

• Systematic debugging

• Scientific debugging

Status in Teaching Debugging Klaus Kolle ([email protected]) 21

Page 67: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Local Debugging

• Debugging locally is where the code runs on thedevelopment host

• Introduction to concepts in debugging

• Unsystematic debugging

• Systematic debugging

• Scientific debugging

Status in Teaching Debugging Klaus Kolle ([email protected]) 21

Page 68: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Local Debugging

• Debugging locally is where the code runs on thedevelopment host

• Introduction to concepts in debugging

• Unsystematic debugging

• Systematic debugging

• Scientific debugging

Status in Teaching Debugging Klaus Kolle ([email protected]) 21

Page 69: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Local Debugging

• Debugging locally is where the code runs on thedevelopment host

• Introduction to concepts in debugging

• Unsystematic debugging

• Systematic debugging

• Scientific debugging

Status in Teaching Debugging Klaus Kolle ([email protected]) 21

Page 70: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Debugging Concepts

• To establish the vocabulary I first introduce how adefect infects the code, and that the infectionpropagates to a failure, which is an externallyobservable error

• Classification of bug types can also be useful (Bohrbug,Mandelbug, Heisenbug, Schrodinbug, Phase of theMoon bug, Statistical bug, Noob bug (or Noobug))

• The use of the debug tools and options are refreshed,introduced and applied

• Having set the scene, we can continue to ...

Status in Teaching Debugging Klaus Kolle ([email protected]) 22

Page 71: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Debugging Concepts

• To establish the vocabulary I first introduce how adefect infects the code, and that the infectionpropagates to a failure, which is an externallyobservable error

• Classification of bug types can also be useful (Bohrbug,Mandelbug, Heisenbug, Schrodinbug, Phase of theMoon bug, Statistical bug, Noob bug (or Noobug))

• The use of the debug tools and options are refreshed,introduced and applied

• Having set the scene, we can continue to ...

Status in Teaching Debugging Klaus Kolle ([email protected]) 22

Page 72: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Debugging Concepts

• To establish the vocabulary I first introduce how adefect infects the code, and that the infectionpropagates to a failure, which is an externallyobservable error

• Classification of bug types can also be useful (Bohrbug,Mandelbug, Heisenbug, Schrodinbug, Phase of theMoon bug, Statistical bug, Noob bug (or Noobug))

• The use of the debug tools and options are refreshed,introduced and applied

• Having set the scene, we can continue to ...

Status in Teaching Debugging Klaus Kolle ([email protected]) 22

Page 73: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Debugging Concepts

• To establish the vocabulary I first introduce how adefect infects the code, and that the infectionpropagates to a failure, which is an externallyobservable error

• Classification of bug types can also be useful (Bohrbug,Mandelbug, Heisenbug, Schrodinbug, Phase of theMoon bug, Statistical bug, Noob bug (or Noobug))

• The use of the debug tools and options are refreshed,introduced and applied

• Having set the scene, we can continue to ...

Status in Teaching Debugging Klaus Kolle ([email protected]) 22

Page 74: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Unsystematic Debugging

• ”Un-systematic debugging is characterised by settingbreakpoints, watches, etc. on suspected places in thecode and then run the program until the breakpoint isreached. Hereafter variables can be inspected.”

• If the developer does not know where to break but justmerely the choice on guesses, it is unsystematic -however it occurs very often, I can observe

Status in Teaching Debugging Klaus Kolle ([email protected]) 23

Page 75: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Unsystematic Debugging

• ”Un-systematic debugging is characterised by settingbreakpoints, watches, etc. on suspected places in thecode and then run the program until the breakpoint isreached. Hereafter variables can be inspected.”

• If the developer does not know where to break but justmerely the choice on guesses, it is unsystematic -however it occurs very often, I can observe

Status in Teaching Debugging Klaus Kolle ([email protected]) 23

Page 76: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Systematic Debugging

Here are seven steps in systematic debugging:T: Track the problem in a databaseR: Reproduce the failureA: Automate and simplify the test caseF: Find possible infection regionsF: Focus on the most likely originsI: Isolate the infection chainC: Correct the defect

Status in Teaching Debugging Klaus Kolle ([email protected]) 24

Page 77: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Systematic Debugging in Teaching

• For Systematic Debugging it can be a little hard toestablish an environment and create a realistic situationwithin the relatively short time allocated for eachsubtopic ...

• But, now - next year - when I have more time, I’ll giveit a try

Status in Teaching Debugging Klaus Kolle ([email protected]) 25

Page 78: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Systematic Debugging in Teaching

• For Systematic Debugging it can be a little hard toestablish an environment and create a realistic situationwithin the relatively short time allocated for eachsubtopic ...

• But, now - next year - when I have more time, I’ll giveit a try

Status in Teaching Debugging Klaus Kolle ([email protected]) 25

Page 79: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Scientific Debugging

Status in Teaching Debugging Klaus Kolle ([email protected]) 26

Page 80: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Reasoning - explained

• Deduction (0 runs)• Concluding from abstract to concrete

• ”I do not have to measure if the sum of angles in atriangle is 180 degrees. I deduce it from amathematical theory.”

• Observation (1 run)• Observe a phenomenon once

• Induction (n runs)• Collecting many concrete observation to form abstract

• ”I have met 15 stupid men, thus all men are stupid...”

• Experimentation (n controlled runs)• Induction, but controlled by scientific method

Status in Teaching Debugging Klaus Kolle ([email protected]) 27

Page 81: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Steps in Scientific Debugging

Status in Teaching Debugging Klaus Kolle ([email protected]) 28

Page 82: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

An Example

Status in Teaching Debugging Klaus Kolle ([email protected]) 29

Page 83: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Remote Debugging

• This activity is mainly about how we can establish adevelopment and debug environment where we candebug the code, while it executes on the target, butuses a debugger situated more conveniently on thedevelopment host

• So for the students, it is a matter of understanding theproduction of executable code and what the debuggerneeds in order to work separated from the executingcode

• I typically establish a situation where we produces codefor our Linux running on an Embedded Artists LPC2478 (ARM 7) board, while our debugging environmentis situated on the virtual Centos Linux developmenthost, I have provided for the students

• We use a gdb-server on the target

• We use gdb/ddd or Eclipse on the development host

Status in Teaching Debugging Klaus Kolle ([email protected]) 30

Page 84: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Remote Debugging

• This activity is mainly about how we can establish adevelopment and debug environment where we candebug the code, while it executes on the target, butuses a debugger situated more conveniently on thedevelopment host

• So for the students, it is a matter of understanding theproduction of executable code and what the debuggerneeds in order to work separated from the executingcode

• I typically establish a situation where we produces codefor our Linux running on an Embedded Artists LPC2478 (ARM 7) board, while our debugging environmentis situated on the virtual Centos Linux developmenthost, I have provided for the students

• We use a gdb-server on the target

• We use gdb/ddd or Eclipse on the development host

Status in Teaching Debugging Klaus Kolle ([email protected]) 30

Page 85: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Remote Debugging

• This activity is mainly about how we can establish adevelopment and debug environment where we candebug the code, while it executes on the target, butuses a debugger situated more conveniently on thedevelopment host

• So for the students, it is a matter of understanding theproduction of executable code and what the debuggerneeds in order to work separated from the executingcode

• I typically establish a situation where we produces codefor our Linux running on an Embedded Artists LPC2478 (ARM 7) board, while our debugging environmentis situated on the virtual Centos Linux developmenthost, I have provided for the students

• We use a gdb-server on the target

• We use gdb/ddd or Eclipse on the development host

Status in Teaching Debugging Klaus Kolle ([email protected]) 30

Page 86: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Remote Debugging

• This activity is mainly about how we can establish adevelopment and debug environment where we candebug the code, while it executes on the target, butuses a debugger situated more conveniently on thedevelopment host

• So for the students, it is a matter of understanding theproduction of executable code and what the debuggerneeds in order to work separated from the executingcode

• I typically establish a situation where we produces codefor our Linux running on an Embedded Artists LPC2478 (ARM 7) board, while our debugging environmentis situated on the virtual Centos Linux developmenthost, I have provided for the students

• We use a gdb-server on the target

• We use gdb/ddd or Eclipse on the development host

Status in Teaching Debugging Klaus Kolle ([email protected]) 30

Page 87: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Remote Debugging

• This activity is mainly about how we can establish adevelopment and debug environment where we candebug the code, while it executes on the target, butuses a debugger situated more conveniently on thedevelopment host

• So for the students, it is a matter of understanding theproduction of executable code and what the debuggerneeds in order to work separated from the executingcode

• I typically establish a situation where we produces codefor our Linux running on an Embedded Artists LPC2478 (ARM 7) board, while our debugging environmentis situated on the virtual Centos Linux developmenthost, I have provided for the students

• We use a gdb-server on the target

• We use gdb/ddd or Eclipse on the development host

Status in Teaching Debugging Klaus Kolle ([email protected]) 30

Page 88: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Presentation Outline

1 IntroductonEDE BackgroundProfile of the EDE engineer

2 Debugging in the StudyFirst YearSecond YearThird Year

Status in Teaching Debugging Klaus Kolle ([email protected]) 31

Page 89: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Application

• In the elective courses the students mainly apply theirgained knowledge in order to learn and understand newtheory

• My colleague Anders introduces Fuzzy Testing as partof his Advanced Software Design courses (Fuzzy Testingis the art of bombarding the test object with a massiveamount of random data in order to provoke errors)

• If new languages and development environments areintroduced it is expected that the students are able todevelop and debug the programs they are recommendedto construct as part of the learning

Status in Teaching Debugging Klaus Kolle ([email protected]) 32

Page 90: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Application

• In the elective courses the students mainly apply theirgained knowledge in order to learn and understand newtheory

• My colleague Anders introduces Fuzzy Testing as partof his Advanced Software Design courses (Fuzzy Testingis the art of bombarding the test object with a massiveamount of random data in order to provoke errors)

• If new languages and development environments areintroduced it is expected that the students are able todevelop and debug the programs they are recommendedto construct as part of the learning

Status in Teaching Debugging Klaus Kolle ([email protected]) 32

Page 91: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Application

• In the elective courses the students mainly apply theirgained knowledge in order to learn and understand newtheory

• My colleague Anders introduces Fuzzy Testing as partof his Advanced Software Design courses (Fuzzy Testingis the art of bombarding the test object with a massiveamount of random data in order to provoke errors)

• If new languages and development environments areintroduced it is expected that the students are able todevelop and debug the programs they are recommendedto construct as part of the learning

Status in Teaching Debugging Klaus Kolle ([email protected]) 32

Page 92: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Summary

• It is our opinion that we do give our students a rathergood foundation to enter the job market

• Because of our limited time, we may unfortunately notbe able to deal with the tops in depth

• But no one is perfect, so always welcome inputs thatcan change and improve our teaching

• I look forward to listening to the other presentationstoday and maybe be inspired to add even more topic tomy courses

Status in Teaching Debugging Klaus Kolle ([email protected]) 33

Page 93: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Summary

• It is our opinion that we do give our students a rathergood foundation to enter the job market

• Because of our limited time, we may unfortunately notbe able to deal with the tops in depth

• But no one is perfect, so always welcome inputs thatcan change and improve our teaching

• I look forward to listening to the other presentationstoday and maybe be inspired to add even more topic tomy courses

Status in Teaching Debugging Klaus Kolle ([email protected]) 33

Page 94: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Summary

• It is our opinion that we do give our students a rathergood foundation to enter the job market

• Because of our limited time, we may unfortunately notbe able to deal with the tops in depth

• But no one is perfect, so always welcome inputs thatcan change and improve our teaching

• I look forward to listening to the other presentationstoday and maybe be inspired to add even more topic tomy courses

Status in Teaching Debugging Klaus Kolle ([email protected]) 33

Page 95: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Summary

• It is our opinion that we do give our students a rathergood foundation to enter the job market

• Because of our limited time, we may unfortunately notbe able to deal with the tops in depth

• But no one is perfect, so always welcome inputs thatcan change and improve our teaching

• I look forward to listening to the other presentationstoday and maybe be inspired to add even more topic tomy courses

Status in Teaching Debugging Klaus Kolle ([email protected]) 33

Page 96: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Any Questions?

Status in Teaching Debugging Klaus Kolle ([email protected]) 34

Page 97: Debugging 2013- Klaus kolle

Status in TeachingDebugging

Klaus Kolle([email protected])

Introducton

EDE Background

Profile of the EDEengineer

Debugging in theStudy

First Year

Second Year

Third Year

Summary

Thank you for your attention

Status in Teaching Debugging Klaus Kolle ([email protected]) 35