Presentation is loading. Please wait.

Presentation is loading. Please wait.

EE516: Embedded Software Project 1

Similar presentations


Presentation on theme: "EE516: Embedded Software Project 1"— Presentation transcript:

1 EE516: Embedded Software Project 1
EE516: Embedded Software Project 1. “Setting Up Environment for Projects” Dong Jae Shin, PhD student

2 Contents Introduction to Projects of EE516 Tasks
Setting Up Environment Virtual Machine Environment Ubuntu Linux OS Installation Environment for Development 1. Shell Script 2. Simple C Programming 3. Makefile Report Problems Source code submission & Screenshot General Grading Policy

3 Introduction to Projects
Project 1: Setting up Environment for Project “Development” Project Project 2: Linux Fundamental Project 3: System Call and Synchronization Project 4: File System Project 5: Device Driver for Embedded H/W Especially, including “BeagleBoard Development”

4 Environment Overview Through this course,,,
We will use Ubuntu LINUX as the base OS for the projects. Do we need new machine for Ubuntu LINUX? We usually use Windows OS for our own machine The answer is NO! We have “Virtual Machine Environment”! Such as VMware Player

5 Environment Overview What is “Virtual Machine Environment”?
Software Stack of “Virtual Machine Environment” Ubuntu (Guest OS) Others VMware Player (Virtualization Layer from VMware) Host OS (e.g. Windows) (Your host OS installed on the machine) Physical Resources of Your own machine (CPU, MEM, STORAGE, NETWORK ..)

6 Install Virtual Machine Monitor
“Virtual Machine Environment” Download VMware Player ( or ( Depends on your OS Windows-64bit Linux-64bit You need 64-bit Operating System. If you don’t have, please contact TA.

7 Install Virtual Machine Monitor
Install VMM Install the product following the instructions of the installer Installation Path Enter your Run VMware Player

8 Install Guest OS We’ll use Linux OS for Guest Linux
made by Linus Torvalds in 1991 Free software for replacing Unix Many usages - servers, desktops, mobile devices(Android) Linux Distributions Operating Systems based on Linux Kernel Linux Kernel : Core of Linux Scheduling, File System, Device Drivers System Software : Compilers, Libraries, User Interface User Program : Office, DB, Web Server, Web Browser, Mail …

9 Install Guest OS Download Ubuntu Linux
ubuntu desktop-amd64.iso or

10 Install Guest OS Create your own Virtual Machine
Select New Virtual Machine Downloaded File Path Login Password

11 Install Guest OS Virtual Machine Properties Disk Size : 20GB is enough
Need free space in HDD Main Memory Size for VM more than 1GB Number of processor for VM

12 Install Guest OS Initialize Ubuntu Desktop it takes several minutes.
log-in with your password open terminal (ctrl + alt + T)

13 Install Guest OS Get root account & password
root account : the highest level account for administrator It is needed when change system configuration install programs execute system-level program cannot reboot create root password you are the root now

14 Shell Script Shell Types of Shell A command line interpreter
Accepts input from the user Executes the command that is given Types of Shell Command Line Interface (CLI) shell Based on text Graphic User Interface (GUI) shell Based on graphic e.g. x-window system in linux CLI GUI

15 bash shell : Ubuntu default
Shell Script Various CLI Shells Bourne Shell (1977) == sh Developed by Steve AT&T Bell lab. First shell of UNIX system Bourne-again shell (1989) == bash Developed by Brain Fox Basis of shells on UNIX/LINUX type system Recent systems also use bash bourne shell (sh) bash shell : Ubuntu default

16 Shell Script CSH (C shell) TCSH (Tenex C shell) Developed by Bill Joy
C-language-like shell interpretation TCSH (Tenex C shell) Tenex: OS from Carnegie Mellon Univ. Enhanced version of CSH for Tenex system

17 Shell Script Command execution on Shell
ls : List information about file(s) cat : Display the contents of a file echo : Print string mkdir : Create new folder(s) rmdir : Remove folder(s) pwd : Display current directory cd : Change current directory cp : Copy one or more files to another location mv : Move or rename files or directories rm : Remove files

18 Writing a Shell Script Text Editor gedit : GUI based text editor
vi, vim : CLI based text editor apt-get install vim you can use any text editor install vim ubuntu:~$ gedit ubuntu:~$ vim test.sh

19 Writing a Shell Script Writing a Simple Script Shell Script Guide
$ vim test.sh or $ gedit test.sh save file $ chmod 755 test.sh $ ./test.sh $ ./test.sh something Shell Script Guide simple source code execution

20 tree -d

21 Writing a C Program Writing a C Program C Program Guide $ vim hello
or $ gedit hello.c save file $ gcc hello.c -o hello $ ./hello C Program Guide simple source code compile & execution

22 Make Utility Utility for automatically building executable programs and libraries from source code Help build programs from numbers of source code files Manage dependency among source code files and compiling method Prevent mistake $ gcc –o hello hello.c  Correct $ gcc –o hello.c hello.c  source code will be gone!

23 This empty space should be “tab” not “space”
Make Syntax Syntax <Target>: <dependency> <Compile command> $ make program Will compile “program” After all compilation of others because of dependency This empty space should be “tab” not “space”

24 Makefile Example

25 Macro of Makefile Similar as “#define” of C programming
Useful for repeated expression Below will do same compilation as previous slide $ make all : compile every BINs $ make clean : delete every BINs

26 Task1. Tree Script Write a bash shell script that shows tree structure of the directories and files included in you own home directory. Example of Task1

27 Task2. Simple C Program Benchmark We can make File System Benchmark!
Computer program in order to assess the relative performance of an object, normally by running a number of standard tests and trials against it We can make File System Benchmark! with Sequential Access and Random Access Sequential Access Random Access Access Order 1 2 3 4 5 6 7 2 5 3 1 4 7 6 Logical Block 1 2 3 4 5 6 7 1 2 3 4 5 6 7 Example of Task1

28 Task2. Simple C Program Sample code is here
File create  Sequential Write  Sequential Read  Random Write  Random Read  File Delete  End You should Implement 3 functions You can refer “file_write_sequential()” function void file_read_sequential() : about 20 lines void file_write_random() : about 25 lines void file_read_random() : about 25 lines Example of Task1

29 Implement 3 operations : Sequential Read, Random Write, Random Read
Task2. Simple C Program Compile & Execute Sample Code Implement 3 operations : Sequential Read, Random Write, Random Read

30 Task2. Simple C Program Example of Task2

31 Task3. Makefile Write a Makefile for the source code of Task2
Test cases make all make clean Example Result of Task3

32 Submission Contents Submission Source Code Report
Answer to the questions Key point of your Source Code Screenshots (Task 1, 2, 3) Page Limit : about 5 page (except figures) Submission Due Date : Sept. 19 ,PM 23:59 [EE516] student_number.zip (various compression format is allowed)

33 General Grading Policy
Ratio of Grading Tasks : 70% Code operation(exception handling), Code readability No errors and warnings Report : 30% Free-form Problems, Key point of your Source Code, Screenshots of Results Page Limit : about 5 page (except figures) Delay Penalty 10%/day (AM 00:00) Source Code Copying will deduct all of your points should mention if you referenced it

34 How to Transfer your files
Compression and Extraction tar.gz $ tar -czvf compressed_file_name.tar.gz dir_name $ tar -xzvf compressed_file_name.tar.gz zip $ zip compressed_file_name.zip dir_name $ unzip compressed_file_name.zip File Transfer between Host Window and VM Just Copy and Paste Ctrl + C Ctrl + V


Download ppt "EE516: Embedded Software Project 1"

Similar presentations


Ads by Google