Laboratory 1 Manual V1.2 1 st September 2007 Developing a Blackfin GPIO interface using an automated embedded testing environment

Size: px
Start display at page:

Download "Laboratory 1 Manual V1.2 1 st September 2007 Developing a Blackfin GPIO interface using an automated embedded testing environment"

Transcription

1 Laboratory 1 Manual V1.2 1 st September 2007 Developing a Blackfin GPIO interface using an automated embedded testing environment These pages are cut-and-paste from the Lab. 1 web-pages. I have not spent a lot of time reformatting them. I have not checked that the links work correctly from this document if there are problems in following the links to download code segments, then go to the ENCM415 web site and follow the links there. You should have already completed the familiarization exercises: Familiarization Exercise for the Blackfin BF533 Board Follow the video links for more details 1. Check that the Lab. station can talk to the Blackfin Evaluation Board across the HPCC-ICE interface Check HPPCI Link To Blackfin ADSP-BF533 Evaluation Board.swf 2. Activate a VDSP Blackfin Session -- Activate a VDSP Blackfin Session.swf 3. Build a Blackfin Project and add a main( ) -- Build a Blackfin Project.swf 4. Add the Blackfin Hello World function -- Add the Blackfin Hello World function.swf 5. Add Blackfin CPP Stubs Then Coding -- Add CPP Stubs Then Coding.swf 6. Add a Blackfin Assembly language stub -- Assembly code Stub.swf 7. Complete the Blackfin assembly code example -- Completing the assembly code example.swf

2 Laboratory 1 Tasks Minimum requirements For many of the tasks associated with the Laboratory, code examples are provided to cut down the amount of typing you have to perform during the Laboratory time. You should downloaded any code needed for Laboratory 1 into your ENCM415 directory before coming into the Laboratory. Plan to complete Tasks 1 to 2 (preferably Tasks 1 to 3 or 4) before coming into the Laboratory. You are unlikely to complete the laboratory in 3 hours otherwise. 1. Testing the development environment -- Check that the audio talk-through program works on your laboratory station T1 - Test CPPTalkthrough 2. See the impact of using "debug print" statements on the operation of an embedded system T2 - Debug impact Test last development - TLD 3. Using your standard coding process, develop and test the GPIO interface functions void Initialize_GPIOFlagsASM(void) and unsigned short int ReadGPIOFlagsASM(void); T3 - GPIO Interface. Links are provided to detailed help information on developing the GPIO code..3 Hints - GPIO Interface 4. Use the E-Unit testing frame work to more thoroughly test the GPIO interface functions (TLD -- Test last development approach). Test code can be downloaded from the web. T4 -- GPIO Interface tests Test driven development - TDD 5. Using a test first development approach (TDD), add tests for the Flash Memory interface void InitFlashASM(void), void InitFlashPortASM(void), void WriteFlashLEDASM( int value), int ReadFlashLEDASM(void). Test code can be downloaded from the web. T5 - Flash Memory Tests 6. Develop the code for the Flash Memory interface InitFlashASM( ), InitFlashPortASM( ), WriteFlashLEDASM( int value), int ReadFlashLEDASM( ) using a TDD approach. Links to hints are provided.t6 - Flash Memory Interface Hints Functional Testing of Lab. 1 Code -- Demonstrate to T.A. or instructor 7. Echoing the switch positions to the LEDs T7 - Echo switches to LED. Developed in CPP. (80% -- A- grade in the Laboratory to this point) 8. Laboratory design components -- Developing Morse code functionality in CPP using a TDD approach T8 Morse Code. (additional 15% with possible Laboratory bonuses) 9. Does your code really work -- Download and run this audio project which automatically calls all of your Lab. 1 code. Will you have to "recall" your project'? T9 - Does your code really work (additional 5% ) Optional voice-activated robotic car project -- download the VARC project. This will automatically link to your Lab. 1 code. TO COME

3 ough.htm Lab. 1 Task 1 -- Test CPP talk-through Code Analog Devices provides a series of example code for their evaluation boards so that people can "quickly get something working". The "Talk-through" example we are going to use in this laboratory is a modified version of the code that is found at C:\Program Files\Analog Devices\VisualDSP 4.5\Blackfin\EZ-KITs\ADSP-BF533\Examples\Audio codec talkthrough\c\tdm This talk through example shows the programmer how to set-up the audio codecs (A/D and D/A) to capture an audio signal and then play the signal back (or talk-through) without changing it. In addition the example shows the programmer how to make use of audio interrupt service routines. None of this is going to be of a concern for us in this laboratory. We are going to leave all the Analog code alone, and just assume that it works as stated. We are going to use this code to test that the Blackfin Evaluation board works as expected. You will not have to write any code for this task -- just down load code (C++ and asm) and link into a project. The first thing we need to do is to check that the C++-version of the talk-through code works on our lab-station. If you have not already done so, download and expand the 2007LabStructure30Aug2007.7z file into your ENCM415 directory on your home drive. That way you will have the correct common directory structure and test driven development environment needed for Assignment 1 and Laboratory 1. Your directory structure should look similar to the picture on the right Activate the VDSP development environment and switch to directory CPP_Talkthrough_Lab1Task1Task2 inside VDSP. Activate the CPP_Talkthrough_Lab1Task1Task2 project in that directory. Build the code and download the executable to the evaluation board Hook up your CD or IPOD output to the CJ2 stereo input. Hook up your ear-phones to the CJ3 stereo output. Run the CPP_Talkthrough_Lab1Task1Task2.dxe executable and check that the talk through program is working.

4 gstatements.htm Lab. 1 Task 2 Impact of Debug operations using standard I/O on the performance of an embedded system In the class, we have discussed the impact of using "printf( )" or "cout" statements as part of a code debugging process on real-time embedded system. The Blackfin audio talk-through program is an example of a real time system -- if the "next" audio sample is not available within 1 / s, the audio signal becomes distorted. Remove the comment markers (//) from the if and printf( ) in the code for the main.cpp in the project CPP_Talkthrough_Lab1Task1Task2 to include a very simple debug check via a print statement. Recompile the code and run. The impact on sound quality of a debug operation via a print statement is very obvious. You can try modifying the code to use "cout" operations. By changing the maximum "count" in the SpinWheels( ) code you can cause the debug print statement to execute less often. Basically, the conclusion I would expect you to reach from this task is it is necessary to be able to debug embedded code in a way that takes no use of print statements. You must find a different debugging approach that does not impact on the performance of your code and use a different automated approach that does not require that you manually look at the test results. In your laboratory write-up, explain the details of why using a print statement for debugging (or any other purpose) is so slow and disruptive to a real-time embedded system. What is happening to an embedded system when you use printf( ) statements? Get another group to sign off in your laboratory report that you have completed these two tasks.

5 ASM.htm Lab 1 Task 3 -- General Purpose Input Output interface void Initialize_GPIOFlagsASM(void); unsigned short int ReadGPIOFlagsASM(void); WARNING -- SMOKE CAUSING AREA MIS-PROGRAMMING OR MIS-CONNECTION OF WIRES HAS A REAL POSSIBILITY OF LEADING TO PERMANENT BLACKFIN PROCESSOR DAMAGE DISCUSION In the next couple of tasks we need to be able to read the switches on the front panel of the BF533 board Switch SW1 is connected to GPIO programmable flag bit PF8 -- bit pattern 0x0100 when FIO_FLAG_D register is read Switch SW2 is connected to GPIO programmable flag bit PF9 -- bit pattern 0x0200 when FIO_FLAG_D register is read Switch SW3 is connected to GPIO programmable flag bit PF10 -- bit pattern 0x0400 when FIO_FLAG_D register is read Switch SW4 is connected to GPIO programmable flag bit PF11 -- bit pattern 0x0800 when FIO_FLAG_D register is read We need to generate the function void Initialize_GPIOFlagsASM(void) to configure the GPIO interface. After we initialize the registers for the PF (programmable flag) interface, then information in the FIO_FLAG_D register will tell us which button (or buttons combinations) is being pressed (using the unsigned short int ReadGPIOFlagsASM(void) function) Look at the details in Activating the Blackfin GPIO pins -- Lab. 1.ppt on how to set up the logic Lab and the Blackfin Cables Laboratory Requirements NOTE: Important -- Certain laboratory requirements must be followed. If the laboratory notes say Build Function Fred( ) and place in file X.cpp in directory XYZ, then those instructions must be followed "absolutely". To save time typing in the laboratory, you have been provided with files and project directories to down load. The code in these files and project directories expects that the function will be called Fred( ) and not fred( ) and that it can be found in file X.cpp in directory XYZ to work. I have shown you in the lecture notes that it is easy to save files into the wrong directory by accident (I know, I do it all the time). 1. Close the talkthrough project, you will noit need that again till task Develop a project called Lab1 in your ENCM415/Lab1 directory 3. Use your normal coding process to write, debug and demonstrate the code for activating the Blackfin GPIO interface. Remember that you are sharing the GPIO interface with other processor threads, so don't change settings other than for pins 8, 9, 10 and Using the course lecture notes and information from the Blackfin Hardware manual build the routine void Initialize_GPIOFlagsASM(void) to configure the GPIO interface. Place this "C++" compatible assembly language function in the file InitializeGPIOFlagsASM.asm in your Lab1directory. 5. Using the course lecture notes and information from the Blackfin Hardware manual build the routine unsigned short int ReadGPIOFlagsASM(void) to read the GPIO interface setting. Place this "C++" compatible assembly language function in the file ReadGPIOFlagsASM.asm in your Lab1directory. When completed your testing, get the T.A. or instructor to sign off that your code is working. Since this is early in the laboratory, you can get another laboratory group (not your closest friends) to sign off this section, meaning, you don't have to wait for a T.A. or instructor. Try to finish Task 3 according to the class notes using your normal code development process. If you need some help to get started -- then follow this link T3 Hints - GPIO Interface available from the web only. Before spending a lot of time debugging, I suggest you try Task 4 -- Automated TLD testing of the GPIO interface code. Look at the details in Activating the Blackfin GPIO pins -- Lab. 1.ppt on how to set up the logic Lab and the Blackfin Cables

6 PIO_Interface.htm Lab 1 Task 4 -- Automated testing procedure for the code void Initialize_GPIOFlagsASM(void); unsigned short int ReadGPIOFlagsASM(void); WARNING -- SMOKE CAUSING AREA MIS-PROGRAMMING OR MIS-CONNECTION OF WIRES HAS A REAL POSSIBILITY OF LEADING TO PERMANENT BLACKFIN PROCESSOR DAMAGE By using tests that examine the condition (state) of the Blackfin hardware after we have programmed it, we can try to minimize problems. One of the problems is that damage may be done (because of incorrect code) we are doing the tests. Before proceeding with Task 4, YOU NEED TO ENSURE that your code you developed in Task 3 uses the correct named functions, placed in the correct files in Lab. 1 o Develop a project called Lab1 in your ENCM415/Lab1 directory o Using the course lecture notes and information from the Blackfin Hardware manual build the routine void Initialize_GPIOFlagsASM(void) to configure the GPIO interface. Place this "C++" compatible assembly language function in the file InitializeGPIOFlagsASM.asm in your Lab1directory. o Using the course lecture notes and information from the Blackfin Hardware manual build the routine unsigned short int ReadGPIOFlagsASM(void) to read the GPIO interface setting. Place this "C++" compatible assembly language function in the file ReadGPIOFlagsASM.asm in your Lab1directory. To provide the automated testing you need to download certain files to the Lab1Test directory 1. Lab1Tests.dpj 2. Lab1Testmain.cpp 3. Lab1GPIOTests.cpp 4. Lab1GPIOTestsLowLevel.cpp Once you have downloaded the files, open? the Lab1Test project, recompile and run your code. The Lab1Tests.dpj will hunt out and link to the Task 3 files in directory Lab. 1 automatically if the Lab 1 task 3 files have been placed in the Lab. 1 directory as expected. The provided test simply checks that the 50-pin cable is plugged in (SAY WITH ME -- "Insert the cable the correct way (not upside down), push hard till the 'click' is heard now do it for the other end of the cable") and the logic lab. is witched on and no fuses have blown You can modify the tests you used during task3 (from Lab1main.cpp) to run in the E-UNIT testing environment. Click on the thumb-nail picture for more details. With the E-UNIT testing framework you can do some more detailed testing -- even at the level of "did you perform the number of expected read and write operations within a routine

7 Useful for testing loops in C++ (did you go around the loop the correct number of times, not once too many times or once too few). For interfacing problems, did you read and write to the GPIO register values the correct number of times. Here are the steps for activating the low level set of tests. Lab1GPIOTestsLowLevel.cpp 1. Right click on Lab1GPIOTestsLowLevel.cpp to change the compile options. 2. Remove the "tick" from "exclude from build" box and select okay 3. Activate the E-Unit GUI from the E-UnitIncludes Directory. 4. Select "Always on top" from the GUI "view menu" 5. Select "Refresh test connection" from the new E-UNIT VDSP menu options You should now be able to build the Lab1Test -- you should expect to have no compile or link errors if your code files, names and location from Task 3 are correct.

8 6. You can get the E-UNIT GUI to "compile", "load" and "run" the code automatically, saving some steps over using the VDSP interface correctly. Notice that the tests run faster as the communication between the processor and the PC is handled by a GUI "background communication channel (BTC)" which is much faster than normal prints to the screen If you get a failure message (in red), simply click on the failure message and you will get additional information on the test you failed. Fix your code to pass the tests. Don't fix the tests to pass the code, unless you are VERY sure that the test is wrong. Provide copies of the working code for Task 3 in your laboratory write-up. Follow the coding conventions required for this course Click on the thumb-nail image to see my code failing as I did not respond to the requests to press switches. You don't get the "click to jump to failure" capability without having the E-UNIT GIU running. This "jump to failure" mode is very useful when you take a "test driven development (TDD) approach to developing your code. If you want to see just the test failures (and not the test successes), go into the file ActivateTests.cpp and change the line volatile int output_mode = SCREEN_OUTPUT BTC_CONNECTION SHOW_FAILURES SHOW_EXPECTED_FAILURES SHOW_SUCCESSES; to volatile int output_mode = SCREEN_OUTPUT BTC_CONNECTION SHOW_FAILURES SHOW_EXPECTED_FAILURES ; // SHOW_SUCCESSES; to comment out the request to show test successes. Recompile, reload and run the tests again NOTE: Under some circumstances you can rebuild the project and then run the code but then get the VDSP message "project is out of date -- do you want to rebuild". Say yes to this message. However if, after you rebuild, you get the same message "project is out of date -- do you want to rebuild" again. Just say NO. This problem has been reported to Analog Devices.

9 Remember to check the cable and logic lab. settings Common Errors experienced in the Labs. An issue sometimes found when debugging code in any processor development system The first couple of times, I ran the test, the code stopped unexpectedly at a "ghost breakpoint" before completing. Ghost breakpoints are breakpoints left over from a previous debug session If this happens to you -- select DEBUG RUN again, to cause the code to continue. Sometimes there seem to be an "infinite" number of ghost breakpoints to clear, especially after you have found many errors in your code. In this case you need to "clean" the environment. (A) Close the GUI; (B) Exit from VDSP entirely. (C) Power down the evaluation board (D) Power up the evaluation board (E) Reactivate VDSP (F) Reactivate the GUI Common error messages from VDSP (especially when starting up) Unspecified error: Normally, for me, it means that I have activated 2 VDSP sessions rather than 1. Solution 1: Close down the second accidentally opened VDSP Blackfin session. Click on the thumb-nail see a typical screen Solution 2: Sometimes you get this message and there is only one VDSP session "present", especially after horribly crashing the system. In this case, there is a "hidden" VDSP session running. Notice that there is both a "Analog Devices" and a "VisualDSP" icon in Fig. 1, only the "Analog Devices" in Fig. 2, and multiple icons later in the process You need to close the VDSP session you have just started, and then kill the hidden VDSP session via the task manager. Kill the Blackfin "IDDE.EXE" process NOTE: Under some circumstances you can rebuild the project and then run the code but then get the VDSP message "project is out of date -- do you want to rebuild". Say yes to this message. However if, after you rebuild, you get the same message "project is out of date -- do you want to rebuild" again. Just say NO. This problem has been reported to Analog Devices.

10 %20flash%20memory.htm Lab 1 Task 5 -- Automated testing procedure for the code InitFlashASM( ), InitFlashPortASM( ), WriteFlashLEDASM( int value), int ReadFlashLEDASM( ). Using a test first development approach (TDD), we need to add tests for the Flash Memory interface void InitFlashASM(void ), void InitFlashPortASM(void ), void WriteFlashLEDASM( int value), int ReadFlashLEDASM(void). Add the following files to your Lab1Tests Directory and then into the Lab1Tests project Lab1FlashTests.cpp Lab1FlashTests_EUNITFunctionality.cpp // You might want to "exclude this file from the build" when you start testing. Bring it back when all the simple tests are working. Select "Refresh test connection" from the new E-UNIT VDSP menu options Build the tests. The compiler will tell you the name of the functions you need to construct. Build the ASM stubs for those functions and place into your Lab1 directory InitFlashASM( ) in InitFlashASM.asm InitFlashPortASM( ) in InitFlashPortASM.asm WriteFlashLEDASM( int value) in WriteFlashLEDASM.asm int ReadFlashLEDASM( ) in ReadFlashLEDASM.asm Add these files to the Lab1Tests Project -- don't copy them into the Lab1Tests directory (making a second copy); you only want one version of any code. The screen should now look like this. Build and run the code. The tests should run, with many failures expected as no code is present. In fact, it is a sign of a "bad" test suite and "bad" stubs if any of the tests pass at this point in time. In Task 6, I will provide you with some hints for writing the Flash Memory Interface Code

11 Lab 1 Task 6 -- Automated testing procedure for the code InitFlashASM( ), InitFlashPortASM( ), WriteFlashLEDASM( int value), int ReadFlashLEDASM( ). Using a test first development approach (TDD), we have added the tests for the Flash Memory interface void InitFlashASM(void ), void InitFlashPortASM(void ), void WriteFlashLEDASM( int value), int ReadFlashLEDASM(void). Now we need to add the code. Here are some screen dumps to provide some hints if you want them InitFlashASM( ) hint Link to InitFlashASM( ) code InitFlashPortASM( ) hint -- fill in the lines marked?????

12 WriteFlashLEDASM( int value) hint -- fill in the lines marked????? Remember that this routine uses a passed in parameter int ReadFlashLEDASM( ) hint -- fill in the lines marked????? Code one function at a time, get the tests to work. Obviously some code must be written correctly (InitFlashASM( ) ) before other code will work. However the E-UNIT low level tests will give you confidence that you have written the code in the way you planned, and in a way that meets the Laboratory requirements. Provide copies of the working code for Task 6 in your laboratory write-up. Follow the coding conventions required for this course There is one, and only one, test that is incorrect in the tests I have provided. It is incorrect because of a bad coding practice -- defining the same constant in two different files rather than defining the constant in an "include file" and placing that include file in the other files In your laboratory write-up, report on this incorrect test -- why was it wrong and how did you fix it. Provide a screen dump of the code and tests results before fixing the error. Provide a screen dump of the code and tests results after fixing the error.

13 Also look at the details in class notes Lab 1 Task 7 -- Echo switches to the LEDs 1. Close the Lab1Tests project, we have finished with that for now. 2. Open your Lab1 project 3. Edit Lab1main.cpp to use the new routines you have developed -- the following code can be cut and pasted. Do a code review so that you understand what the code does and be able to generate similar code for quizzes and exams. There are a couple of typos in the code which can be found by doing the code review. // Prototypes etc void Initialize_GPIOFlagsASM(void); unsigned short int ReadGPIOFlagsASM(void); #define SWITCHES_MASK 0x0F00 // Only GPIO bits 8, 9, 10 and 11 considered #define SW1_PRESSED 0x0100 #define SW2_PRESSED 0x0200 #define SW3_PRESSED 0x0400 // NOTE 0x0400 and not 0x0300 #define SW4_PRESSED 0x0800 // NOTE 0x0800 and not 0x0400 void InitFlashASM(void); void InitFlashPortASM(void); void WriteFlashLEDASM( int value); int ReadFlashLEDASM(void); InitFlashASM( ); InitFlashPortASM( ); // The "C++" and "C" keyword volatile will be explained in class volatile unsigned short int switch_result = 0; while (1) { switch_result = ReadGPIOFlagsASM & SWITCHES_MASK; // Read the switches switch_result = switch_result >> 8; // Why do we need to "down-shift by 8" and not by 24? WriteFlashLEDASM(switch_result); } 4. Once the code in 3 is working, modify the code so that you continue echoing the switches to the lights, but can quit the loop, and exit the program properly, when you press all switches at once (about 2 lines of code need to be changed). Completing this laboratory task is a major milestone Get a T. A., L. A. or instructor to sign off that you have completed and demonstrated this milestone -- 80% (A- grade) of the laboratory is complete

14 m Lab 1 Task 8 -- Morse code This is your design component -- you do it the way you think best. When I wrote up the laboratories, I was thinking of something along these lines -- Might not be the best approach char message[ ] = "SOS - My ENCM415 Laboratory is sinking"; char *letterpointer = message char morsecode[15]; while (*letterpointer!= '\0') { // Find end of string value and then quit GetMorseValueCPP(*letterPointer, morsecode); // Array for coding the letter S looks like 'S', 'S', 'S', '\0' // Array for coding the letter O looks like 'L', 'L', 'L', '\0' // I was going to use a lookup table built from an array of arrays char *morsecodepointer = morsecode; while (*morsecodepointer!= '\0') { if (*morsecodepointer == 'L') { // Long morse code flash WriteFlashLEDASM(0x3F); WaitForLongTimeCPP( ); WriteFlashLEDASM(0x0); // Turn light off for a reasonable time WaitForReasonableTime(CPP ); } else { WriteFlashLEDASM(0x7); // SHort morse code flash WaitForShortTimeCPP( ); WriteFlashLEDASM(0x0); // Turn light off for a reasonable time WaitForReasonableTimeCPP( ); } morsecodepointer++; } letterpointer ++; Next letter } This is a major milestone -- get a T. A., L. A. or instructor to sign off that you have completed and demonstrated this milestone -- 15% of remaining 20% (totally A+ grade) of the laboratory is complete. Provide a copy of your code for this task in your laboratory report. BONUS 20% on the Laboratory marks -- use a TDD approach for developing the CPP functions associated with this task. Demonstrate the tests.

15 r%20code%20really%20work.htm Lab. 1 Task 9 -- Does your code really work This is a 5 minute job. Yes, we have done all the tests, but the real test is "does the code work when you add it to existing code -- integration testing Go to the directory TalkThroughCode - Lab1Tasks1and2 used in Task 1 T1 - Test CPPTalkthrough. Check the code "still" works -- meaning you can hear the sound. Close the project and open the DoesYourCodeReallyWork.dpj project in the same TalkThroughCode - Lab1Tasks1and2 directory. The difference between the two projects is that in TalkThroughCode - Lab1Tasks1and2.dpj the main.cpp file looks like this while (1) ; and in DoesYourCodeReallyWork.dpj the while-loop is replaced with the code from T7 - Echo switches to LED void Initialize_GPIOFlagsASM(void); unsigned short int ReadGPIOFlagsASM(void); #define SWITCHES_MASK 0x0F00 // Only GPIO bits 8, 9, 10 and 11 considered #define SW1_PRESSED 0x0100 #define SW2_PRESSED 0x0200 #define SW3_PRESSED 0x0400 // NOTE 0x0400 and not 0x0300 #define SW4_PRESSED 0x0800 // NOTE 0x0800 and not 0x0400 void InitFlashASM(void); void InitFlashPortASM(void); void WriteFlashLEDASM( int value); int ReadFlashLEDASM(void); InitFlashASM( ); InitFlashPortASM( ); volatile unsigned short int switch_result = 0; while (1) { switch_result = ReadGPIOFlagsASM & SWITCHES_MASK; // Read the switches switch_result = switch_result >> 8; // Why do we need to "down-shift by 8" and not by 24? WriteFlashLEDASM(switch_result); } The compiler, by using the details provided by the project,, will pick up all the necessary files from Lab. 1 directory. Rebuild and run the code. IF YOU CAN RUN THE CODE without making any changes to your Lab. 1 code, and hear the sound while pressing the switches and make the lights operate at the same time, I am impressed. If you can't hear the sound, then try commenting out the line InitFlashASM( );, and if that does not work comment out the line InitFlashPortASM( ); Often the problem is that the sound interface and the LED interface are both operating using the Flash memory interface screwing up each other's settings. Alternatively, a common problem is that when you merge to setes of code -- you forgot one piece of the code

16 Write a short paragraph in your laboratory report explaining your findings and how you fixed your code to work 5%. (Note, the T.A.'s know what the error is, 1 line of code, so don't fake it :-)

Getting the O in I/O to work on a typical microcontroller

Getting the O in I/O to work on a typical microcontroller 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 used in the Familiarization Lab Agenda Processors

More information

Getting the O in I/O to work on a typical microcontroller

Getting the O in I/O to work on a typical microcontroller 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 used in the Familiarization Lab Agenda Processors

More information

Automated Testing Environment

Automated Testing Environment Automated Testing Environment Concepts required for testing embedded systems adopted in this course (quizzes, assignments and laboratories) 1 To be tackled today Why test, and what kinds of tests are there?

More information

TigerSHARC processor and evaluation board

TigerSHARC processor and evaluation board Concepts tackled TigerSHARC processor and evaluation board Different capabilities Different functionality Differences between processor and evaluation board Functionality present on TigerSHARC evaluation

More information

ENCM511 Assignment 1 Version 16 September 2012

ENCM511 Assignment 1 Version 16 September 2012 ENCM511 Assignment 1 Version 16 September 2012 This is an individual assignment, essentially a take home quiz. This means the purpose behind this assignment is for YOU to show the skills learnt during

More information

Building a COFFEE POT simulation on CCESS for Blackfin BF533

Building a COFFEE POT simulation on CCESS for Blackfin BF533 Building a COFFEE POT simulation on CCESS 2.6.0 for Blackfin BF533 Last lecture covered some detailed ideas Let step back and do something simpler to get an introduction of ideas needed for Lab0 and Assignment

More information

Introduction to Test Driven Development (To be used throughout the course)

Introduction to Test Driven Development (To be used throughout the course) Introduction to Test Driven Development (To be used throughout the course) Building tests and code for a software radio Concepts Stages in a conventional radio Stages in a software radio Goals for the

More information

Introduction to Lab. 3

Introduction to Lab. 3 Solving a Lab 1 Issue Introduction to Lab. 3 Also includes Solving a Lab. 1 issues Using the graphics LCD with your assignment 1 Rediscuss the Watchdog timer for Assignment 2 Many people have said My Enable

More information

Test driven development Example

Test driven development Example Test driven development Example Developing a moving average filter that can be tested using the EUNIT plug in REVIEW Using the E UNIT testing Framework Activate CCES and select your workspace (H:/ENCM511

More information

CS 1110, LAB 3: MODULES AND TESTING First Name: Last Name: NetID:

CS 1110, LAB 3: MODULES AND TESTING   First Name: Last Name: NetID: CS 1110, LAB 3: MODULES AND TESTING http://www.cs.cornell.edu/courses/cs11102013fa/labs/lab03.pdf First Name: Last Name: NetID: The purpose of this lab is to help you better understand functions, and to

More information

NO CALCULATORS ARE ALLOWED IN THIS EXAM

NO CALCULATORS ARE ALLOWED IN THIS EXAM Department of Electrical and Computer Engineering, University of Calgary ENCM415 DECEMBER 18 th, 2001 3 HOURS NAME:- ID#:- PLEASE WRITE CLEARLY. USE AN HB GRADE OR SOFTER (DARKER) PENCIL! WHAT I CAN=T

More information

Microprocessor or Microcontroller Not just a case of you say tomarto and I say tomayto

Microprocessor or Microcontroller Not just a case of you say tomarto and I say tomayto Microprocessor or Microcontroller Not just a case of you say tomarto and I say tomayto Discussion of the capabilities of the Analog Devices ADSP-5333 Evaluation Board used in this course M. Smith, ECE

More information

Table of Contents. ENCM511 Assignment 1 Marking Scheme Want to drive the real car on the A301 track later in the term. It can be arranged, but

Table of Contents. ENCM511 Assignment 1 Marking Scheme Want to drive the real car on the A301 track later in the term. It can be arranged, but Assignment 1 V3 Final 1 st October 2013 P age 1 Assignment 1 V3 Final 1 st October 2013 P age 2 YOUR NAME LAB. Section Table of Contents ENCM511 Assignment 1 V2 We shall drive a virtual car during this

More information

Microprocessor or Microcontroller Not just a case of you say tomarto and I say tomayto

Microprocessor or Microcontroller Not just a case of you say tomarto and I say tomayto Microprocessor or Microcontroller Not just a case of you say tomarto and I say tomayto Discussion of the capabilities of the Analog Devices ADSP-5333 Evaluation Board used in this course M. Smith, ECE

More information

Generating Rectify( ) Test driven development approach to TigerSHARC

Generating Rectify( ) Test driven development approach to TigerSHARC Generating Rectify( ) Test driven development approach to TigerSHARC assembly code production Assembly code examples Part 1 of 3 Concepts Concepts of C++ stubs Forcing the test to fail test of test Generating

More information

QUIZ How do we implement run-time constants and. compile-time constants inside classes?

QUIZ How do we implement run-time constants and. compile-time constants inside classes? QUIZ How do we implement run-time constants and compile-time constants inside classes? Compile-time constants in classes The static keyword inside a class means there s only one instance, regardless of

More information

IMASK FIO_FLAG_S FIO_DIR SIC_IMASK FIO_EDGE FIO_POLAR ILAT FIO_BOTH TCOUNT FIO_FLAG_D FIO_ENEN PF_STATUS_D

IMASK FIO_FLAG_S FIO_DIR SIC_IMASK FIO_EDGE FIO_POLAR ILAT FIO_BOTH TCOUNT FIO_FLAG_D FIO_ENEN PF_STATUS_D SECTION B -- ATTEMPT NO MORE THAN 2 QUESTIONS These are open-ended questions and you may be required to make some educated, engineering relevant, design decisions. Only the first two answers to questions

More information

Boot Camp. Dave Eckhardt Bruce Maggs

Boot Camp. Dave Eckhardt Bruce Maggs Boot Camp Dave Eckhardt de0u@andrew.cmu.edu Bruce Maggs bmm@cs.cmu.edu 1 This Is a Hard Class Traditional hazards 410 letter grade one lower than other classes All other classes this semester: one grade

More information

A look at interrupts Dispatch_Tasks ( )

A look at interrupts Dispatch_Tasks ( ) SHOWS WHERE S FIT IN A look at interrupts Dispatch_Tasks ( ) What are interrupts and why are they needed in an embedded system? Equally as important how are these ideas handled on the Blackfin Assignment

More information

CS354 gdb Tutorial Written by Chris Feilbach

CS354 gdb Tutorial Written by Chris Feilbach CS354 gdb Tutorial Written by Chris Feilbach Purpose This tutorial aims to show you the basics of using gdb to debug C programs. gdb is the GNU debugger, and is provided on systems that

More information

Blackfin Online Learning & Development

Blackfin Online Learning & Development Presentation Title: Multimedia Starter Kit Presenter Name: George Stephan Chapter 1: Introduction Sub-chapter 1a: Overview Chapter 2: Blackfin Starter Kits Sub-chapter 2a: What is a Starter Kit? Sub-chapter

More information

Mechatronics Laboratory Assignment 2 Serial Communication DSP Time-Keeping, Visual Basic, LCD Screens, and Wireless Networks

Mechatronics Laboratory Assignment 2 Serial Communication DSP Time-Keeping, Visual Basic, LCD Screens, and Wireless Networks Mechatronics Laboratory Assignment 2 Serial Communication DSP Time-Keeping, Visual Basic, LCD Screens, and Wireless Networks Goals for this Lab Assignment: 1. Introduce the VB environment for PC-based

More information

Learning Objectives. A Meta Comment. Exercise 1. Contents. From CS61Wiki

Learning Objectives. A Meta Comment. Exercise 1. Contents. From CS61Wiki From CS61Wiki Contents 1 Learning Objectives 2 A Meta Comment 3 Exercise 1 3.1 Questions 3.2 Running code and using GDB 3.3 Compiler Optimizations 3.4 hexdump: a handy function 3.4.1 Questions 3.5 Checkpoint

More information

(0) introduction to the course. how to learn a programming language. (0) course structure

(0) introduction to the course. how to learn a programming language. (0) course structure topics: (0) introduction to the course (1) what is a computer? instructor: cis1.5 introduction to computing using c++ (robotics applications) spring 2008 lecture # I.1 introduction Prof Azhar, mqazhar@sci.brooklyn.cuny.edu

More information

If we can just send 1 signal correctly over the SPI MOSI line, then Lab 4 will work!!!

If we can just send 1 signal correctly over the SPI MOSI line, then Lab 4 will work!!! If we can just send 1 signal correctly over the SPI MOSI line, then Lab 4 will work!!! Design and implementation details on the way to a valid SPI-LCD interface driver Slides 3 to 13 are old versions of

More information

Lab. 2 Overview. Echo Switches to LED to test LEDs and Switches. How would you handle a more complex set of embedded tests

Lab. 2 Overview. Echo Switches to LED to test LEDs and Switches. How would you handle a more complex set of embedded tests Lab. 2 Overview Echo Switches to LED to test LEDs and Switches volatile unsigned char GPIOvalue; // In embedded systems ALL Global variable must be // made volatile (change-able) to reflect they are //

More information

Lab 4: Interrupts and Realtime

Lab 4: Interrupts and Realtime Lab 4: Interrupts and Realtime Overview At this point, we have learned the basics of how to write kernel driver module, and we wrote a driver kernel module for the LCD+shift register. Writing kernel driver

More information

Code::Blocks Student Manual

Code::Blocks Student Manual Code::Blocks Student Manual Lawrence Goetz, Network Administrator Yedidyah Langsam, Professor and Theodore Raphan, Distinguished Professor Dept. of Computer and Information Science Brooklyn College of

More information

ECE 2036 Lab 4 Setup and Test mbed I/O Hardware Check-Off Deadline: Thursday, March 17, Name:

ECE 2036 Lab 4 Setup and Test mbed I/O Hardware Check-Off Deadline: Thursday, March 17, Name: ECE 2036 Lab 4 Setup and Test mbed I/O Hardware Check-Off Deadline: Thursday, March 17, 2016 Name: Item Part 1. (40%) Color LCD Hello World Part 2. (10%) Timer display on Color LCD Part 3. (25%) Temperature

More information

Microcontroller Not just a case of you say tomarto and I say tomayto

Microcontroller Not just a case of you say tomarto and I say tomayto Microprocessor or Microcontroller Not just a case of you say tomarto and I say tomayto M. Smith, ECE University of Calgary, Canada Information taken from Analog Devices On-line Manuals with permission

More information

Tips from the experts: How to waste a lot of time on this assignment

Tips from the experts: How to waste a lot of time on this assignment Com S 227 Spring 2018 Assignment 1 100 points Due Date: Friday, September 14, 11:59 pm (midnight) Late deadline (25% penalty): Monday, September 17, 11:59 pm General information This assignment is to be

More information

Compiling with Multiple Files The Importance of Debugging CS 16: Solving Problems with Computers I Lecture #7

Compiling with Multiple Files The Importance of Debugging CS 16: Solving Problems with Computers I Lecture #7 Compiling with Multiple Files The Importance of Debugging CS 16: Solving Problems with Computers I Lecture #7 Ziad Matni Dept. of Computer Science, UCSB Programming in Multiple Files The Magic of Makefiles!

More information

Tips from the experts: How to waste a lot of time on this assignment

Tips from the experts: How to waste a lot of time on this assignment Com S 227 Spring 2018 Assignment 1 80 points Due Date: Friday, February 2, 11:59 pm (midnight) Late deadline (25% penalty): Monday, February 5, 11:59 pm General information This assignment is to be done

More information

A function is a named piece of code that performs a specific task. Sometimes functions are called methods, procedures, or subroutines (like in LC-3).

A function is a named piece of code that performs a specific task. Sometimes functions are called methods, procedures, or subroutines (like in LC-3). CIT Intro to Computer Systems Lecture # (//) Functions As you probably know from your other programming courses, a key part of any modern programming language is the ability to create separate functions

More information

GE420 Laboratory Assignment 3 More SYS/BIOS

GE420 Laboratory Assignment 3 More SYS/BIOS GE420 Laboratory Assignment 3 More SYS/BIOS Goals for this Lab Assignment: 1. Introduce Software Interrupt Objects (Swis) 2. Introduce 2 X 20 character LCD functions. 3. Investigate an issue with 32 bit

More information

Debugging uclinux on Coldfire

Debugging uclinux on Coldfire Debugging uclinux on Coldfire By David Braendler davidb@emsea-systems.com What is uclinux? uclinux is a version of Linux for CPUs without virtual memory or an MMU (Memory Management Unit) and is typically

More information

RIS shading Series #2 Meet The Plugins

RIS shading Series #2 Meet The Plugins RIS shading Series #2 Meet The Plugins In this tutorial I will be going over what each type of plugin is, what their uses are, and the basic layout of each. By the end you should understand the three basic

More information

We first learn one useful option of gcc. Copy the following C source file to your

We first learn one useful option of gcc. Copy the following C source file to your Lecture 5 p.1 Faculty of Computer Science, Dalhousie University CSCI 2132 Software Development Lab 5: gcc and gdb tools 10-Oct-2018 Location: Teaching Labs Time: Thursday Instructor: Vlado Keselj Lab 5:

More information

CSC 258 lab notes, Fall 2003

CSC 258 lab notes, Fall 2003 CSC 258 lab notes, Fall 2003 Instructor: E. R. C. Hehner Lab demonstrators: Nicolas Kokkalis, Andrés Lagar Cavilla Successful completion of the three graded labs in this course involves a significant amount

More information

In examining performance Interested in several things Exact times if computable Bounded times if exact not computable Can be measured

In examining performance Interested in several things Exact times if computable Bounded times if exact not computable Can be measured System Performance Analysis Introduction Performance Means many things to many people Important in any design Critical in real time systems 1 ns can mean the difference between system Doing job expected

More information

Using the KD30 Debugger

Using the KD30 Debugger ELEC3730 Embedded Systems Tutorial 3 Using the KD30 Debugger 1 Introduction Overview The KD30 debugger is a powerful software tool that can greatly reduce the time it takes to develop complex programs

More information

Laboratory 2: Programming Basics and Variables. Lecture notes: 1. A quick review of hello_comment.c 2. Some useful information

Laboratory 2: Programming Basics and Variables. Lecture notes: 1. A quick review of hello_comment.c 2. Some useful information Laboratory 2: Programming Basics and Variables Lecture notes: 1. A quick review of hello_comment.c 2. Some useful information 3. Comment: a. name your program with extension.c b. use o option to specify

More information

2 Getting Started. Getting Started (v1.8.6) 3/5/2007

2 Getting Started. Getting Started (v1.8.6) 3/5/2007 2 Getting Started Java will be used in the examples in this section; however, the information applies to all supported languages for which you have installed a compiler (e.g., Ada, C, C++, Java) unless

More information

CS1110 Lab 1 (Jan 27-28, 2015)

CS1110 Lab 1 (Jan 27-28, 2015) CS1110 Lab 1 (Jan 27-28, 2015) First Name: Last Name: NetID: Completing this lab assignment is very important and you must have a CS 1110 course consultant tell CMS that you did the work. (Correctness

More information

DE2 Electronic Keyboard ReadMeFirst

DE2 Electronic Keyboard ReadMeFirst DE2 Electronic Keyboard ReadMeFirst Lab Summary: In this lab, you will implement a two-tone electronic keyboard using the waveform synthesizer design from the previous lab. This lab is divided into two

More information

Project Data: Manipulating Bits

Project Data: Manipulating Bits CSCI0330 Intro Computer Systems Doeppner Project Data: Manipulating Bits Due: September 26, 2018 at 11:59pm 1 Introduction 1 2 Assignment 1 2.1 Collaboration 3 2.2 TA Hours 3 3 The Puzzles 3 3.1 Bit Manipulations

More information

Lab 3-2: Exploring the Heap

Lab 3-2: Exploring the Heap Lab 3-2: Exploring the Heap Objectives Become familiar with the Windows Embedded CE 6.0 heap Prerequisites Completed Lab 2-1 Estimated time to complete this lab: 30 minutes Lab Setup To complete this lab,

More information

Lab 1 Implementing a Simon Says Game

Lab 1 Implementing a Simon Says Game ECE2049 Embedded Computing in Engineering Design Lab 1 Implementing a Simon Says Game In the late 1970s and early 1980s, one of the first and most popular electronic games was Simon by Milton Bradley.

More information

How to approach a computational problem

How to approach a computational problem How to approach a computational problem A lot of people find computer programming difficult, especially when they first get started with it. Sometimes the problems are problems specifically related to

More information

EE475 Lab #3 Fall Memory Placement and Interrupts

EE475 Lab #3 Fall Memory Placement and Interrupts EE475 Lab #3 Fall 2005 Memory Placement and Interrupts In this lab you will investigate the way in which the CodeWarrior compiler and linker interact to place your compiled code and data in the memory

More information

Getting started with UNIX/Linux for G51PRG and G51CSA

Getting started with UNIX/Linux for G51PRG and G51CSA Getting started with UNIX/Linux for G51PRG and G51CSA David F. Brailsford Steven R. Bagley 1. Introduction These first exercises are very simple and are primarily to get you used to the systems we shall

More information

Cypress FM4 Tools Set-up with Keil 5.x

Cypress FM4 Tools Set-up with Keil 5.x Introduction Mark Wickert, 9/4/16, Revised 1/28/19 This document will describe the details of setting up your own system with the ARM IDE Keil, and software drivers that support the Cypress FM4 board.

More information

2 ABOUT VISUALDSP++ In This Chapter. Figure 2-0. Table 2-0. Listing 2-0.

2 ABOUT VISUALDSP++ In This Chapter. Figure 2-0. Table 2-0. Listing 2-0. 2 ABOUT VISUALDSP++ Figure 2-0. Table 2-0. Listing 2-0. In This Chapter This chapter contains the following topics: What Is VisualDSP++? on page 2-2 VisualDSP++ Features on page 2-2 Program Development

More information

RVDS 4.0 Introductory Tutorial

RVDS 4.0 Introductory Tutorial RVDS 4.0 Introductory Tutorial 402v02 RVDS 4.0 Introductory Tutorial 1 Introduction Aim This tutorial provides you with a basic introduction to the tools provided with the RealView Development Suite version

More information

LAB 7 Writing Assembly Code

LAB 7 Writing Assembly Code Goals To Do LAB 7 Writing Assembly Code Learn to program a processor at the lowest level. Implement a program that will be used to test your own MIPS processor. Understand different addressing modes of

More information

Exploring UNIX: Session 5 (optional)

Exploring UNIX: Session 5 (optional) Exploring UNIX: Session 5 (optional) Job Control UNIX is a multi- tasking operating system, meaning you can be running many programs simultaneously. In this session we will discuss the UNIX commands for

More information

Slide Set 1. for ENCM 339 Fall Steve Norman, PhD, PEng. Electrical & Computer Engineering Schulich School of Engineering University of Calgary

Slide Set 1. for ENCM 339 Fall Steve Norman, PhD, PEng. Electrical & Computer Engineering Schulich School of Engineering University of Calgary Slide Set 1 for ENCM 339 Fall 2016 Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary September 2016 ENCM 339 Fall 2016 Slide Set 1 slide 2/43

More information

Introduction to Programming in C Department of Computer Science and Engineering. Lecture No. #29 Arrays in C

Introduction to Programming in C Department of Computer Science and Engineering. Lecture No. #29 Arrays in C Introduction to Programming in C Department of Computer Science and Engineering Lecture No. #29 Arrays in C (Refer Slide Time: 00:08) This session will learn about arrays in C. Now, what is the word array

More information

Oregon State University School of Electrical Engineering and Computer Science. CS 261 Recitation 1. Spring 2011

Oregon State University School of Electrical Engineering and Computer Science. CS 261 Recitation 1. Spring 2011 Oregon State University School of Electrical Engineering and Computer Science CS 261 Recitation 1 Spring 2011 Outline Using Secure Shell Clients GCC Some Examples Intro to C * * Windows File transfer client:

More information

The NetBeans IDE is a big file --- a minimum of around 30 MB. After you have downloaded the file, simply execute the file to install the software.

The NetBeans IDE is a big file --- a minimum of around 30 MB. After you have downloaded the file, simply execute the file to install the software. Introduction to Netbeans This document is a brief introduction to writing and compiling a program using the NetBeans Integrated Development Environment (IDE). An IDE is a program that automates and makes

More information

Arduino IDE Friday, 26 October 2018

Arduino IDE Friday, 26 October 2018 Arduino IDE Friday, 26 October 2018 12:38 PM Looking Under The Hood Of The Arduino IDE FIND THE ARDUINO IDE DOWNLOAD First, jump on the internet with your favorite browser, and navigate to www.arduino.cc.

More information

Laboratory 1 Semester 1 11/12

Laboratory 1 Semester 1 11/12 CS2106 National University of Singapore School of Computing Laboratory 1 Semester 1 11/12 MATRICULATION NUMBER: In this lab exercise, you will get familiarize with some basic UNIX commands, editing and

More information

Lab 8. Follow along with your TA as they demo GDB. Make sure you understand all of the commands, how and when to use them.

Lab 8. Follow along with your TA as they demo GDB. Make sure you understand all of the commands, how and when to use them. Lab 8 Each lab will begin with a recap of last lab and a brief demonstration by the TAs for the core concepts examined in this lab. As such, this document will not serve to tell you everything the TAs

More information

Unit. Programming Fundamentals. School of Science and Technology INTRODUCTION

Unit. Programming Fundamentals. School of Science and Technology INTRODUCTION INTRODUCTION Programming Fundamentals Unit 1 In order to communicate with each other, we use natural languages like Bengali, English, Hindi, Urdu, French, Gujarati etc. We have different language around

More information

ECGR 4101/5101, Fall 2016: Lab 1 First Embedded Systems Project Learning Objectives:

ECGR 4101/5101, Fall 2016: Lab 1 First Embedded Systems Project Learning Objectives: ECGR 4101/5101, Fall 2016: Lab 1 First Embedded Systems Project Learning Objectives: This lab will introduce basic embedded systems programming concepts by familiarizing the user with an embedded programming

More information

Preprocessor Directives

Preprocessor Directives C++ By 6 EXAMPLE Preprocessor Directives As you might recall from Chapter 2, What Is a Program?, the C++ compiler routes your programs through a preprocessor before it compiles them. The preprocessor can

More information

BASICS OF THE RENESAS SYNERGY PLATFORM

BASICS OF THE RENESAS SYNERGY PLATFORM BASICS OF THE RENESAS SYNERGY PLATFORM TM Richard Oed 2017.12 02 CHAPTER 9 INCLUDING A REAL-TIME OPERATING SYSTEM CONTENTS 9 INCLUDING A REAL-TIME OPERATING SYSTEM 03 9.1 Threads, Semaphores and Queues

More information

RVDS 3.0 Introductory Tutorial

RVDS 3.0 Introductory Tutorial RVDS 3.0 Introductory Tutorial 338v00 RVDS 3.0 Introductory Tutorial 1 Introduction Aim This tutorial provides you with a basic introduction to the tools provided with the RealView Development Suite version

More information

Getting Started with Visual Studio

Getting Started with Visual Studio Getting Started with Visual Studio Visual Studio is a sophisticated but easy to use integrated development environment (IDE) for C++ (and may other languages!) You will see that this environment recognizes

More information

Code::Blocks Student Manual

Code::Blocks Student Manual Code::Blocks Student Manual Lawrence Goetz, Network Administrator Yedidyah Langsam, Professor and Theodore Raphan, Distinguished Professor Dept. of Computer and Information Science Brooklyn College of

More information

C++ Reference NYU Digital Electronics Lab Fall 2016

C++ Reference NYU Digital Electronics Lab Fall 2016 C++ Reference NYU Digital Electronics Lab Fall 2016 Updated on August 24, 2016 This document outlines important information about the C++ programming language as it relates to NYU s Digital Electronics

More information

Viewing the tm4c123gh6pm_startup_ccs.c file, the first piece of code we see after the comments is shown in Figure 1.

Viewing the tm4c123gh6pm_startup_ccs.c file, the first piece of code we see after the comments is shown in Figure 1. Viewing the tm4c123gh6pm_startup_ccs.c file, the first piece of code we see after the comments is shown in Figure 1. Figure 1 Forward declaration for the default handlers These are the forward declarations,

More information

Lab 3a: Scheduling Tasks with uvision and RTX

Lab 3a: Scheduling Tasks with uvision and RTX COE718: Embedded Systems Design Lab 3a: Scheduling Tasks with uvision and RTX 1. Objectives The purpose of this lab is to lab is to introduce students to uvision and ARM Cortex-M3's various RTX based Real-Time

More information

ENCM 339 Fall 2017: Editing and Running Programs in the Lab

ENCM 339 Fall 2017: Editing and Running Programs in the Lab page 1 of 8 ENCM 339 Fall 2017: Editing and Running Programs in the Lab Steve Norman Department of Electrical & Computer Engineering University of Calgary September 2017 Introduction This document is a

More information

Problem Set 1: Unix Commands 1

Problem Set 1: Unix Commands 1 Problem Set 1: Unix Commands 1 WARNING: IF YOU DO NOT FIND THIS PROBLEM SET TRIVIAL, I WOULD NOT RECOMMEND YOU TAKE THIS OFFERING OF 300 AS YOU DO NOT POSSESS THE REQUISITE BACKGROUND TO PASS THE COURSE.

More information

ICOM 4015 Advanced Programming Laboratory. Chapter 1 Introduction to Eclipse, Java and JUnit

ICOM 4015 Advanced Programming Laboratory. Chapter 1 Introduction to Eclipse, Java and JUnit ICOM 4015 Advanced Programming Laboratory Chapter 1 Introduction to Eclipse, Java and JUnit University of Puerto Rico Electrical and Computer Engineering Department by Juan E. Surís 1 Introduction This

More information

BASICS OF THE RENESAS SYNERGY TM

BASICS OF THE RENESAS SYNERGY TM BASICS OF THE RENESAS SYNERGY TM PLATFORM Richard Oed 2018.11 02 CHAPTER 9 INCLUDING A REAL-TIME OPERATING SYSTEM CONTENTS 9 INCLUDING A REAL-TIME OPERATING SYSTEM 03 9.1 Threads, Semaphores and Queues

More information

Note: This is a miniassignment and the grading is automated. If you do not submit it correctly, you will receive at most half credit.

Note: This is a miniassignment and the grading is automated. If you do not submit it correctly, you will receive at most half credit. Com S 227 Fall 2017 Miniassignment 1 50 points Due Date: Monday, October 16, 11:59 pm (midnight) Late deadline (25% penalty): Tuesday, October 17, 11:59 pm General information This assignment is to be

More information

Lesson 1A - First Java Program HELLO WORLD With DEBUGGING examples. By John B. Owen All rights reserved 2011, revised 2015

Lesson 1A - First Java Program HELLO WORLD With DEBUGGING examples. By John B. Owen All rights reserved 2011, revised 2015 Lesson 1A - First Java Program HELLO WORLD With DEBUGGING examples By John B. Owen All rights reserved 2011, revised 2015 Table of Contents Objectives Hello World Lesson Sequence Compile Errors Lexical

More information

CPS109 Lab 1. i. To become familiar with the Ryerson Computer Science laboratory environment.

CPS109 Lab 1. i. To become familiar with the Ryerson Computer Science laboratory environment. CPS109 Lab 1 Source: Partly from Big Java lab1, by Cay Horstmann. Objective: i. To become familiar with the Ryerson Computer Science laboratory environment. ii. To obtain your login id and to set your

More information

Programming Assignment #4 Writing a simple parallel port device driver

Programming Assignment #4 Writing a simple parallel port device driver Programming Assignment #4 Writing a simple parallel port device driver Value: (See the Grading section of the Syllabus.) Due Date and Time: (See the Course Calendar.) Summary: This is your second exercise

More information

6.170 Laboratory in Software Engineering Java Style Guide. Overview. Descriptive names. Consistent indentation and spacing. Page 1 of 5.

6.170 Laboratory in Software Engineering Java Style Guide. Overview. Descriptive names. Consistent indentation and spacing. Page 1 of 5. Page 1 of 5 6.170 Laboratory in Software Engineering Java Style Guide Contents: Overview Descriptive names Consistent indentation and spacing Informative comments Commenting code TODO comments 6.170 Javadocs

More information

Reliable programming

Reliable programming Reliable programming How to write programs that work Think about reliability during design and implementation Test systematically When things break, fix them correctly Make sure everything stays fixed

More information

CSE 101 Introduction to Computers Development / Tutorial / Lab Environment Setup

CSE 101 Introduction to Computers Development / Tutorial / Lab Environment Setup CSE 101 Introduction to Computers Development / Tutorial / Lab Environment Setup Purpose: The purpose of this lab is to setup software that you will be using throughout the term for learning about Python

More information

Lab Assignment 5: Haptic Rendering

Lab Assignment 5: Haptic Rendering Haptics: Engineering Touch Allison Okamura Stanford University Autumn 2017 Lab Assignment 5: Haptic Rendering In this week's lab assignment, you will modify your program from last week in order to achieve

More information

QUIZ. What is wrong with this code that uses default arguments?

QUIZ. What is wrong with this code that uses default arguments? QUIZ What is wrong with this code that uses default arguments? Solution The value of the default argument should be placed in either declaration or definition, not both! QUIZ What is wrong with this code

More information

Forth for Education - 4E4th and 4E4th IDE

Forth for Education - 4E4th and 4E4th IDE Forth for Education - 4E4th and 4E4th IDE 1 Dirk Bruehl Dirk@4E4th.eu http://www.4e4th.com First Steps with 4E4th Installing 4E4th on the MSP430-LaunchPad and on MicroBox using LP or the 6 wires. Documentation

More information

Tutorial: GNU Radio Companion

Tutorial: GNU Radio Companion Tutorials» Guided Tutorials» Previous: Introduction Next: Programming GNU Radio in Python Tutorial: GNU Radio Companion Objectives Create flowgraphs using the standard block libraries Learn how to debug

More information

Arduino 05: Digital I/O. Jeffrey A. Meunier University of Connecticut

Arduino 05: Digital I/O. Jeffrey A. Meunier University of Connecticut Arduino 05: Digital I/O Jeffrey A. Meunier jeffm@engr.uconn.edu University of Connecticut About: How to use this document I designed this tutorial to be tall and narrow so that you can read it on one side

More information

Chapter 2.6: Testing and running a solution

Chapter 2.6: Testing and running a solution Chapter 2.6: Testing and running a solution 2.6 (a) Types of Programming Errors When programs are being written it is not surprising that mistakes are made, after all they are very complicated. There are

More information

ENCM 369 Winter 2017 Lab 3 for the Week of January 30

ENCM 369 Winter 2017 Lab 3 for the Week of January 30 page 1 of 11 ENCM 369 Winter 2017 Lab 3 for the Week of January 30 Steve Norman Department of Electrical & Computer Engineering University of Calgary January 2017 Lab instructions and other documents for

More information

This is an open book, open notes exam. But no online or in-class chatting.

This is an open book, open notes exam. But no online or in-class chatting. Principles of Operating Systems Fall 2017 Final 12/13/2017 Time Limit: 8:00am - 10:00am Name (Print): Don t forget to write your name on this exam. This is an open book, open notes exam. But no online

More information

Hands-On with STM32 MCU Francesco Conti

Hands-On with STM32 MCU Francesco Conti Hands-On with STM32 MCU Francesco Conti f.conti@unibo.it Calendar (Microcontroller Section) 07.04.2017: Power consumption; Low power States; Buses, Memory, GPIOs 20.04.2017 21.04.2017 Serial Interfaces

More information

Lab 1 Implementing a Simon Says Game

Lab 1 Implementing a Simon Says Game ECE2049 Embedded Computing in Engineering Design Lab 1 Implementing a Simon Says Game In the late 1970s and early 1980s, one of the first and most popular electronic games was Simon by Milton Bradley.

More information

Overview. Lab 5 Methods and Parameters

Overview. Lab 5 Methods and Parameters Lab 5 Methods and Parameters Overview At this point in the course, you should have a set of skills which allow you to create functionality at the level of using control structures like if statements and

More information

Important From Last Time

Important From Last Time Important From Last Time Embedded C Pros and cons Macros and how to avoid them Intrinsics Interrupt syntax Inline assembly Today Advanced C What C programs mean How to create C programs that mean nothing

More information

Page 1. Today. Important From Last Time. Is the assembly code right? Is the assembly code right? Which compiler is right?

Page 1. Today. Important From Last Time. Is the assembly code right? Is the assembly code right? Which compiler is right? Important From Last Time Today Embedded C Pros and cons Macros and how to avoid them Intrinsics Interrupt syntax Inline assembly Advanced C What C programs mean How to create C programs that mean nothing

More information

C Language Programming, Interrupts and Timer Hardware

C Language Programming, Interrupts and Timer Hardware C Language Programming, Interrupts and Timer Hardware In this sequence of three labs, you will learn how to write simple C language programs for the MC9S12 microcontroller, and how to use interrupts and

More information

Slide 1 CS 170 Java Programming 1

Slide 1 CS 170 Java Programming 1 CS 170 Java Programming 1 Objects and Methods Performing Actions and Using Object Methods Slide 1 CS 170 Java Programming 1 Objects and Methods Duration: 00:01:14 Hi Folks. This is the CS 170, Java Programming

More information

Getting Started (1.8.7) 9/2/2009

Getting Started (1.8.7) 9/2/2009 2 Getting Started For the examples in this section, Microsoft Windows and Java will be used. However, much of the information applies to other operating systems and supported languages for which you have

More information