Developing Tasks to use with a co-operative scheduler Ideas for Assignment 2 Lab. 2, 3 and 4 Review for Midterm on Lab. 2 Ideas of defects, errors and.

Slides:



Advertisements
Similar presentations
All of Lab. 4 using Services Audio, LED, GPIO, LightSensor, Thermal Sensors, LCD Code by A. Tran / M. Smith Talk by M. Smith with slides from D. Lannigan.
Advertisements

Lab. 2 Overview. Lab. 2 and Assignment 3 Many Lab. 2 and Assignment 3 tasks involve “downloading” provided code, compiling and linking into a project.
Blackfin BF533 EZ-KIT Control The O in I/O Activating a FLASH memory “output line” Part 2.
Lab3 -- Lab 4 Design and implementation details on the way to a valid SPI-LCD interface driver.
Lab 3 Details. Lab 3 Develop a bio-feedback system based on a PWM (pulse width modulated) thermal sensor Use temperature setting to control the delays.
Boot Issues Processor comparison TigerSHARC multi-processor system Blackfin single-core.
6/2/2015 Concept of Test Driven Development applied to Embedded Systems M. Smith University of Calgary, Canada 1 Automated Testing Environment Concepts.
6/2/2015 Labs in ENCM415. Laboratory 2 PF control, Copyright M. Smith, ECE, University of Calgary, Canada 1 Temperature Sensor Laboratory 2 Part 2 – Developing.
Thermal arm-wrestling Design of a video game using two programmable flags (PF) interrupts Tutorial on handling 2 Hardware interrupts from an external device.
Review of Blackfin Syntax Moves and Adds 1) What we already know and have to remember to apply 2) What we need to learn.
Lab. 2 – More details – Tasks 4 to 6 1. What concepts are you expected to understand after the Lab. 2 is finished? 2. How do you demonstrate that you have.
Core Timer Code Development How you could have done the Take- Home Quiz using a test driven development (TDD) approach.
HD44780 LCD programming From the Hardware Side Design and implementation details on the way to a valid SPI-LCD interface driver.
LCD programming Design and implementation details on the way to a valid SPI-LCD interface driver.
Lab. 2 Overview 1. What concepts are you expected to understand after the Lab. 2 is finished? 2. How do you demonstrate that you have that knowledge?
1 Advanced Material The following slides contain advanced material and are optional.
Getting the O in I/O to work on a typical microcontroller Ideas of how to send output signals to the radio controlled car. The theory behind the LED controller.
Blackfin BF533 EZ-KIT Control The O in I/O Activating a FLASH memory “output line” Part 2.
Writing Methods. Create the method Methods, like functions, do something They contain the code that performs the job Methods have two parts.
Activity 1 - WBs 5 mins Go online and spend a moment trying to find out the difference between: HIGH LEVEL programming languages and LOW LEVEL programming.
Testbed: Exercises.
HD44780 LCD programming From the Hardware Side
Bug Session One. Session description In this session, pupils are introduced to a programming sequence which will make a light pattern on their Bug. Objectives.
Peripherals and their Control An overview of industrially available “peripheral devices” that use “pulse-width modulation” for information passing. Review.
Humboldt University Berlin, University of Novi Sad, University of Plovdiv, University of Skopje, University of Belgrade, University of Niš, University.
Some Sub-Activities within Requirements Engineering 1.Prototyping 2.Requirements Documentation 3.Requirements Validation 4.Requirements Measurements 5.Requirements.
Understanding the TigerSHARC ALU pipeline Determining the speed of one stage of IIR filter – Part 3 Understanding the memory pipeline issues.
Understanding the TigerSHARC ALU pipeline Determining the speed of one stage of IIR filter – Part 2 Understanding the pipeline.
Lab. 2 Overview Move the tasks you developed in Lab. 1 into the more controllable TTCOS operating system Manual control of RC car.
Moving Arrays -- 1 Completion of ideas needed for a general and complete program Final concepts needed for Final Review for Final – Loop efficiency.
Dynamic Memory. We will follow different order from Course Book We will follow different order from Course Book First we will cover Sect The new.
CPSC 252 The Big Three Page 1 The “Big Three” Every class that has data members pointing to dynamically allocated memory must implement these three methods:
Lab. 2 Overview. Echo Switches to LED Lab1 Task 7 12/4/2015 TDD-Core Timer Library, Copyright M. Smith, ECE, University of Calgary, Canada 2 / 28.
Mistakes, Errors and Defects. 12/7/2015Mistakes, Errors, Defects, Copyright M. Smith, ECE, University of Calgary, Canada 2 Basic Concepts  You are building.
12/14/2015 Concept of Test Driven Development applied to Embedded Systems M. Smith University of Calgary, Canada 1 Automated Testing Environment Concepts.
The right and wrong ways for constructing tasks for the Labs and Assignment.
Handling multiple input signals Version #2 – co-operative scheduler Version #3 – pre-emptive scheduler.
Clicker quiz 10/8/13 CSE 1102 Fall 2013 (E-30 reminder!)
ECE297 TA GUIDE Project supervision. Agenda M0 feedback Project overview M1 overview Project supervision.
A Play Core Timer Interrupts Acted by the Human Microcontroller Ensemble from ENCM415.
“Lab. 5” – Updating Lab. 3 to use DMA Test we understand DMA by using some simple memory to memory DMA Make life more interesting, since hardware is involved,
Developing Tasks to use with a co-operative scheduler Ideas for Assignment 2 Lab. 2, 3 and 4 Review for Midterm on Lab. 2 Ideas of defects, errors and.
Today… Python Keywords. Iteration (or “Loops”!) Winter 2016CISC101 - Prof. McLeod1.
Unity Application Generator Step 7b: Generating HMI.
Lab3 -- Lab 4 Design and implementation details on the way to a valid SPI-LCD interface driver.
EGR 2261 Unit 4 Control Structures I: Selection
Call to Fix Canon Pixma MX340 printer Error 5200
Lab. 2 Overview – Earlier Tasks Prelaboratory T1, T3, T4 and T5
Lab. 2 Overview.
Generating the “Rectify” code (C++ and assembly code)
Introduction to Test Driven Development
Automated Testing Environment
Thermal arm-wrestling
Generating a software loop with memory accesses
Handling Arrays Completion of ideas needed for a general and complete program Final concepts needed for Final.
Lab. 2 – More details – Later tasks
Moving Arrays -- 1 Completion of ideas needed for a general and complete program Final concepts needed for Final Review for Final – Loop efficiency.
Moving Arrays -- 2 Completion of ideas needed for a general and complete program Final concepts needed for Final DMA.
Thermal arm-wrestling
How to Run a Java Program
Moving Arrays -- 2 Completion of ideas needed for a general and complete program Final concepts needed for Final DMA.
Handling Arrays Completion of ideas needed for a general and complete program Final concepts needed for Final.
HD44780 LCD programming From the Hardware Side
HD44780 LCD programming From the Hardware Side
Concept of TDD Test Driven Development
Explaining issues with DCremoval( )
Handling Arrays Completion of ideas needed for a general and complete program Final concepts needed for Final.
Lab. 2 Overview Move the tasks you developed in Lab. 1 into the more controllable TTCOS operating system.
Thermal arm-wrestling
Mistakes, Errors and Defects
Presentation transcript:

Developing Tasks to use with a co-operative scheduler Ideas for Assignment 2 Lab. 2, 3 and 4 Review for Midterm on Lab. 2 Ideas of defects, errors and code review

Lab 3 – Bio-feedback Should be LED 5

Lab. 4 Use SPI interface, cause the words “Happy 511 Christmas” to appear on the LCD screen (60%) Manual version down in class – Nov 19 th (40%) 6/18/2015SPI and LCD, Copyright M. Smith, ECE, University of Calgary, Canada 3 / 30

Lab LCD interface Full SPI controller Note – readiness need for 19 November as demo encurring in class time and not lab time

See Lab 4 notes for more details

Some of the requirements for Lab 3 Should be LED 5

Design the task state diagram

Develop Basic Test for FlashLED6 “working”

Build Test -- Tells us what functions need developing ‘Quick fix’ to use new function names without having to change Lab 1 names Re-factor later (Feb 2011)

Write “enough” code to satisfy the Tests Why is using ‘current state’ better than reading current LED values? Are there ‘defect’s” in this code

[ What are the “syntax” errors in Flash6( )? Ignore “logical errors” at this time ] A.[In lines 16 to 20] B.[In lines 21 to 24] C.[In lines 25 to 28] D.[In lines 29 to 32] E.[In lines 33 to 36 ] [Default] [MC Any] [MC All]

Defects The number of syntax errors you did not find before compiler – meaning the ones the compiler found after your code review IS A PROXY FOR The number of logical defects STILL present in your code DO A PROPER CODE REVIEW

[ What are the “logical” defects? Only the defects that would cause this simple Test to fail ] A.[ In lines 16 to 20] B.[In lines 21 to 24] C.[In lines 25 to 28] D.[In lines 29 to 32] E.[In lines 33 to 36]

Running the TEST

Identify the defect -- This is NOT a syntax error as compiler worked Each time this function “starts” currentState is reset to STATE1_ON 3 defects as well

Develop Basic Test for FlashLED6 “working properly” DO CODE REVIEW This test worries about requirement that other LED’s not impacted by FlashLED6

[Do Code review Where are the “syntax errors”] A.[31  33] B.[35  37] C.[42  45] D.[47  48] E.[50  53] The number of syntax errors you did not find before compiler – meaning the ones the compiler found after your code review IS A PROXY FOR the number of logical defects STILL present in your code

4 LOGICAL ERRORS

[Why are the tests failing? Choose best answer A.[System does not know what it is doing] B.[LED 6 is on, when it should be off] C.[LED 6 is off, when it should be on] D.[InitFlashCPP( ) and InitFlashPortCPP( ) not called] E.[All of above]

The FIX to start in state2 causes earlier tests to fail

When we call “FlashLED6 ( )” – the result depends on what happened before If another test has called 3 FlashLED( ), then the Test passes. But if another test has called 4 FlashLED( ), the test fails Slide shows initialization of FlashLED6 and fixed tests to use the new function

The problems with SimpleTest work – but destroy other states currentLED6 is now a global variable

Fix the code But it still fails

[Where does the problem remain?] A.[Outside this code] B.[In Lines 28  30] C.[Logic of State1] D.[InitFlashCPP( ) and InitFlashPortCPP( ) not called] E.[Logic of State 2]

Init Flash6, Run the Flash 6 task and destroy it after 20 seconds

Slightly different task in Lab3 Write tests to u se SW3 to change LED5 flash rate If switch 3 ‘accidently’ touched – do nothing to LED5 flash rate If switch 3 is held and released after a ‘short’ time, then decrease flash rate each time released If switch 3 is held and released after a ‘long’ time, then increase flash rate each time released