lab2
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
lab2 [2014/01/20 02:59] – allison | lab2 [2014/01/21 05:07] (current) – allison | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Lab 2 ====== | ====== Lab 2 ====== | ||
- | |||
- | [[ucos background|Background Information]] | ||
- | |||
- | ==== Evaluation ==== | ||
- | μC/OS-II source code is divided into platform dependent and platform independent files. Platform independent files can be found in Micrium/ | ||
- | |||
- | By study the source structure and Micrium/ | ||
- | - Write a pseudo code using μC/OS-II to create two tasks and protect their critical sections that is accessing a common variable called XYZ. | ||
- | - In your own words, explain how multitasking is achieved in the μC/OS-II (pay special attention to os_cpu_a.s)? | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
+ | ==== Background ==== | ||
+ | [[ucos background|Background Information]] | ||
Line 32: | Line 10: | ||
==== Prelab studies ==== | ==== Prelab studies ==== | ||
- | * Please make sure to read and understand the license agreements: | + | Please make sure to read and understand the license agreements |
- | * {{: | + | * {{: |
- | * {{: | + | * {{: |
- | * {{: | + | * {{: |
- | * {{: | + | * {{: |
- | * Make sure you fully understand the previous labs ([[lab1|Lab 1]] and [[lab2|Lab 2]]). | + | |
- | * Also read the application note 1456 which provides a general information about Lab 3 stationary project: | + | |
- | * {{: | + | |
- | ==== Evaluation ==== | ||
- | Demonstrate the uploaded program to your T.A. Provide brief answers to the following questions: | ||
- | * What is the process of creating a new task in μC/OS-II? Provide a pseudo sample code by study “KeypadTask” code block used in the lab. | ||
- | * Explain how OSFlagPend function and how it prevents the “KeypadTask” from accessing the critical LCD resource? | ||
- | ==== Procedure ==== | + | Also reference |
- | * Open the lab stationary using CodeWarrior located in: | + | |
- | < | + | |
- | | + | |
- | * Recompile the project | + | |
- | + | ||
- | ==== Reference Manuals ===== | + | |
* {{: | * {{: | ||
* {{: | * {{: | ||
Line 66: | Line 31: | ||
* {{: | * {{: | ||
- | ==== Resources ===== | ||
- | * {{: | ||
+ | * Make sure you fully understand the previous labs ([[lab1|Lab 1]]). | ||
+ | * Also read the application note 1456 which provides a general information about the stationary project used in the lab: | ||
+ | * {{: | ||
+ | ==== Prelab Evaluation ==== | ||
+ | μC/OS-II source code is divided into platform dependent and platform independent files. Platform independent files can be found in Micrium/ | ||
+ | |||
+ | By studying the source structure and Micrium/ | ||
+ | * What is the process of creating a new task in μC/OS-II? Provide sample pseudo code by studying the “KeypadTask” code block used in the lab. | ||
+ | * Explain how OSFlagPend function works and how it prevents the “KeypadTask” from accessing the critical LCD resource. | ||
+ | * Prepare a version of the demo program that guards the LCD resource using semaphores instead of OSFlag (see {{: | ||
+ | |||
+ | |||
+ | ==== Procedure ==== | ||
+ | * Open the lab stationary using CodeWarrior located in: | ||
+ | < | ||
+ | * Recompile the project and transfer the binaries to Dragon12 board as explained in [[lab1|Lab 1]]. Try the program and ensure you know how it works {{: | ||
+ | * Do the same for the program you developed in the prelab to use semaphores to protect the critical code segments in the LCD access. Test and debug. | ||
+ | * Demonstrate the working program to your T.A. | ||
+ | |||
+ | Submit the source code and prelab answers using the command: //submit 4352 lab2 filename// to submit your prelab report and and code. (Use “man submit” for details on how to use the submit command. The “course” is “4352”, the “assignment” is “lab2”.) | ||
Line 77: | Line 60: | ||
==== Resources ===== | ==== Resources ===== | ||
+ | * {{: | ||
* {{: | * {{: |
lab2.1390186786.txt.gz · Last modified: 2014/01/20 02:59 by allison