EE516: Embedded Software Project 1

Slides:



Advertisements
Similar presentations
Linux, it's not Windows A short introduction to the sub-department's computer systems Gareth Thomas.
Advertisements

Learning Unix/Linux Bioinformatics Orientation 2008 Eric Bishop.
1 CSE 390a Lecture 1 introduction to Linux/Unix environment slides created by Marty Stepp, modified by Josh Goodwin
1 SEEM3460 Tutorial Unix Introduction. 2 Introduction What is Unix? An operation system (OS), similar to Windows, MacOS X Why learn Unix? Greatest Software.
Linux Shell. 2 Linux Command-Line Interface ■ Linux shells: A shell is a command interpreter that allows you to type commands from the keyboard to interact.
CS 141 Labs are mandatory. Attendance will be taken in each lab. Make account on moodle. Projects will be submitted via moodle.
Using Macs and Unix Nancy Griffeth January 6, 2014 Funding for this workshop was provided by the program “Computational Modeling and Analysis of Complex.
Overview of Linux CS3530 Spring 2014 Dr. José M. Garrido Department of Computer Science.
Essential Unix at ACEnet Joey Bernard, Computational Research Consultant.
CENT 305 Information Systems Security Linux Introduction.
1 SEEM3460 Tutorial Unix Introduction. 2 Introduction Unix-like system is everywhere Linux Android for smartphones Google Chrome OS for Chromebook Web.
Carnegie Mellon Linux Boot Camp Jenna MacCarley, Peter Pearson, Shashank Goyal 9/19/2015.
Session 2 Wharton Summer Tech Camp Basic Unix. Agenda Cover basic UNIX commands and useful functions.
CS 390 Unix Programming Summer Unix Programming - CS 3902 Course Details Online Information Please check.
Agenda Link of the week Use of Virtual Machine Review week one lab assignment This week’s expected outcomes Review next lab assignments Break Out Problems.
Operating System What is an Operating System? A program that acts as an intermediary between a user of a computer and the computer hardware. An operating.
Unix/Linux for beginners:
1 CSE 390a Lecture 1 introduction to Linux/Unix environment slides created by Marty Stepp, modified by Jessica Miller & Ruth Anderson
Introduction to Programming Using C An Introduction to Operating Systems.
Project 4. “File System Implementation”
Linux A practical introduction. 1)Background and Getting Started Linux is an operating system with multiple providers Red Hat/CentOS (our version) Ubuntu.
1 Introduction to Unix. 2 What is UNIX?  UNIX is an Operating System (OS).  An operating system is a control program that helps the user communicate.
The Kernel At a high level, the kernel in an operating system serves as the bridge between applications and the actual data processing of the hardware.
1 CS3695 – Network Vulnerability Assessment & Risk Mitigation – Introduction to Unix & Linux.
Embedded Software Design Week II Linux Intro Linux Kernel.
Learning Unix/Linux Based on slides from: Eric Bishop.
INTRODUCTION TO SHELL SCRIPTING By Byamukama Frank
به نام خدای مهربان زبان تخصصی دانشجویان کامپیوتر English for Computer Students درس 3 جوانمرد Ejavanmard.blogfa.com
Using Linux Kaya Oğuz Room: 310.
By Jonathan Rinfret UNIX/LINUX By Jonathan Rinfret
Overview of Linux Fall 2016 Dr. Donghyun Kim
bitcurator-access-webtools Quick Start Guide
Project 4. “File System Implementation”
SEEM3460 Tutorial Unix Introduction.
CS1010: Intro Workshop.
CSC227: Operating Systems
Commands Basic syntax of shell commands UNIX or shell commands have a basic structure command -options target command comes first (such as cd or ls) any.
IT244 - Introduction to Linux / Unix Instructor: Bo Sheng
Linux Commands Help HANDS ON TRAINING Author: Muhammad Laique
Unix Shells.
Some Linux Commands.
Software Tools Recitation 1
Using Linux and Lab Setup OS Lab 1
The Linux Operating System
Assignment Preliminaries
introduction to Linux/Unix environment
Introduction to UNIX.
Operating Systems and Using Linux
Intro to UNIX System and Homework 1
College of Engineering
CSE 390a Lecture 1 introduction to Linux/Unix environment
Unix : Introduction and Commands
CSE 303 Lecture 1 introduction to Linux/Unix environment
Web Programming Essentials:
CSE 390a Lecture 1 introduction to Linux/Unix environment
Operating Systems and Using Linux
introduction to Linux/Unix environment
introduction to Linux/Unix environment
Operating Systems and Using Linux
Operating Systems and Using Linux
Command line.
bitcurator-access-webtools Quick Start Guide
Linux Professor Sabol.
CSE 303 Concepts and Tools for Software Development
Operating Systems and Using Linux
introduction to Linux/Unix environment
introduction to Linux/Unix environment
introduction to Linux/Unix environment
introduction to Linux/Unix environment
Operating System By Prakash G Asnani
Presentation transcript:

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

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

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”

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

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 ..)

Install 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.

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

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 …

Install 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

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

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

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

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

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

bash shell : Ubuntu default Shell 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 bourne shell (sh) bash shell : Ubuntu default

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

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

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

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 http://linuxconfig.org/bash-scripting-tutorial simple source code execution

tree -d

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 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

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!

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”

Makefile Example

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

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

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

Task2. 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

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

Task2. Simple C Program Example of Task2

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

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 E-mail : w.j.kim@kaist.ac.kr [EE516] student_number.zip (various compression format is allowed)

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

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