교육지원 IT시스템 선진화

Size: px
Start display at page:

Download "교육지원 IT시스템 선진화"

Transcription

1 Module 11: 가상디바이스드라이버작성 ESP30076 임베디드시스템프로그래밍 (Embedded System Programming) 조윤석 전산전자공학부

2 주차별목표 디바이스드라이버의실행과정이해하기 크로스컴파일러를이용하여가상의디바이스드라이버생성하기 Kbuild 에대해이해하기 2

3 file_operations 구조체 struct file_operations { struct module *owner; loff_t (*llseek) (struct file *, loff_t, int); ssize_t (*read) (struct file *, char *, size_t, loff_t *); ssize_t (*write) (struct file *, const char *, size_t, loff_t *); int (*readdir) (struct file *, void *, filldir_t); unsigned int (*poll) (struct file *, struct poll_table_struct *); int (*ioctl) (struct inode *, struct file *, unsigned int, unsigned long); int (*mmap) (struct file *, struct vm_area_struct *); int (*open) (struct inode *, struct file *); int (*flush) (struct file *); int (*release) (struct inode *, struct file *); int (*fsync) (struct file *, struct dentry *, int datasync); int (*fasync) (int, struct file *, int); int (*lock) (struct file *, int, struct file_lock *); ssize_t (*readv) (struct file *, const struct iovec *, unsigned long, loff_t *); ssize_t (*writev) (struct file *, const struct iovec *, unsigned long, loff_t *); ssize_t (*sendpage) (struct file *, struct page *, int, size_t, loff_t *, int); unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); }; 3

4 응용프로그램에서의시스템콜함수와디바이스드라이버함수와의관계 struct file_operations test_fops = {.open = ccd_open,.read = ccd_read,.write = ccd_write,.ioctl = ccd_ioctl,.release = ccd_release, }; ANSI C99 에서표준으로제공 응용프로그램에서의시스템콜 open() close() read() write() ioctl() 디바이스드라이버에서의실행함수 ccd_open() ccd_release() ccd_read() ccd_write() ccd_ioctl() 4

5 Device Driver 와응용프로그램과의호출관계 Application Device Driver % insmod % rmmod open() close() read() write() ioctl() struct file_operations open release read write ioctl module init() module exit() ccd_open() ccd_release() ccd_read() ccd_write() ccd_ioctl() 5

6 디바이스드라이버호출 응용프로그램 insmod open, close 장치파일파일핸들주번호, 부번호 read, write, ioctl rmmod 디바이스드라이버 주번호 module_init request_region register_chrdev struct file_operations open, release read, write, ioctl module_exit release_region unregister_chrdev 6

7 간단한디바이스드라이버연습하기 가상의디바이스드라이버를작성해보기 가상의디바이스에대한디바이스파일명 /dev/test_dd 디바이스 open 시다음의메시지출력 Simple device driver programming: open virtual device!!! read 시다음의메시지출력 "Access device_read() function through struct file_operations 응용프로그램에서 ioctl() 호출시다음의문자열출력 Access device_ioctl() function 작업위치 % mkdir /root/work/dd/test_dd % cd!$ 7

8 간단한디바이스드라이버연습 (test_dd.c) % vi test_dd.c :1,$s/mydevice/test_dd/g /* test_dd.c */ #include <linux/kernel.h> /* KERNEL_ALERT */ #include <linux/init.h> /* init */ #include <linux/fs.h> #include <linux/module.h> #define DEVICE_MAJOR_NUM 0 #define DEV_NAME "/dev/test_dd" MODULE_LICENSE("GPL"); MODULE_AUTHOR("HGU"); int test_dd_init(void); void test_dd_exit(void); module_init(test_dd_init); module_exit(test_dd_exit); 8 int test_dd_open (struct inode *, struct file *); int test_dd_release (struct inode *, struct file *); ssize_t test_dd_read (struct file *, char user *, size_t, loff_t *); ssize_t test_dd_write (struct file *, const char user *, size_t, loff_t *); int test_dd_ioctl (struct inode *, struct file *, unsigned int, unsigned long);

9 test_dd.c (2) struct file_operations test_dd_fops = {.owner = THIS_MODULE,.open = test_dd_open,.release = test_dd_release,.read = test_dd_read,.write = test_dd_write,.ioctl = test_dd_ioctl, }; int test_dd_open (struct inode *inode, struct file *filp) { printk("simple device driver programming: oepn virtual device!!!\n"); return 0; } int test_dd_release (struct inode *inode, struct file *filp) { return 0; } ssize_t test_dd_read (struct file *filp, char user *buf, size_t count, loff_t *f_pos) { printk("access read() function through \"struct file_operations\"\n"); return 0; } 9

10 test_dd.c (3) 10 ssize_t test_dd_write (struct file *filp, const char user *buf, size_t count, loff_t *f_pos) { return 0; } int test_dd_ioctl (struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg) { printk("access device_ioctl() function...\n"); return 0; } int init test_dd_init(void) { int major_num; major_num = register_chrdev(device_major_nuim, DEV_NAME, &test_dd_fops); if ( major_num < 0 ) { printk(kern_warning"%s: can't get or assign major number %d\n", DEV_NAME, DEVICE_MAJOR_NUM); return major_num; } printk("success to load the device %s. Major number is %d\n", DEV_NAME, DEVICE_MAJOR_NUM); return 0; } void exit test_dd_exit(void) { unregister_chrdev(device_major_num, DEV_NAME); printk("success to unload the device %s...\n", DEV_NAME); }

11 테스트를위한응용프로그램작성 (test_app.c) % vi test_app.c /* filename: test_app.c */ #include <stdio.h> #include <fcntl.h> #include <string.h> #include <errno.h> #define DEV_NAME "/dev/test_dd" int main(int argc, char **argv) { int fd; fd = open(dev_name, O_RDWR); if ( fd < 0 ) { fprintf(stderr, "%s device file open error!!!... %s\n", DEV_NAME, strerror(errno)); return 0; } read(fd, 0, 0); ioctl(fd, NULL, 0); close(fd); 11 } return 0;

12 컴파일 % vi Makefile % make obj-m = test_dd.o # Kernel Source Directory of Achro-210T board KDIR = /root/work/kernel FILE = test_app PWD = $(shell pwd) CC = arm-linux-gcc all: module app module: $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules app: $(CC) -o $(FILE) $(FILE).c clean: rm -rf *.ko rm -rf *.o rm -rf $(FILE) *.mod.* rm -rf modules.order Module.symvers 12

13 register_chrdev() Char Device Driver 등록방법 외부와 device driver 는 file interface (node 를의미 ) 를통해연결 Device driver 는자신을구별하기위해고유의 major number 를사용 장치등록과해제 등록 : int register_chrdev (unsigned int major, const char *name, stuct file_operations *fops) major: 등록할 major number. 0 이면사용하지않는번호중자동으로할당 name: device 의이름 fops: device 에대한 file 연산함수들 해제 : int unregister_chrdev (unsigned int major, const char *name) 13

14 제작한디바이스드라이버검증파일만들기 (test_app.c) kernel 응용프로그램 (test_app.c) open close read write system call device driver test_dd.ko file_operations device_open device_release device_read device_write device 14

15 Build 기존 RTOS Kernel 과 Application program 을하나의 image 로 build ( 생성 ) Kernel 과 Application program 을구분하지않음 Linux 커널의 address space 와 application program 의 address space 가나뉘어져있어, 서로관련이없음. 따라서커널을빌드하는것과응용프로그램을빌드하는것이분리됨 Application program 생성 응용프로그램에서사용하는 header file 과 C library 가제공되면생성가능 Kernel build 15

16 Kernel Build Kbuild 커널 2.6 에포함된주요변경사항중의하나 GNU make 프로그램사용 모든과정은 make 명령을통해이루어짐 Kbuild 는커널을쉽게 build 할수있도록간단한 build 과정을제공함 확장및추가하는것이용이 예 : 시스템콜추가시 makefile 내에 obj-y 에 object code 파일명을추가하는것으로충분

17 Kernel build 단계 (1~4) Cross-development 환경설정 리눅스는많은하드웨어아키텍처를지원함으로, 커널이미지와모듈을빌드하기위한 target architecture 를설정해야함 Build 시포함될목록선택 프로세서, 보드, 드라이버, 일반적인커널옵션선택 설정을위한명령어들 ( 커널 2.4 와 2.6 대상 ) % make config % make menuconfig Curses library 를기반으로제공하는대화형커널설정 % make xconfig X 윈도우그래픽기반의커널설정. 커널 2.4 에서는 X library 사용. 커널 2.6 에서는 QT library 를사용함 % make oldconfig 기존설정에서일부만변경하고자할때사용. 기존의설정값은유지하고, 새로운변경사항만선택하도록보여줌. 커널업그레이드시에종종사용

18 Kernel build 단계 (1~4) Object file 을 build 하고 link 하여커널이미지생성 기존코드삭제 % make clean ( 커널 2.4와 2.6 공통 ) ( 참고 ) % make mrproper Clean 과동일한일을수행한후설정정보도삭제함 커널이미지생성 % make vmlinux 또는 zimage 파일생성됨 동적으로 load 할수있는모듈생성 % make modules

19 빌드과정의이해 (1) Makefile 을사용한하위 directory 들을 recursive 탐색을하며빌드 커널소스내의최상위 Makefile 커널이미지와 module 을 build 하는작업담당 커널소스트리의하위디렉토리들을재귀적으로탐색하여빌드 하위의 makefile 들은상위디렉토리에서빌드하기위한규칙을상속받음 설정과정에서선택할요소들의목록제공 arch/$arch/config.in for kernel 2.4 arch/$arch/kconfig for kernel 2.6 위의파일들을분석하여사용자에게각요소들을선택하도록요구함 목록에포함된내용 프로세서모델, 하드웨어보드, 보드종속적인하드웨어설정등 커널서브시스템요소, 네트워크스택과같이모든아키텍쳐에대해어느정도공통적인요소들

20 빌드과정의이해 (2) 모든아키텍처는아키텍처에종속적인고유빌드정보들을갖는 makefile 을제공해야함 arch/$(arch) 하위디렉토리에있는 makefile 툴 (assembler, compiler, linker 등 ) 에전달되어야하는플래그들 커널빌드시포함시킬하위디렉토리들 이미지가빌드된후수행해야할부가적인작업들 ( 예 ) [kernel]/arch/arm/makefile

21 빌드과정의이해 (3) 커널 2.4 와 2.6 에서의 kbuild 시스템의주요차이점 커널 2.6 에서는커널설정및빌드를위한별도의프레임워크를가지고있음 커널 2.4 에서는 architecture 에종속적인 makefile 은정해진표준이없었기에, architecture 별로서로다른형식을사용함 커널 2.6 에서는 kbuild framework 에서동일한형태로관리함 소스와 object 파일분리지원 커널 2.4: object 파일은동일한디렉토리에생성 커널 2.6: 소스트리와 object 트리분리가능 make 명령호출시 O=dir 형태의옵션사용. dir 은 object 가위치할 directory

22 설정과정 (1) 설정파일 Config.in(2.4) vs Kconfig (2.6) 설정파일의내용 커널의모든하위 directory 는별도파일을통해설정규칙정의 예 : 네트워크설정 net/kconfig (cf) net/config.in 설정변수 : 행은 config 로시작되며그뒤에오는이름 설정아이템은 name=value 의형태로저장되며, 아이템이름은 CONFIG_ 로시작되며, 지정된 name 이합쳐지는모양임 설정변수가가질수있는값의목록 bool: y or n tristate: y or n or m string, integer, hexadecimal 도움말 (help 로시작 ) 지정가능하며, 해당변수의이름뒤에저장 변수정의시의존성도정의할수있음

23 설정과정 (2) Setup 과정에서선택된요소들의목록이 kbuild 시스템에알려주는과정 설정과정에서커널최상위디렉토리에.config 파일생성됨 name=value 의형식으로표현 CONFIG_ARM=y CONFIG_HAVE_PWM=y CONFIG_SYS_SUPPORTS_ARM_EMULATION=y 빌드할소스파일검사과정에서 value 값을사용하여설정 ( 예 ) test.c 인경우 설정과정에서 CONFIG_TEST 라는이름으로처리되고, make config 명령을통해설정과정이이루어지면 [y/n] 의문장이출력됨 Y 라고입력하면해당 makefile 에 obj-$(config_test) += test.o 가추가됨 Kbuild 시스템은소스트리탐색중위문장을만나면 obj-y += test.o 로변환시킴 만일모듈 (module) 로 build 하도록선택한경우에는모듈 build 과정에서 obj-m += test.o 로변환됨 kbuild 시스템은 obj-m 타겟을 build 하기위한규칙도가지고있음

24 설정과정 (3) include/linux/autoconf.h 커널소스코드내에서도선택된요소들의목록을인식할수있도록되어있음 kbuild 시스템은 name=value 의정보를 include/linux/autoconf.h 파일내의매크로정의로변환함 즉 kbuild 시스템은소스파일에서도어떠한요소들이선택되었는지를알수있는방법을제공함

25 커널 Makefile 프레임워크 (v2.4) drivers/net/makefile (2.4) obj-y := 커널에직접포함될 object 목록 obj-m := 모듈로빌드될 object 목록 obj-n := 빌드과정에서사용되지않음 obj- := 빌드과정에서사용되지않음 mod-subdirs := appletalk arcnet fc irda wan O_TARGET := net.o 최종결과물 export-objs := 8390.o arlan.o mii.o 모듈에게 symbol을 export( 공개 ) 할수있는파일목록 list-multi := rcpci.o rcpci-obj := rcpci45.o rclanmtl.o ifeq ($(CONFIG_TULIP),y) obj-y += tulip/tulip.o endif subdir-$(config_net_pcmcia) += pcmcia obj-$(config_plip) += plip.o... include $(TOPDIR)/Rules.make clean: rm f core *.o *.a *.s rcpci.o: $(rcpci-objs) $(LD) r o $@ $(rcpci-objs)

26 커널 Makefile 프레임워크 (v2.6) drivers/net/makefile (2.6) rcpci-objs := rcpci45.o rclanmtl.o ifeq ($(CONFIG_ISDN_PPP), y) obj-$(config_isdn) += slhc.o endif obj-$(config_e1000) += e100 obj-$(config_plip) += plip.o obj-$(config_irda) += irda

untitled

untitled Step Motor Device Driver Embedded System Lab. II Step Motor Step Motor Step Motor source Embedded System Lab. II 2 open loop, : : Pulse, 1 Pulse,, -, 1 +5%, step Step Motor (2),, Embedded System Lab. II

More information

교육지원 IT시스템 선진화

교육지원 IT시스템 선진화 Module 16: ioctl 을활용한 LED 제어디바이스드라이버 ESP30076 임베디드시스템프로그래밍 (Embedded System Programming) 조윤석 전산전자공학부 주차별목표 ioctl() 을활용법배우기 커널타이머와 ioctl 을활용하여 LED 제어용디바이스드라이브작성하기 2 IOCTL 을이용한드라이버제어 ioctl() 함수활용 어떤경우에는읽는용도로만쓰고,

More information

ECE30076 Embedded System Programming - LED Device Driver

ECE30076 Embedded System Programming - LED Device Driver Module 12: LED 제어디바이스드라이버 ESP30076 임베디드시스템프로그래밍 (Embedded System Programming) 조윤석 전산전자공학부 주차별목표 하드웨어제어를위한디바이스드라이버작성방법알아보기 LED 제어용디바이스드라이버작성하기 ioremap 을이용한 LED 제어디바이스드라이버 mmap 을이용한 LED 제어디바이스드라이버 2 디바이스구분

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 KeyPad Device Control - Device driver Jo, Heeseung HBE-SM5-S4210 에는 16 개의 Tack Switch 를사용하여 4 행 4 열의 Keypad 가장착 4x4 Keypad 2 KeyPad 를제어하기위하여 FPGA 내부에 KeyPad controller 가구현 KeyPad controller 16bit 로구성된

More information

디바이스드라이버 (Device Driver) Driver is literally a subject which drive a object. 응용프로그램에서하드웨어장치를이용해서데이터를직접읽고쓰거나제어해야하는경우에디바이스드라이버를이용 하드웨어를제어하는프로그램과애플리케이션에서

디바이스드라이버 (Device Driver) Driver is literally a subject which drive a object. 응용프로그램에서하드웨어장치를이용해서데이터를직접읽고쓰거나제어해야하는경우에디바이스드라이버를이용 하드웨어를제어하는프로그램과애플리케이션에서 임베디드시스템설계강의자료 7 Device Driver (2014 년도 1 학기 ) 김영진 아주대학교전자공학과 디바이스드라이버 (Device Driver) Driver is literally a subject which drive a object. 응용프로그램에서하드웨어장치를이용해서데이터를직접읽고쓰거나제어해야하는경우에디바이스드라이버를이용 하드웨어를제어하는프로그램과애플리케이션에서디바이스를제어하기위한자료구조와함수의집합

More information

<4D F736F F F696E74202D205BBAB0C3B75D20B8AEB4AABDBA20B5F0B9D9C0CCBDBA20B5E5B6F3C0CCB9F620B8F0B5A82E >

<4D F736F F F696E74202D205BBAB0C3B75D20B8AEB4AABDBA20B5F0B9D9C0CCBDBA20B5E5B6F3C0CCB9F620B8F0B5A82E > 안드로이드환경에서의 리눅스디바이스드라이버 문자디바이스드라이버설명 Table of contents 디바이스드라이버구조 시스템구조 모듈의기본골격 드라이버 IO 제어 안드로이드환경에서의 한백전자교육사업부 리눅스디바이스드라이버 시스템구조 쉘 응용프로그램 표준라이브러리 시스템콜 가상파일시스템 (VFS) 버퍼캐시 네트워크시스템 문자디바이스드라이버 블럭디바이스드라이버 네트워크디바이스드라이버

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 7-Segment Device Control - Device driver Jo, Heeseung HBE-SM5-S4210 의 M3 Module 에는 6 자리를가지는 7-Segment 모듈이아래그림처럼실장 6 Digit 7-Segment 2 6-Digit 7-Segment LED controller 16비트로구성된 2개의레지스터에의해제어 SEG_Sel_Reg(Segment

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 7-Segment Device Control - Device driver Jo, Heeseung HBE-SM5-S4210 의 M3 Module 에는 6 자리를가지는 7-Segment 모듈이아래그림처럼실장 6 Digit 7-Segment 2 6-Digit 7-Segment LED Controller 16비트로구성된 2개의레지스터에의해제어 SEG_Sel_Reg(Segment

More information

Chapter #01 Subject

Chapter #01  Subject Device Driver March 24, 2004 Kim, ki-hyeon 목차 1. 인터럽트처리복습 1. 인터럽트복습 입력검출방법 인터럽트방식, 폴링 (polling) 방식 인터럽트서비스등록함수 ( 커널에등록 ) int request_irq(unsigned int irq, void(*handler)(int,void*,struct pt_regs*), unsigned

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 7-SEGMENT DEVICE CONTROL - DEVICE DRIVER Jo, Heeseung 디바이스드라이버구현 : 7-SEGMENT HBE-SM5-S4210 의 M3 Module 에는 6 자리를가지는 7-Segment 모듈이아래그림처럼실장 6 Digit 7-Segment 2 디바이스드라이버구현 : 7-SEGMENT 6-Digit 7-Segment LED

More information

임베디드시스템설계강의자료 6 system call 2/2 (2014 년도 1 학기 ) 김영진 아주대학교전자공학과

임베디드시스템설계강의자료 6 system call 2/2 (2014 년도 1 학기 ) 김영진 아주대학교전자공학과 임베디드시스템설계강의자료 6 system call 2/2 (2014 년도 1 학기 ) 김영진 아주대학교전자공학과 System call table and linkage v Ref. http://www.ibm.com/developerworks/linux/library/l-system-calls/ - 2 - Young-Jin Kim SYSCALL_DEFINE 함수

More information

KEY 디바이스 드라이버

KEY 디바이스 드라이버 KEY 디바이스드라이버 임베디드시스템소프트웨어 I (http://et.smu.ac.kr et.smu.ac.kr) 차례 GPIO 및 Control Registers KEY 하드웨어구성 KEY Driver 프로그램 key-driver.c 시험응용프로그램 key-app.c KEY 디바이스드라이버 11-2 GPIO(General-Purpose Purpose I/O)

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Linux Kernel and Device Driver Jo, Heeseung 커널과의관계 시스템이지원하는하드웨어를응용프로그램에서사용할수있도록커널에서제공하는라이브러리 응용프로그램이하드웨어를제어하려면커널에자원을요청 - 응용프로그램에서는 C 라이브러리같은함수를호출 - 라이브러리내부에서는커널에게시스템콜을호출 - 커널로제어가넘어가게되면 ( 커널모드 ) 를통해서하드웨어를제어

More information

슬라이드 1

슬라이드 1 / 임베디드시스템개요 / 임베디드운영체제 / 디바이스드라이버 01 Linux System Architecture Application Area Application System Call Interface BSD Socket Virtual File System INET(AF_INET) Kernel Area Buffer Cache Network Subsystem

More information

Microsoft PowerPoint - lab14.pptx

Microsoft PowerPoint - lab14.pptx Mobile & Embedded System Lab. Dept. of Computer Engineering Kyung Hee Univ. Keypad Device Control in Embedded Linux HBE-SM5-S4210 에는 16 개의 Tack Switch 를사용하여 4 행 4 열의 Keypad 가장착되어있다. 2 Keypad Device Driver

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Network Programming Jo, Heeseung Network 실습 네트워크프로그래밍 멀리떨어져있는호스트들이서로데이터를주고받을수있도록프로그램을구현하는것 파일과는달리데이터를주고받을대상이멀리떨어져있기때문에소프트웨어차원에서호스트들간에연결을해주는장치가필요 이러한기능을해주는장치로소켓이라는인터페이스를많이사용 소켓프로그래밍이란용어와네트워크프로그래밍이랑용어가같은의미로사용

More information

(Microsoft PowerPoint - Device Driver [\310\243\310\257 \270\360\265\345])

(Microsoft PowerPoint - Device Driver [\310\243\310\257 \270\360\265\345]) 목차 Device Driver 커널프로그램 Kernel program Kernel program 유의사항 Kernel module 디바이스드라이버 Character/Block device driver Device driver 구조 Device driver 작성절차및 module 등록 LED 디바이스드라이버 Kernel Program (1) 커널프로그램과응용프로그램과비교

More information

(Microsoft PowerPoint - Device Driver [\310\243\310\257 \270\360\265\345])

(Microsoft PowerPoint - Device Driver [\310\243\310\257 \270\360\265\345]) Device Driver 커널프로그램 Kernel program 목차 Kernel program 유의사항 Kernel module 디바이스드라이버 Character/Block device driver Device driver 구조 Device driver 작성절차및 module 등록 LED 디바이스드라이버 Kernel Program (1) 커널프로그램과응용프로그램과비교

More information

교육지원 IT시스템 선진화

교육지원 IT시스템 선진화 Module 10: 디바이스드라이버기초 ESP30076 임베디드시스템프로그래밍 (Embedded System Programming) 조윤석 전산전자공학부 주차별목표 디바이스드라이버란? 디바이스드라이버주요함수알아보기 디바이스드라이버기본골격구성하기 2 디바이스드라이버프로그래밍 리눅스커널의구조 커널프로그래밍 리눅스커널의핵심 (core) 기능추가 리눅스커널알고리즘개선

More information

본 강의에 들어가기 전

본 강의에 들어가기 전 C 기초특강 종합과제 과제내용 구조체를이용하여교과목이름과코드를파일로부터입력받아관리 구조체를이용하여학생들의이름, 학번과이수한교과목의코드와점수를파일로부터입력 학생개인별총점, 평균계산 교과목별이수학생수, 총점및평균을계산 결과를파일에저장하는프로그램을작성 2 Makefile OBJS = score_main.o score_input.o score_calc.o score_print.o

More information

<4D F736F F F696E74202D20B8AEB4AABDBA20BFC0B7F920C3B3B8AEC7CFB1E22E BC8A3C8AF20B8F0B5E55D>

<4D F736F F F696E74202D20B8AEB4AABDBA20BFC0B7F920C3B3B8AEC7CFB1E22E BC8A3C8AF20B8F0B5E55D> 리눅스 오류처리하기 2007. 11. 28 안효창 라이브러리함수의오류번호얻기 errno 변수기능오류번호를저장한다. 기본형 extern int errno; 헤더파일 라이브러리함수호출에실패했을때함수예 정수값을반환하는함수 -1 반환 open 함수 포인터를반환하는함수 NULL 반환 fopen 함수 2 유닉스 / 리눅스 라이브러리함수의오류번호얻기 19-1

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Text-LCD Device Control - Device driver Jo, Heeseung M3 모듈에장착되어있는 Tedxt LCD 장치를제어하는 App 을개발 TextLCD 는영문자와숫자일본어, 특수문자를표현하는데사용되는디바이스 HBE-SM5-S4210 의 TextLCD 는 16 문자 *2 라인을 Display 할수있으며, 이 TextLCD 를제어하기위하여

More information

슬라이드 1

슬라이드 1 / 유닉스시스템개요 / 파일 / 프로세스 01 File Descriptor file file descriptor file type unix 에서의파일은단지바이트들의나열임 operating system 은파일에어떤포맷도부과하지않음 파일의내용은바이트단위로주소를줄수있음 file descriptor 는 0 이나양수임 file 은 open 이나 creat 로 file

More information

망고100 보드로 놀아보자 -13

망고100 보드로 놀아보자 -13 리눅스디바이스드라이버개요 http://cafe.naver.com/embeddedcrazyboys http://www.mangoboard.com 디바이스드라이버개요 디바이스 (Device ) 네트워크어댑터, LCD 디스플레이, PCMCIA, Audio, 터미널, 키보드, 하드디스 크, 플로피디스크, 프린터등과같은주변장치들을말함 디바이스의구동에필요한프로그램, 즉디바이스드라이버가필수적으로요구

More information

Microsoft Word doc

Microsoft Word doc 1. 디바이스드라이버 [ GPIO ] 1.1. GPIO 란 GPIO(General Purpose Input/Output) 란일반적인용도로사용가능한디지털입출력기능의 Port pins 이다. S3C2410의 GPIO는총 117개이며각각이 pin 들은 input/output으로프로그램되거나인터럽트 source로사용될수있다. S3C2410의대부분의 GPIO는단순히디지털입출력뿐만아니라부가적인기능을갖고있다.

More information

Adding a New Dev file

Adding a New Dev file Adding a New Dev file - 김성영, 이재혁, 김남현 - 발표자 : 김남현 목차 01 Progress 02 Device file 03 How create dev file 04 Example Progress 4 월 1 일 프로젝트방향설정 4 월 8 일 device file 추가방법조사 mem.c 파일분석 4 월 10 일 알고리즘제시필요한함수분석

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Sensor Device Jo, Heeseung Sensor 실습 HBE-SM5-S4210 에는근접 / 가속도 / 컴파스센서가장착 각센서들을사용하기위한디바이스드라이버와어플리케이션을작성 2 근접 (Proximity) 센서 HBE-SM5-S4210 Camera Module 근접센서디바이스 근접센서는사물이다른사물에접촉되기이전에가까이접근하였는지를검출할목적으로사용 일반적으로생활에서자동문이나엘리베이터,

More information

지난시간에... 우리는 kernel compile을위하여 cross compile 환경을구축했음. UBUNTU 12.04에서 arm-2009q3를사용하여 간단한 c source를빌드함. 한번은 intel CPU를위한 gcc로, 한번은 ARM CPU를위한 gcc로. AR

지난시간에... 우리는 kernel compile을위하여 cross compile 환경을구축했음. UBUNTU 12.04에서 arm-2009q3를사용하여 간단한 c source를빌드함. 한번은 intel CPU를위한 gcc로, 한번은 ARM CPU를위한 gcc로. AR Configure Kernel Build Environment And kernel & root file system Build 2018-09-27 VLSI Design Lab 1 지난시간에... 우리는 kernel compile을위하여 cross compile 환경을구축했음. UBUNTU 12.04에서 arm-2009q3를사용하여 간단한 c source를빌드함.

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 (Host) set up : Linux Backend RS-232, Ethernet, parallel(jtag) Host terminal Target terminal : monitor (Minicom) JTAG Cross compiler Boot loader Pentium Redhat 9.0 Serial port Serial cross cable Ethernet

More information

Embeddedsystem(8).PDF

Embeddedsystem(8).PDF insmod init_module() register_blkdev() blk_init_queue() blk_dev[] request() default queue blkdevs[] block_device_ops rmmod cleanup_module() unregister_blkdev() blk_cleanup_queue() static struct { const

More information

untitled

untitled Block Device Driver in Linux Embedded System Lab. II Embedded System Lab. II 2 Define objective of applications using device Study Hardware manual (Registers) (vector number) Understand interface to related

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Web server porting 2 Jo, Heeseung Web 을이용한 LED 제어 Web 을이용한 LED 제어프로그램 web 에서데이터를전송받아타겟보드의 LED 를조작하는프로그램을작성하기위해다음과같은소스파일을생성 2 Web 을이용한 LED 제어 LED 제어프로그램작성 8bitled.html 파일을작성 root@ubuntu:/working/web# vi

More information

Sena Technologies, Inc. HelloDevice Super 1.1.0

Sena Technologies, Inc. HelloDevice Super 1.1.0 HelloDevice Super 110 Copyright 1998-2005, All rights reserved HelloDevice 210 ()137-130 Tel: (02) 573-5422 Fax: (02) 573-7710 E-Mail: support@senacom Website: http://wwwsenacom Revision history Revision

More information

Microsoft Word doc

Microsoft Word doc 2. 디바이스드라이버 [ DIO ] 2.1. 개요 타겟보드의데이터버스를이용하여 LED 및스위치동작을제어하는방법을설명하겠다. 2.2. 회로도 2.3. 준비조건 ARM 용크로스컴파일러가설치되어있어야한다. 하드웨어적인점검을하여정상적인동작을한다고가정한다. NFS(Network File System) 를사용할경우에는 NFS가마운트되어있어야한다. 여기서는소스전문을포함하지않았다.

More information

10.

10. 10. 10.1 10.2 Library Routine: void perror (char* str) perror( ) str Error 0 10.3 10.3 int fd; /* */ fd = open (filename, ) /*, */ if (fd = = -1) { /* */ } fcnt1 (fd, ); /* */ read (fd, ); /* */ write

More information

vi 사용법

vi 사용법 네트워크프로그래밍 6 장과제샘플코드 - 1:1 채팅 (udp 버전 ) 과제 서버에서먼저 bind 하고그포트를다른사람에게알려줄것 클라이언트에서알려준포트로접속 서로간에키보드입력을받아상대방에게메시지전송 2 Makefile 1 SRC_DIR =../../common 2 COM_OBJS = $(SRC_DIR)/addressUtility.o $(SRC_DIR)/dieWithMessage.o

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 LED Device Control - mmap() Jo, Heeseung 디바이스제어 디바이스제어 HBE-SM5-S4210 에장착된 Peripheral 들은다양한인터페이스로연결되어있음 베이스보드에있는 LED 와 7-Segment 는 GPIO 로직접 CPU 에연결 M3 모듈인 FPGA 모듈은 FPGA 에의해서제어되며 CPU 와호스트버스로연결되어있어서프로그램에서는메모리인터페이스로인식

More information

chap7.key

chap7.key 1 7 C 2 7.1 C (System Calls) Unix UNIX man Section 2 C. C (Library Functions) C 1975 Dennis Ritchie ANSI C Standard Library 3 (system call). 4 C?... 5 C (text file), C. (binary file). 6 C 1. : fopen( )

More information

Microsoft PowerPoint - 10-EmbedSW-11-모듈

Microsoft PowerPoint - 10-EmbedSW-11-모듈 11. 개요 proc 파일시스템 순천향대학교컴퓨터학부이상정 1 개요 순천향대학교컴퓨터학부이상정 2 개요 커널프래그래밍 커널의일부변경시커널전체를다시컴파일해야하는번거로움 해당모듈만컴파일하고필요할때만동적으로링크시켜커널의일부로사용할수있어효율적 자주사용하지않는커널기능은메모리에상주시키지않아도됨 확장성과재사용성을높일수있음. 순천향대학교컴퓨터학부이상정 3 모듈 (module)

More information

Chap 6 모듈프로그래밍및 디바이스드라이버구현

Chap 6 모듈프로그래밍및 디바이스드라이버구현 Chap 6 모듈프로그래밍및 디바이스드라이버구현 Chap 6. 모듈프로그래밍및디바이스드라이버구현 1. 모듈프로그래밍 1.1. Kernel Module 1.1.1. Kernel Module 모듈은커널의구성요소로서, 리눅스시스템이부팅된후에동적으로 load, unload 할수있다. 이런특징으로인해커널을다시컴파일하거나시스템을재부팅하지않고도커널의일부분을교체할수있다.

More information

Microsoft PowerPoint - lab15.pptx

Microsoft PowerPoint - lab15.pptx Mobile & Embedded System Lab. Dept. of Computer Engineering Kyung Hee Univ. TextLCD Device Control in Embedded Linux M3 모듈에장착되어있는 Tedxt LCD 장치를제어하는 App을개발 TextLCD는영문자와숫자일본어, 특수문자를표현하는데사용되는디바이스 HBE-SM5-S4210의

More information

강의10

강의10 Computer Programming gdb and awk 12 th Lecture 김현철컴퓨터공학부서울대학교 순서 C Compiler and Linker 보충 Static vs Shared Libraries ( 계속 ) gdb awk Q&A Shared vs Static Libraries ( 계속 ) Advantage of Using Libraries Reduced

More information

61 62 63 64 234 235 p r i n t f ( % 5 d :, i+1); g e t s ( s t u d e n t _ n a m e [ i ] ) ; if (student_name[i][0] == \ 0 ) i = MAX; p r i n t f (\ n :\ n ); 6 1 for (i = 0; student_name[i][0]!= \ 0&&

More information

6주차.key

6주차.key 6, Process concept A program in execution Program code PCB (process control block) Program counter, registers, etc. Stack Heap Data section => global variable Process in memory Process state New Running

More information

제1장 Unix란 무엇인가?

제1장  Unix란 무엇인가? 4 장파일 컴퓨터과학과박환수 1 2 4.1 시스템호출 컴퓨터시스템구조 유닉스커널 (kernel) 하드웨어를운영관리하여다음과같은서비스를제공 파일관리 (File management) 프로세스관리 (Process management) 메모리관리 (Memory management) 통신관리 (Communication management) 주변장치관리 (Device

More information

Microsoft PowerPoint APUE(Intro).ppt

Microsoft PowerPoint APUE(Intro).ppt 컴퓨터특강 () [Ch. 1 & Ch. 2] 2006 년봄학기 문양세강원대학교컴퓨터과학과 APUE 강의목적 UNIX 시스템프로그래밍 file, process, signal, network programming UNIX 시스템의체계적이해 시스템프로그래밍능력향상 Page 2 1 APUE 강의동기 UNIX 는인기있는운영체제 서버시스템 ( 웹서버, 데이터베이스서버

More information

제12장 파일 입출력

제12장 파일 입출력 제 4 장파일입출력 리눅스시스템프로그래밍 청주대학교전자공학과 한철수 1 시스템호출 (system call) 파일 (file) 임의접근 (random access) 주요학습내용 2 4.1 절 커널의역할 (kernel) 커널 (kernel) 은운영체제의핵심부분으로서, 하드웨어를운영관리하는여러가지서비스를제공함 파일관리 (File management) 디스크 프로세스관리

More information

Chap 7

Chap 7 Chap 7 FPGA 디바이스 1. FPGA 디바이스 1.1. External FPGA Device Driver FPGA 모듈을제어하는디바이스드라이버를작성하는방법에대해서알아보도록한다. 이모듈은 Achro-i.MX6Q의 External Connector에연결된다. 본교재에는 FGPA 펌웨어소스코드가포함되어있지않지만 VHDL로작성할수있다. FGPA 관련소스는패키지에포함되어있는바이너리를이용하면된다.

More information

슬라이드 제목 없음

슬라이드 제목 없음 < > Target cross compiler Target code Target Software Development Kit (SDK) T-Appl T-Appl T-VM Cross downloader Cross debugger Case 1) Serial line Case 2) LAN line LAN line T-OS Target debugger Host System

More information

임베디드시스템설계강의자료 6 system call 1/2 (2014 년도 1 학기 ) 김영진 아주대학교전자공학과

임베디드시스템설계강의자료 6 system call 1/2 (2014 년도 1 학기 ) 김영진 아주대학교전자공학과 임베디드시스템설계강의자료 6 system call 1/2 (2014 년도 1 학기 ) 김영진 아주대학교전자공학과 시스템호출개요 리눅스에서는사용자공간과커널공간을구분 사용자프로그램은사용자모드, 운영체제는커널모드에서수행 커널공간에대한접근은커널 ( 특권, priviledged) 모드에서가능 컴퓨팅자원 (CPU, memory, I/O 등 ) 을안전하게보호 커널수행을안전하게유지

More information

한백전자교육사업부 AndroX Studio 로배우는임베디드프로그래밍 - 한백전자 - 본문서의저작권은 한백전자에있으며, 허락없이무단복제및전제를불허합니다.

한백전자교육사업부 AndroX Studio 로배우는임베디드프로그래밍 - 한백전자 - 본문서의저작권은 한백전자에있으며, 허락없이무단복제및전제를불허합니다. 한백전자교육사업부 AndroX Studio 로배우는임베디드프로그래밍 - 한백전자 - 실습용장비 ; SM7-S4412 프로세서와주변장치직접연결 GPIO, 인터럽트, SPI, I2C 인터페이스사용 FPGA 모듈을거치지않음! 마이컴개발을위한아두이노 (Arduino Mega 2560) 탑재 ADK 2011 지원 안드로이드장치와아두이노보드연동가능 2 타깃주요명칭 HBE-SM7-S4412

More information

/chroot/lib/ /chroot/etc/

/chroot/lib/ /chroot/etc/ 구축 환경 VirtualBox - Fedora 15 (kernel : 2.6.40.4-5.fc15.i686.PAE) 작동 원리 chroot유저 ssh 접속 -> 접속유저의 홈디렉토리 밑.ssh의 rc 파일 실행 -> daemonstart실행 -> daemon 작동 -> 접속 유저만의 Jail 디렉토리 생성 -> 접속 유저의.bashrc 의 chroot 명령어

More information

Microsoft PowerPoint - chap01-C언어개요.pptx

Microsoft PowerPoint - chap01-C언어개요.pptx #include int main(void) { int num; printf( Please enter an integer: "); scanf("%d", &num); if ( num < 0 ) printf("is negative.\n"); printf("num = %d\n", num); return 0; } 1 학습목표 프로그래밍의 기본 개념을

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Web server porting 2 Jo, Heeseung Web 을이용한 LED 제어 Web 을이용한 LED 제어프로그램 web 에서데이터를전송받아타겟보드의 LED 를조작하는프로그램을작성하기위해다음과같은소스파일을생성 2 Web 을이용한 LED 제어 LED 제어프로그램작성 8bitled.html 파일을작성 root@ubuntu:/working/web# vi

More information

Microsoft Word doc

Microsoft Word doc 1. 임베디드리눅스장비에서램디스크를이용하여루트파일시스템을구현하였을경우에는보드동작중에파일로기록된내용이전원이꺼짐과동시에소실된다. 기록된내용을영구저장하기위해서는일반적으로플래시메모리에기록하여야한다. 플래시메모리를리눅스의루트파일시스템으로사용하기위해서는 MTD (Memory Technology Device ) 블록디바이스드라이버를사용하여야한다. 타겟보드는 NAND 플래시기반의보드이다.

More information

06Àå

06Àå Chapter 5 Chapter 6 Chapter 7 chapter 6 Part 1 6.1 Part 2 Part 3 145 146 Chapter 5 Chapter 6 Chapter 7 Part 1 Part 2 Part 3 147 148 Chapter 5 Chapter 6 Chapter 7 Part 1 Part 2 Part 3 149 150 Chapter 5

More information

C 프로그래밍 언어 입문 C 프로그래밍 언어 입문 김명호저 숭실대학교 출판국 머리말..... C, C++, Java, Fortran, Python, Ruby,.. C. C 1972. 40 C.. C. 1999 C99. C99. C. C. C., kmh ssu.ac.kr.. ,. 2013 12 Contents 1장 프로그래밍 시작 1.1 C 10 1.2 12

More information

04디바이스드라이버

04디바이스드라이버 Linux Device Drivers ETRI ETRI 2 ETRI 3 File operation special file(=device file) (Character Device Driver) (Block Device Driver) (Network Device Driver) ETRI 4 Ex. (/dev/console), (/dev/ttys0) open, close,

More information

망고100 보드로 놀아보자 -10

망고100 보드로 놀아보자 -10 망고 100 보드로놀아보자 -10 Kernel build 분석 http:// http://www.mangoboard.com 커널 build 환경분석 >(Top Dir)/Makefile 첫번째라인에위치 > 커널 2.6.29 버전사용 >ARCH?=arm 의미는 ARCH 의값으로 arm 있느냐묻고, 없으면, arm 문자를대입 >.cross_compile 이있으면,.cross_compile

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 1 Tizen 실습예제 : Remote Key Framework 시스템소프트웨어특론 (2014 년 2 학기 ) Sungkyunkwan University Contents 2 Motivation and Concept Requirements Design Implementation Virtual Input Device Driver 제작 Tizen Service 개발절차

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Development Environment 2 Jo, Heeseung make make Definition make is utility to maintain groups of programs Object If some file is modified, make detects it and update files related with modified one It

More information

제1장 Unix란 무엇인가?

제1장  Unix란 무엇인가? 1 12 장파이프 2 12.1 파이프 파이프원리 $ who sort 파이프 3 물을보내는수도파이프와비슷 한프로세스는쓰기용파일디스크립터를이용하여파이프에데이터를보내고 ( 쓰고 ) 다른프로세스는읽기용파일디스크립터를이용하여그파이프에서데이터를받는다 ( 읽는다 ). 한방향 (one way) 통신 파이프생성 파이프는두개의파일디스크립터를갖는다. 하나는쓰기용이고다른하나는읽기용이다.

More information

Microsoft PowerPoint - chap02-C프로그램시작하기.pptx

Microsoft PowerPoint - chap02-C프로그램시작하기.pptx #include int main(void) { int num; printf( Please enter an integer "); scanf("%d", &num); if ( num < 0 ) printf("is negative.\n"); printf("num = %d\n", num); return 0; } 1 학습목표 을 작성하면서 C 프로그램의

More information

untitled

untitled 시스템소프트웨어 : 운영체제, 컴파일러, 어셈블러, 링커, 로더, 프로그래밍도구등 소프트웨어 응용소프트웨어 : 워드프로세서, 스프레드쉬트, 그래픽프로그램, 미디어재생기등 1 n ( x + x +... + ) 1 2 x n 00001111 10111111 01000101 11111000 00001111 10111111 01001101 11111000

More information

Mango220 Android How to compile and Transfer image to Target

Mango220 Android How to compile and Transfer image to Target Mango220 Android How to compile and Transfer image to Target http://www.mangoboard.com/ http://cafe.naver.com/embeddedcrazyboys Crazy Embedded Laboratory www.mangoboard.com cafe.naver.com/embeddedcrazyboys

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 DEVELOPMENT ENVIRONMENT 2 MAKE Jo, Heeseung MAKE Definition make is utility to maintain groups of programs Object If some file is modified, make detects it and update files related with modified one 2

More information

K&R2 Reference Manual 번역본

K&R2 Reference Manual 번역본 typewriter structunion struct union if-else if if else if if else if if if if else else ; auto register static extern typedef void char short int long float double signed unsigned const volatile { } struct

More information

Microsoft Word - MPC850 SPI Driver.doc

Microsoft Word - MPC850 SPI Driver.doc MPC850 SPI Driver 네트워크보드에서구현한 SPI Device Driver 제작및이용방법입니다. 문서작성 : 이재훈 (kingseft.lee@samsung.com) 이용한 SPI EEPROM - X5043/X5045 512 x 8 bit SPI EEPROM (4Kbits = 512bytes) - 제조사 : XICOR (www.xicor.com) -

More information

Adobe Flash 취약점 분석 (CVE-2012-0754)

Adobe Flash 취약점 분석 (CVE-2012-0754) 기술문서 14. 08. 13. 작성 GNU C library dynamic linker $ORIGIN expansion Vulnerability Author : E-Mail : 윤지환 131ackcon@gmail.com Abstract 2010 년 Tavis Ormandy 에 의해 발견된 취약점으로써 정확한 명칭은 GNU C library dynamic linker

More information

ISP and CodeVisionAVR C Compiler.hwp

ISP and CodeVisionAVR C Compiler.hwp USBISP V3.0 & P-AVRISP V1.0 with CodeVisionAVR C Compiler http://www.avrmall.com/ November 12, 2007 Copyright (c) 2003-2008 All Rights Reserved. USBISP V3.0 & P-AVRISP V1.0 with CodeVisionAVR C Compiler

More information

임베디드시스템설계강의자료 4 (2014 년도 1 학기 ) 김영진 아주대학교전자공학과

임베디드시스템설계강의자료 4 (2014 년도 1 학기 ) 김영진 아주대학교전자공학과 임베디드시스템설계강의자료 4 (2014 년도 1 학기 ) 김영진 아주대학교전자공학과 Outline n n n n n n 보드개요보드연결필수패키지, Tool-Chain 설치 Kernel, file system build Fastboot 및 Tera Term설치 Kernel, file system 이미지전송및설치 - 2 - Young-Jin Kim X-Hyper320TKU

More information

고급 프로그래밍 설계

고급 프로그래밍 설계 UNIT 13 라즈베리파이블루투스 광운대학교로봇 SW 교육원 최상훈 Bluetooth Module 2 Bluetooth Slave UART Board UART 인터페이스용블루투스모듈 slave/device mode 라즈베리파이 GPIO 3 < 라즈베리파이 B+ 의 P1 헤더핀 GPIO 배치도 > wiringpi 라이브러리 4 라즈베리파이 GPIO 라이브러리

More information

Secure Programming Lecture1 : Introduction

Secure Programming Lecture1 : Introduction Malware and Vulnerability Analysis Lecture3-2 Malware Analysis #3-2 Agenda 안드로이드악성코드분석 악성코드분석 안드로이드악성코드정적분석 APK 추출 #1 adb 명령 안드로이드에설치된패키지리스트추출 adb shell pm list packages v0nui-macbook-pro-2:lecture3 v0n$

More information

Microsoft PowerPoint - chap13-입출력라이브러리.pptx

Microsoft PowerPoint - chap13-입출력라이브러리.pptx #include int main(void) int num; printf( Please enter an integer: "); scanf("%d", &num); if ( num < 0 ) printf("is negative.\n"); printf("num = %d\n", num); return 0; 1 학습목표 스트림의 기본 개념을 알아보고,

More information

C# Programming Guide - Types

C# Programming Guide - Types C# Programming Guide - Types 최도경 lifeisforu@wemade.com 이문서는 MSDN 의 Types 를요약하고보충한것입니다. http://msdn.microsoft.com/enus/library/ms173104(v=vs.100).aspx Types, Variables, and Values C# 은 type 에민감한언어이다. 모든

More information

MPLAB C18 C

MPLAB C18 C MPLAB C18 C MPLAB C18 MPLAB C18 C MPLAB C18 C #define START, c:\mcc18 errorlevel{0 1} char isascii(char ch); list[list_optioin,list_option] OK, Cancel , MPLAB IDE User s Guide MPLAB C18 C

More information

YUM(Yellowdog Updater,Modified) : RPM 패키지가저장된서버 ( 저장소 ) 로부터원하는패키지를자동으로설치한다. : YUM 도구는 RPM 의패키지의존성문제를해결

YUM(Yellowdog Updater,Modified) : RPM 패키지가저장된서버 ( 저장소 ) 로부터원하는패키지를자동으로설치한다. : YUM 도구는 RPM 의패키지의존성문제를해결 YUM(Yellowdog Updater,Modified) : RPM 패키지가저장된서버 ( 저장소 ) 로부터원하는패키지를자동으로설치한다. : YUM 도구는 RPM 의패키지의존성문제를해결해주어 RPM 패키지설치시자동적으로의존성문제를 처리하여 RPM 패키지를안전하게설치, 제거, 업그레이드등의작업을스스로하는도구 YUM 설정 (/etc/yum.conf) [main]

More information

2009년 상반기 사업계획

2009년 상반기 사업계획 메모리매핑 IT CookBook, 유닉스시스템프로그래밍 학습목표 통신프로그램이무엇인지이해한다. 메모리매핑을이용한 IPC 기법을이해한다. 메모리매핑함수를사용해프로그램을작성할수있다. 2/20 목차 메모리매핑의개념 메모리매핑함수 메모리매핑해제함수 메모리매핑의보호모드변경 파일의크기확장 매핑된메모리동기화 데이터교환하기 3/20 메모리매핑의개념 메모리매핑 파일을프로세스의메모리에매핑

More information

1장. 유닉스 시스템 프로그래밍 개요

1장.  유닉스 시스템 프로그래밍 개요 Unix 프로그래밍및실습 7 장. 시그널 - 과제보충 응용과제 1 부모프로세스는반복해서메뉴를출력하고사용자로부터주문을받아자식프로세스에게주문내용을알린다. (SIGUSR1) ( 일단주문을받으면음식이완료되기전까지 SIGUSR1 을제외한다른시그널은모두무시 ) timer 자식프로세스는주문을받으면조리를시작한다. ( 일단조리를시작하면음식이완성되기전까지 SIGALARM 을제외한다른시그널은모두무시

More information

Microsoft PowerPoint - [2009] 02.pptx

Microsoft PowerPoint - [2009] 02.pptx 원시데이터유형과연산 원시데이터유형과연산 원시데이터유형과연산 숫자데이터유형 - 숫자데이터유형 원시데이터유형과연산 표준입출력함수 - printf 문 가장기본적인출력함수. (stdio.h) 문법 ) printf( Test printf. a = %d \n, a); printf( %d, %f, %c \n, a, b, c); #include #include

More information

<4D F736F F F696E74202D FB8DEB8F0B8AE20B8C5C7CE205BC8A3C8AF20B8F0B5E55D>

<4D F736F F F696E74202D FB8DEB8F0B8AE20B8C5C7CE205BC8A3C8AF20B8F0B5E55D> 학습목표 통신프로그램이무엇인지이해한다. 을이용한 IPC 기법을이해한다. 함수를사용해프로그램을작성할수있다. IT CookBook, 유닉스시스템프로그래밍 2/20 목차 의개념 함수 해제함수 의보호모드변경 파일의크기확장 매핑된메모리동기화 데이터교환하기 의개념 파일을프로세스의메모리에매핑 프로세스에전달할데이터를저장한파일을직접프로세스의가상주소공간으로매핑 read, write

More information

untitled

untitled 1 hamks@dongguk.ac.kr (goal) (abstraction), (modularity), (interface) (efficient) (robust) C Unix C Unix (operating system) (network) (compiler) (machine architecture) 1 2 3 4 5 6 7 8 9 10 ANSI C Systems

More information

PCServerMgmt7

PCServerMgmt7 Web Windows NT/2000 Server DP&NM Lab 1 Contents 2 Windows NT Service Provider Management Application Web UI 3 . PC,, Client/Server Network 4 (1),,, PC Mainframe PC Backbone Server TCP/IP DCS PLC Network

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 BOOTLOADER Jo, Heeseung 부트로더컴파일 부트로더소스복사및압축해제 부트로더소스는웹페이지에서다운로드 /working 디렉터리로이동한후, wget으로다운로드 이후작업은모두 /working 디렉터리에서진행 root@ubuntu:# cp /media/sm5-linux-111031/source/platform/uboot-s4210.tar.bz2 /working

More information

학번 : 이름 : 1. 다음파일트리구조를가진유닉스시스템이있다고가정하자. / /bin/ /home/ /home/taesoo/ /usr/ /usr/lib/ /usr/local/lib /media 모든폴더에파일이하나도없다고가정했을때사용자가터미널에서다음 ls 명령입력시화면출력

학번 : 이름 : 1. 다음파일트리구조를가진유닉스시스템이있다고가정하자. / /bin/ /home/ /home/taesoo/ /usr/ /usr/lib/ /usr/local/lib /media 모든폴더에파일이하나도없다고가정했을때사용자가터미널에서다음 ls 명령입력시화면출력 학번 : 이름 : 1. 다음파일트리구조를가진유닉스시스템이있다고가정하자. / /bin/ /home/ /home/taesoo/ /usr/ /usr/lib/ /usr/local/lib /media 모든폴더에파일이하나도없다고가정했을때사용자가터미널에서다음 ls 명령입력시화면출력을예측하시오. $ cd /usr $ ls..? $ ls.? 2. 다음그림은어떤프로세스가다음코드를수행했다는가정에서도시되었다.

More information

Microsoft Word ARM_ver2_0a.docx

Microsoft Word ARM_ver2_0a.docx [Smart]0703-ARM 프로그램설치 _ver1_0a 목차 1 윈도우기반으로리눅스컴파일하기 (Cygwin, GNU ARM 설치 )... 2 1.1 ARM datasheet 받기... 2 1.2 Cygwin GCC-4.0 4.1 4.2 toolchain 파일받기... 2 1.3 Cygwin 다운로드... 3 1.4 Cygwin Setup... 5 2 Cygwin

More information

The Pocket Guide to TCP/IP Sockets: C Version

The Pocket Guide to  TCP/IP Sockets: C Version 인터넷프로토콜 5 장 데이터송수신 (3) 1 파일전송메시지구성예제 ( 고정크기메시지 ) 전송방식 : 고정크기 ( 바이너리전송 ) 필요한전송정보 파일이름 ( 최대 255 자 => 255byte 의메모리공간필요 ) 파일크기 (4byte 의경우최대 4GB 크기의파일처리가능 ) 파일내용 ( 가변길이, 0~4GB 크기 ) 메시지구성 FileName (255bytes)

More information

로봇SW교육원 강의자료

로봇SW교육원 강의자료 UNIT 05 make 광운대학교로봇 SW 교육원 최상훈 학습목표 2 Makefile 을작성핛수있다. make 3 make 프로젝트관리유틸리티 컴파일시갂단축 파일의종속구조를빠르게파악핛수있음 기술파일 (Makefile) 에기술된대로컴파일명령또는셸 (shell) 명령을순차적으로수행 make 를사용하지않을경우 $ gcc c main.c $ gcc c test_a.c

More information

C. KHU-EE xmega Board 에서는 Button 을 2 개만사용하기때문에 GPIO_PUSH_BUTTON_2 과 GPIO_PUSH_BUTTON_3 define 을 Comment 처리 한다. D. AT45DBX 도사용하지않기때문에 Comment 처리한다. E.

C. KHU-EE xmega Board 에서는 Button 을 2 개만사용하기때문에 GPIO_PUSH_BUTTON_2 과 GPIO_PUSH_BUTTON_3 define 을 Comment 처리 한다. D. AT45DBX 도사용하지않기때문에 Comment 처리한다. E. ASF(Atmel Software Framework) 환경을이용한프로그램개발 1. New Project Template 만들기 A. STK600 Board Template를이용한 Project 만들기 i. New Project -> Installed(C/C++) -> GCC C ASF Board Project를선택하고, 1. Name: 창에 Project Name(

More information

Abstract View of System Components

Abstract View of System Components Operating System 3 주차 - About Linux - Real-Time Computing and Communications Lab. Hanyang University jtlim@rtcc.hanyang.ac.kr yschoi@rtcc.hanyang.ac.kr shpark@rtcc.hanyang.ac.kr Contents Linux Shell Command

More information

iii. Design Tab 을 Click 하여 WindowBuilder 가자동으로생성한 GUI 프로그래밍환경을확인한다.

iii. Design Tab 을 Click 하여 WindowBuilder 가자동으로생성한 GUI 프로그래밍환경을확인한다. Eclipse 개발환경에서 WindowBuilder 를이용한 Java 프로그램개발 이예는 Java 프로그램의기초를이해하고있는사람을대상으로 Embedded Microcomputer 를이용한제어시스템을 PC 에서 Serial 통신으로제어 (Graphical User Interface (GUI) 환경에서 ) 하는프로그램개발예를설명한다. WindowBuilder:

More information

슬라이드 1

슬라이드 1 -Part3- 제 4 장동적메모리할당과가변인 자 학습목차 4.1 동적메모리할당 4.1 동적메모리할당 4.1 동적메모리할당 배울내용 1 프로세스의메모리공간 2 동적메모리할당의필요성 4.1 동적메모리할당 (1/6) 프로세스의메모리구조 코드영역 : 프로그램실행코드, 함수들이저장되는영역 스택영역 : 매개변수, 지역변수, 중괄호 ( 블록 ) 내부에정의된변수들이저장되는영역

More information

Microsoft PowerPoint - 02-Development-Environment-1.ppt

Microsoft PowerPoint - 02-Development-Environment-1.ppt 개발환경 1 임베디드시스템소프트웨어 I 차례 개발환경 Host와 Target의연결 Host 및 target 사양 Toolchain이란, 설치방법 시험 Cross Compile Minicom 설정및사용방법 JTAG 설치및사용방법 Bootloader, kernel, file system flash 방법 개발환경 1 2 개발환경 Host 시스템 임베디드소프트웨어를개발하는시스템

More information

untitled

untitled Embedded System Lab. II Embedded System Lab. II 2 RTOS Hard Real-Time vs Soft Real-Time RTOS Real-Time, Real-Time RTOS General purpose system OS H/W RTOS H/W task Hard Real-Time Real-Time System, Hard

More information

<C0CCBCBCBFB52DC1A4B4EBBFF82DBCAEBBE7B3EDB9AE2D313939392D382E687770>

<C0CCBCBCBFB52DC1A4B4EBBFF82DBCAEBBE7B3EDB9AE2D313939392D382E687770> i ii iii iv v vi 1 2 3 4 가상대학 시스템의 국내외 현황 조사 가상대학 플랫폼 개발 이상적인 가상대학시스템의 미래상 제안 5 웹-기반 가상대학 시스템 전통적인 교수 방법 시간/공간 제약을 극복한 학습동기 부여 교수의 일방적인 내용전달 교수와 학생간의 상호작용 동료 학생들 간의 상호작용 가상대학 운영 공지사항,강의록 자료실, 메모 질의응답,

More information

<443A5C4C C4B48555C B3E25C32C7D0B1E25CBCB3B0E8C7C1B7CEC1A7C6AE425CBED0C3E0C7C1B7CEB1D7B7A55C D616E2E637070>

<443A5C4C C4B48555C B3E25C32C7D0B1E25CBCB3B0E8C7C1B7CEC1A7C6AE425CBED0C3E0C7C1B7CEB1D7B7A55C D616E2E637070> #include "stdafx.h" #include "Huffman.h" 1 /* 비트의부분을뽑아내는함수 */ unsigned HF::bits(unsigned x, int k, int j) return (x >> k) & ~(~0

More information

RaspberryPi 커널컴파일및커널모듈 1 제 13 강 커널컴파일및커널모듈 커널컴파일가상주소 (mmap() 함수 ) 에의한디바이스제어커널모듈및커널모듈테스트커널모듈에의한입출력디바이스제어 (LED, BTN) 커널모듈을커널에포함하기

RaspberryPi 커널컴파일및커널모듈 1 제 13 강 커널컴파일및커널모듈 커널컴파일가상주소 (mmap() 함수 ) 에의한디바이스제어커널모듈및커널모듈테스트커널모듈에의한입출력디바이스제어 (LED, BTN) 커널모듈을커널에포함하기 RaspberryPi 커널컴파일및커널모듈 1 제 13 강 커널컴파일및커널모듈 커널컴파일가상주소 (mmap() 함수 ) 에의한디바이스제어커널모듈및커널모듈테스트커널모듈에의한입출력디바이스제어 (LED, BTN) 커널모듈을커널에포함하기 RaspberryPi 커널컴파일및커널모듈 2 커널컴파일 * 커널소스컴파일 : 가상머신에서 10여분소요 : 라즈베리파이보드에서 90여분소요

More information

커알못의 커널 탐방기 이 세상의 모든 커알못을 위해서

커알못의 커널 탐방기 이 세상의 모든 커알못을 위해서 커알못의 커널 탐방기 2015.12 이 세상의 모든 커알못을 위해서 개정 이력 버전/릴리스 0.1 작성일자 2015년 11월 30일 개요 최초 작성 0.2 2015년 12월 1일 보고서 구성 순서 변경 0.3 2015년 12월 3일 오탈자 수정 및 글자 교정 1.0 2015년 12월 7일 내용 추가 1.1 2015년 12월 10일 POC 코드 삽입 및 코드

More information

PA for SWE2007

PA for SWE2007 CSE3047-41: Operating System Practice (Spring 2016) Programming Assignment #2: 1. Introduction Due: 18th April. (Mon), 11:59 PM I-Campus 과제내용을필히확인하세요. 이번과제에서는 Linux kernel 에새로운 system call 을추가하고, Tizen

More information

Mango-AM335x LCD Type 커널 Module Parameter에서 변경하기

Mango-AM335x LCD Type 커널 Module Parameter에서 변경하기 Mango-AM335x LCD Type 커널 Module Parameter 에서 변경하기 http://www.mangoboard.com/ http://cafe.naver.com/embeddedcrazyboys Crazy Embedded Laboratory www.mangoboard.com cafe.naver.com/embeddedcrazyboys CRZ Technology

More information