Projects of EE516. Embedded Software. Project 1. “Setting Up Environment for Projects” презентация

Содержание

Contents Introduction to Projects of EE516 Tasks Setting Up Environment Virtual Machine Environment Ubuntu Linux OS Installation Environment for Development Tasks 1. Shell Script 2. Simple C Programming 3. Makefile

Слайд 12016. 09. 01.
EE516: Embedded Software Project 1. “Setting Up Environment for Projects”
Dong

Jae Shin, PhD student

Слайд 2Contents
Introduction to Projects of EE516
Tasks
Setting Up Environment
Virtual Machine Environment
Ubuntu Linux OS

Installation
Environment for Development
Tasks
1. Shell Script
2. Simple C Programming
3. Makefile
Report
Problems
Source code submission & Screenshot
General Grading Policy



Слайд 3Introduction 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”

Слайд 4Environment 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


Слайд 5Environment Overview
What is “Virtual Machine Environment”?
Software Stack of “Virtual Machine Environment”
Physical

Resources of Your own machine
(CPU, MEM, STORAGE, NETWORK ..)

Host OS (e.g. Windows)
(Your host OS installed on the machine)

VMware Player
(Virtualization Layer from VMware)


Слайд 6Install Virtual Machine Monitor
“Virtual Machine Environment”
Download VMware Player (https://my.vmware.com/web/vmware/free#desktop_end_user_computing/vmware_workstation_player/12_0) or
(http://core.kaist.ac.kr/~djshin/VMware-player-12.0.0-2985596.exe)

Depends on

your OS

Windows-64bit

Linux-64bit

You need 64-bit Operating System.
If you don’t have, please contact TA.


Слайд 7Install Virtual Machine Monitor
Install VMM
Install the product following the instructions of

the installer

Installation Path

Enter your e-mail

Run VMware Player


Слайд 8Install 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 …

Слайд 9Install Guest OS
Download Ubuntu Linux
http://www.ubuntu.com/download/desktop
ubuntu-14.04.3-desktop-amd64.iso
or http://core.kaist.ac.kr/~djshin/ubuntu-14.04.3-desktop-amd64.iso



Слайд 10Install Guest OS
Create your own Virtual Machine


Select New Virtual Machine
Downloaded

File Path

Login Password



Слайд 11Install 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





Слайд 12Install Guest OS
Initialize Ubuntu Desktop
it takes several minutes.
log-in with your password
open

terminal (ctrl + alt + T)

Слайд 13Install 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



Слайд 14Shell Script
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


Слайд 15Shell Script
Various CLI Shells
Bourne Shell (1977) == sh
Developed by Steve Bourne

@ 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

bash shell : Ubuntu default

bourne shell (sh)


Слайд 16Shell Script
CSH (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

Слайд 17Shell 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


Слайд 18Writing 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


Слайд 19Writing a Shell Script
Writing a Simple Script
$ vim test.sh
or $

gedit test.sh
save file
$ chmod 755 test.sh
$ ./test.sh
$ ./test.sh something

Shell Script Guide
http://linuxconfig.org/bash-scripting-tutorial

simple source code

execution


Слайд 20tree -d


Слайд 21Writing a C Program
Writing a C Program
$ vim hello
or $

gedit hello.c
save file
$ gcc hello.c -o hello
$ ./hello


C Program Guide
http://www.gnu.org/software/gnu-c-manual/gnu-c-manual.pdf
https://classes.soe.ucsc.edu/cmpe013/Spring10/notes/C%20Programming%20Guide.pdf

simple source code

compile & execution


Слайд 22Make 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!


Слайд 23Make Syntax
Syntax
:

$ make program
Will compile “program”
After all compilation of

others because of dependency

This empty space should be “tab” not “space”


Слайд 24Makefile Example


Слайд 25Macro 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

Слайд 26Task1. 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


Слайд 27Task2. Simple C Program
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

Example of Task1

1

1

2

3

4

5

6

7

Logical Block

Sequential Access

1

2

3

4

5

6

7

1

2

3

4

5

6

7

3

6

4

Random Access

2

5

7

Access
Order


Слайд 28Task2. Simple C Program
Sample code is here
http://core.kaist.ac.kr/~djshin/fsbench_sample.c
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


Слайд 29Task2. Simple C Program
Compile & Execute Sample Code
Implement 3 operations :

Sequential Read, Random Write, Random Read

Слайд 30Task2. Simple C Program
Example of Task2


Слайд 31Task3. Makefile
Write a Makefile for the source code of Task2
Test

cases
make all
make clean

Example Result of Task3


Слайд 32Submission
Contents
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
E-mail : w.j.kim@kaist.ac.kr
[EE516] student_number.zip
(various compression format is allowed)


Слайд 33General 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


Слайд 34How 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


Обратная связь

Если не удалось найти и скачать презентацию, Вы можете заказать его на нашем сайте. Мы постараемся найти нужный Вам материал и отправим по электронной почте. Не стесняйтесь обращаться к нам, если у вас возникли вопросы или пожелания:

Email: Нажмите что бы посмотреть 

Что такое ThePresentation.ru?

Это сайт презентаций, докладов, проектов, шаблонов в формате PowerPoint. Мы помогаем школьникам, студентам, учителям, преподавателям хранить и обмениваться учебными материалами с другими пользователями.


Для правообладателей

Яндекс.Метрика