PowerPoint 프레젠테이션

Size: px
Start display at page:

Download "PowerPoint 프레젠테이션"

Transcription

1 KeyPad Device Control - Device driver Jo, Heeseung

2 HBE-SM5-S4210 에는 16 개의 Tack Switch 를사용하여 4 행 4 열의 Keypad 가장착 4x4 Keypad 2

3 KeyPad 를제어하기위하여 FPGA 내부에 KeyPad controller 가구현 KeyPad controller 16bit 로구성된 2 개의 register 에의해제어 - Keypad_Col_Reg(Keypad Column Register) - Keypad_Row_Reg (Keypad Row Register) 3

4 Keypad Column Register 의데이터비트구조 Physical Address 0x0500_0070 Dot_Scan_Reg BIT Reserved COL_3 COL_2 COL_1 COL_0 Reset X X X X X X Bits Name Description 0 COL_0 Keypad Column Bit0 (Active High) 1 COL_1 Keypad Column Bit1 (Active High) 2 COL_2 Keypad Column Bit2 (Active High) 3 COL_3 Keypad Column Bit3 (Active High) 4

5 Keypad Row Register 의데이터비트구조를나타낸표 Physical Address 0x0500_0072 Dot_Scan_Reg BIT Reserved ROW_3 ROW_2 ROW_1 ROW_0 Reset X X X X X X Bits Name Description 0 ROW_0 Keypad ROW Bit0 (Active High) 1 ROW_1 Keypad ROW Bit1 (Active High) 2 ROW_2 Keypad ROW Bit2 (Active High) 3 ROW_3 Keypad ROW Bit3 (Active High) Keypad Column/Row Register 는 Keypad 로부터출력된 Data 를저장하는메모리역할 Host 쪽에서는 Register 에기록은할수없으며오직읽기만가능 5

6 드라이버소스파일 Keypad 드라이버는커널에포함 linux s4210/drviers/input/keyboard/ hanback_fpga_keypad.c 설정방법 menuconfig 를실행 Device Drivers -> Input device support -> [*] keyboards -> [*] HBE-XXX-S4210 FPGA keypad support 6

7 드라이버테스트프로그램작성 vi key_test.c 001: #include <stdio.h> 002: #include <stdlib.h> 003: #include <string.h> 004: #include <sys/ioctl.h> 005: #include <sys/types.h> 006: #include <sys/stat.h> 007: #include <fcntl.h> 008: #include <unistd.h> 009: #include <linux/input.h> // 커널소스 /include/linux/input.h 에서 struct input_event 확인 010: 011: #define EVENT_BUF_NUM : 7

8 013: int main(void) 014: { 015: int i, quit=1; 016: int fd = -1; 017: size_t read_bytes; 018: struct input_event event_buf[event_buf_num]; 019: 020: if ((fd = open("/dev/input/event2", O_RDONLY)) < 0) 021: { 022: printf("application : keypad driver open fail!\n"); 023: exit(1); 024: } 025: 026: printf("press the key button!\n"); 027: printf("press the key 16 to exit!\n"); 028: 8

9 029: while(quit) 030: { 031: read_bytes = read(fd, event_buf, (sizeof(struct input_event)*event_buf_num) ); 032: if( read_bytes < sizeof(struct input_event) ) 033: { 034: printf("application : read error!!"); 035: exit(1); 036: } 037: 038: for( i=0; i<(read_bytes/sizeof(struct input_event)); i++ ) 039: { 040: if ( (event_buf[i].type == EV_KEY) && (event_buf[i].value == 0)) 041: { 042: printf("\n Button key : %d\n", event_buf[i].code); 9

10 043: 044: if(event_buf[i].code == 16) { 045: printf("\napplication : Exit Program!! (key = %d)\n", event_buf[i].code); 046: quit = 0; 047: } 048: } 049: } 050: } 051: close(fd); 052: return 0; 053: } 10

11 vi Makefile CC = arm-linux-gcc CFLAGS = -DNO_DEBUG EXEC=key_test OBJS=$(EXEC).o ####### Implicit rules.suffixes:.cpp.cxx.cc.c.c.cpp.o: $(CXX) -c $(CXXFLAGS) -o $@ $<.cxx.o: $(CXX) -c $(CXXFLAGS) -o $@ $<.cc.o: $(CXX) -c $(CXXFLAGS) -o $@ $<.C.o: $(CXX) -c $(CXXFLAGS) -o $@ $<.c.o: $(CC) -c $(CFLAGS) -o $@ $< all: $(EXEC) $(EXEC): $(OBJS) $(CC) -o $@ $^ clean: rm -f $(OBJS) $(EXEC) 11

12 컴파일 ls Makefile key_test.c make clean; make 다음과같은메시지가출력된다 rm -f key_test.o key_test arm-linux-gcc -c -DNO_DEBUG -o key_test.o key_test.c arm-linux-gcc -o key_test key_test.o ls Makefile key_test key_test.c key_test.o 테스트 board 에서실행 12

13 KeyPad Device Control - mmap() Jo, Heeseung

14 KeyPad 제어 /working/mmap/keypad 디렉터리에서 keypad.c 작성 mkdir -p /working/mmap/keypad cd /working/mmap/keypad/ vi keypad.c 001: #include <stdio.h> 002: #include <string.h> 003: #include <stdlib.h> 004: #include <unistd.h> 005: #include <sys/mman.h> 006: #include <fcntl.h> 007: 008: #define FPGA_BASEADDRESS 0x : #define PIEZO_OFFSET 0x50 010: #define KEY_COL_OFFSET 0x70 011: #define KEY_ROW_OFFSET 0x72 012: 14

15 KeyPad 제어 013: int main(void) 014: { 015: short value; 016: unsigned short *addr_fpga; 017: unsigned short *keypad_row_addr, *keypad_col_addr, *piezo_addr; 018: int fd; 019: int i,quit=1; 020: if ((fd=open("/dev/mem",o_rdwr O_SYNC)) < 0) { 021: perror("mem open fail\n"); 022: exit(1); 023: } 024: 025: addr_fpga= (unsigned short *)mmap(null, 4096, PROT_WRITE PROT_READ, MAP_SHARED, fd, FPGA_BASEADDRESS); 027: keypad_col_addr = addr_fpga + KEY_COL_OFFSET/sizeof(unsigned short); 028: 029: keypad_row_addr = addr_fpga + KEY_ROW_OFFSET/sizeof(unsigned short); 030: 031: piezo_addr = addr_fpga + PIEZO_OFFSET/sizeof(unsigned short); 032: 15

16 KeyPad 제어 033: 034: if(*keypad_row_addr ==(unsigned short)-1 *keypad_col_addr ==(unsigned short)-1 ) 035: { 036: close(fd); 037: printf("mmap error\n"); 038: exit(1); 039: } 040: 041: printf("- Keypad\n"); 042: printf("press the key button!\n"); 043: printf("press the key 0x16 to exit!\n"); 044: 045: while(quit) { 046: *keypad_row_addr = 0x01; 047: usleep(1000); 048: value =(*keypad_col_addr & 0x0f); 049: *keypad_row_addr = 0x00; 050: switch(value) { 051: case 0x01 : value = 0x01; break; 052: case 0x02 : value = 0x02; break; 053: case 0x04 : value = 0x03; break; 054: case 0x08 : value = 0x04; break; 055: } 16

17 KeyPad 제어 056: if(value!= 0x00) goto stop_poll; 057: 058: *keypad_row_addr = 0x02; 059: for(i=0;i<2000;i++); 060: value = value (*keypad_col_addr & 0x0f); 061: *keypad_row_addr = 0x00; 062: switch(value) { 063: case 0x01 : value = 0x05; break; 064: case 0x02 : value = 0x06; break; 065: case 0x04 : value = 0x07; break; 066: case 0x08 : value = 0x08; break; 067: } 068: if(value!= 0x00) goto stop_poll; 069: 070: *keypad_row_addr = 0x04; 071: for(i=0;i<2000;i++); 072: value = value (*keypad_col_addr & 0x0f); 073: *keypad_row_addr = 0x00; 074: switch(value) { 075: case 0x01 : value = 0x09; break; 076: case 0x02 : value = 0x0a; break; 077: case 0x04 : value = 0x0b; break; 078: case 0x08 : value = 0x0c; break; 079: } 080: if(value!= 0x00) goto stop_poll; 17

18 KeyPad 제어 081: 082: *keypad_row_addr = 0x08; 083: for(i=0;i<2000;i++); 084: value = value (*keypad_col_addr & 0x0f); 085: *keypad_row_addr = 0x00; 086: switch(value) { 087: case 0x01 : value = 0x0d; break; 088: case 0x02 : value = 0x0e; break; 089: case 0x04 : value = 0x0f; break; 090: case 0x08 : value = 0x10; break; 091: } 092: 093: stop_poll: 094: if(value>0) { 095: printf("\n pressed key = %02d\n",value); 096: *piezo_addr=0x1; 097: usleep(50000); 098: *piezo_addr=0x0; 099: } 18

19 KeyPad 제어 100: else *keypad_row_addr = 0x00; 101: for(i=0;i< ;i++); 102: 103: if(value == 16) { 104: printf("\nexit Program!! (key = %02d)\n\n", value); 105: *piezo_addr=0x1; 106: usleep(150000); 107: *piezo_addr=0x0; 108: quit = 0; 109: } 110: } 111: 112: munmap(addr_fpga,4096); 113: close(fd); 114: return 0; 115: } 19

20 KeyPad 제어 Makefile 작성 vi Makefile CC = arm-linux-gcc CFLAGS = -DNO_DEBUG EXEC=keypad OBJS=$(EXEC).o ####### Implicit rules.suffixes:.cpp.cxx.cc.c.c.cpp.o: $(CXX) -c $(CXXFLAGS) -o $@ $<.cxx.o: $(CXX) -c $(CXXFLAGS) -o $@ $<.cc.o: $(CXX) -c $(CXXFLAGS) -o $@ $<.C.o: $(CXX) -c $(CXXFLAGS) -o $@ $<.c.o: $(CC) -c $(CFLAGS) -o $@ $< all: $(EXEC) $(EXEC): $(OBJS) $(CC) -o $@ $^ clean: rm -f $(OBJS) $(EXEC) 20

21 KeyPad 제어 컴파일 make arm-linux-gcc -c -DNO_DEBUG -o keypad.o keypad.c arm-linux-gcc -o keypad keypad.o 테스트 board 에서실행 ~]$./keypad - Keypad press the key button! press the key 0x16 to exit! pressed key = 01 pressed key = 16 Exit Program!! (key = 16) 21

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 프레젠테이션 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

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

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

PowerPoint 프레젠테이션

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

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

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

PowerPoint 프레젠테이션

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

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

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

PowerPoint 프레젠테이션

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

More information

Microsoft PowerPoint - IOControl [호환 모드]

Microsoft PowerPoint - IOControl [호환 모드] 목차 Input/Output Control I/O Control Mechanism mmap function munmap function RAM Area Access LED Control 4 digits 7 Segment Control Text LCD Control 1 2 I/O Control Mechanism (1) I/O Control Mechanism (2)

More information

Microsoft PowerPoint - lab16.pptx

Microsoft PowerPoint - lab16.pptx Mobile & Embedded System Lab. Dept. of Computer Engineering Kyung Hee Univ. GoAhead Porting Goahead 웹서버를포팅하기위하여 CD 안의소스를사용 경로 : [CD3]\source\webserver\webs218.tar.gz GoAhead 소스복사및압축해제 ~/working 디렉터리에배포

More information

슬라이드 1

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

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

본 강의에 들어가기 전

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

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

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

untitled

untitled if( ) ; if( sales > 2000 ) bonus = 200; if( score >= 60 ) printf(".\n"); if( height >= 130 && age >= 10 ) printf(".\n"); if ( temperature < 0 ) printf(".\n"); // printf(" %.\n \n", temperature); // if(

More information

(Asynchronous Mode) ( 1, 5~8, 1~2) & (Parity) 1 ; * S erial Port (BIOS INT 14H) - 1 -

(Asynchronous Mode) ( 1, 5~8, 1~2) & (Parity) 1 ; * S erial Port (BIOS INT 14H) - 1 - (Asynchronous Mode) - - - ( 1, 5~8, 1~2) & (Parity) 1 ; * S erial Port (BIOS INT 14H) - 1 - UART (Univ ers al As y nchronous Receiver / T rans mitter) 8250A 8250A { COM1(3F8H). - Line Control Register

More information

교육지원 IT시스템 선진화

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

More information

제1장 Unix란 무엇인가?

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

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

<4D F736F F F696E74202D20B8B6C0CCC5A9B7CEC7C1B7CEBCBCBCAD202839C1D6C2F7207E203135C1D6C2F >

<4D F736F F F696E74202D20B8B6C0CCC5A9B7CEC7C1B7CEBCBCBCAD202839C1D6C2F7207E203135C1D6C2F > 10주차 문자 LCD 의인터페이스회로및구동함수 Next-Generation Networks Lab. 5. 16x2 CLCD 모듈 (HY-1602H-803) 그림 11-18 19 핀설명표 11-11 번호 분류 핀이름 레벨 (V) 기능 1 V SS or GND 0 GND 전원 2 V Power DD or V CC +5 CLCD 구동전원 3 V 0 - CLCD 명암조절

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

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

<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

제1장 Unix란 무엇인가?

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

More information

제12장 파일 입출력

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

More information

2009년 상반기 사업계획

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

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

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Web server porting 1 Jo, Heeseung 웹서버포팅 HBE-SM5-S4210 를임베디드웹서버로사용할수있도록웹서버를올리는작업 임베디드서버에널리쓰이는웹서버들중 GoAhead 라는웹서버를포팅 CGI 프로그램을이용하여웹에서 HBE-SM5-S4210 의 LED, 7- Segment, TextLCD 를제어실습 2 Goahead webserver 소스를다운받거나제공된

More information

11장 포인터

11장 포인터 Dynamic Memory and Linked List 1 동적할당메모리의개념 프로그램이메모리를할당받는방법 정적 (static) 동적 (dynamic) 정적메모리할당 프로그램이시작되기전에미리정해진크기의메모리를할당받는것 메모리의크기는프로그램이시작하기전에결정 int i, j; int buffer[80]; char name[] = data structure"; 처음에결정된크기보다더큰입력이들어온다면처리하지못함

More information

<4D F736F F F696E74202D FB8DEB8F0B8AE20B8C5C7CE205BC8A3C8AF20B8F0B5E55D>

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

More information

untitled

untitled while do-while for break continue while( ) ; #include 0 i int main(void) int meter; int i = 0; while(i < 3) meter = i * 1609; printf("%d %d \n", i, meter); i++; return 0; i i< 3 () 0 (1)

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 WEB SERVER PORTING 1 Jo, Heeseung 웹서버포팅 HBE-SM5-S4210 를임베디드웹서버로사용할수있도록웹서버를올리는작업 임베디드서버에널리쓰이는웹서버들중 GoAhead 라는웹서버를포팅 CGI 프로그램을이용하여웹에서 HBE-SM5-S4210 의 LED, 7- Segment, TextLCD 를제어실습 2 Goahead webserver 소스를다운받거나제공된

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

1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 #define _CRT_SECURE_NO_WARNINGS #include #include main() { char ch; printf(" 문자 1개를입력하시오 : "); scanf("%c", &ch); if (isalpha(ch))

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

이번장에서학습할내용 동적메모리란? malloc() 와 calloc() 연결리스트 파일을이용하면보다많은데이터를유용하고지속적으로사용및관리할수있습니다. 2

이번장에서학습할내용 동적메모리란? malloc() 와 calloc() 연결리스트 파일을이용하면보다많은데이터를유용하고지속적으로사용및관리할수있습니다. 2 제 17 장동적메모리와연결리스트 유준범 (JUNBEOM YOO) Ver. 2.0 jbyoo@konkuk.ac.kr http://dslab.konkuk.ac.kr 본강의자료는생능출판사의 PPT 강의자료 를기반으로제작되었습니다. 이번장에서학습할내용 동적메모리란? malloc() 와 calloc() 연결리스트 파일을이용하면보다많은데이터를유용하고지속적으로사용및관리할수있습니다.

More information

프로그램을 학교 등지에서 조금이라도 배운 사람들을 위한 프로그래밍 노트 입니다. 저 역시 그 사람들 중 하나 입니다. 중고등학교 시절 학교 도서관, 새로 생긴 시립 도서관 등을 다니며 책을 보 고 정리하며 어느정도 독학으르 공부하긴 했지만, 자주 안하다 보면 금방 잊어

프로그램을 학교 등지에서 조금이라도 배운 사람들을 위한 프로그래밍 노트 입니다. 저 역시 그 사람들 중 하나 입니다. 중고등학교 시절 학교 도서관, 새로 생긴 시립 도서관 등을 다니며 책을 보 고 정리하며 어느정도 독학으르 공부하긴 했지만, 자주 안하다 보면 금방 잊어 개나리 연구소 C 언어 노트 (tyback.egloos.com) 프로그램을 학교 등지에서 조금이라도 배운 사람들을 위한 프로그래밍 노트 입니다. 저 역시 그 사람들 중 하나 입니다. 중고등학교 시절 학교 도서관, 새로 생긴 시립 도서관 등을 다니며 책을 보 고 정리하며 어느정도 독학으르 공부하긴 했지만, 자주 안하다 보면 금방 잊어먹고 하더라구요. 그래서,

More information

비트와바이트 비트와바이트 비트 (Bit) : 2진수값하나 (0 또는 1) 를저장할수있는최소메모리공간 1비트 2비트 3비트... n비트 2^1 = 2개 2^2 = 4개 2^3 = 8개... 2^n 개 1 바이트는 8 비트 2 2

비트와바이트 비트와바이트 비트 (Bit) : 2진수값하나 (0 또는 1) 를저장할수있는최소메모리공간 1비트 2비트 3비트... n비트 2^1 = 2개 2^2 = 4개 2^3 = 8개... 2^n 개 1 바이트는 8 비트 2 2 비트연산자 1 1 비트와바이트 비트와바이트 비트 (Bit) : 2진수값하나 (0 또는 1) 를저장할수있는최소메모리공간 1비트 2비트 3비트... n비트 2^1 = 2개 2^2 = 4개 2^3 = 8개... 2^n 개 1 바이트는 8 비트 2 2 진수법! 2, 10, 16, 8! 2 : 0~1 ( )! 10 : 0~9 ( )! 16 : 0~9, 9 a, b,

More information

13주-14주proc.PDF

13주-14주proc.PDF 12 : Pro*C/C++ 1 2 Embeded SQL 3 PRO *C 31 C/C++ PRO *C NOT! NOT AND && AND OR OR EQUAL == = SQL,,, Embeded SQL SQL 32 Pro*C C SQL Pro*C C, C Pro*C, C C 321, C char : char[n] : n int, short, long : float

More information

Poison null byte Excuse the ads! We need some help to keep our site up. List 1 Conditions 2 Exploit plan 2.1 chunksize(p)!= prev_size (next_chunk(p) 3

Poison null byte Excuse the ads! We need some help to keep our site up. List 1 Conditions 2 Exploit plan 2.1 chunksize(p)!= prev_size (next_chunk(p) 3 Poison null byte Excuse the ads! We need some help to keep our site up. List 1 Conditions 2 Exploit plan 2.1 chunksize(p)!= prev_size (next_chunk(p) 3 Example 3.1 Files 3.2 Source code 3.3 Exploit flow

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

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

ActFax 4.31 Local Privilege Escalation Exploit

ActFax 4.31 Local Privilege Escalation Exploit NSHC 2012. 12. 19. 취약점 분석 보고서 Information Service about a new vulnerability [ ] 목 차 1. 개 요... 2 2. 공 격... 5 3. 분 석... 9 4. 결 론... 12 5. 대응방안... 12 6. 참고자료... 13 Copyright 2012 Red Alert. All Rights Reserved.

More information

< E20C6DFBFFEBEEE20C0DBBCBAC0BB20C0A7C7D12043BEF0BEEE20492E707074>

< E20C6DFBFFEBEEE20C0DBBCBAC0BB20C0A7C7D12043BEF0BEEE20492E707074> Chap #2 펌웨어작성을위한 C 언어 I http://www.smartdisplay.co.kr 강의계획 Chap1. 강의계획및디지털논리이론 Chap2. 펌웨어작성을위한 C 언어 I Chap3. 펌웨어작성을위한 C 언어 II Chap4. AT89S52 메모리구조 Chap5. SD-52 보드구성과코드메모리프로그래밍방법 Chap6. 어드레스디코딩 ( 매핑 ) 과어셈블리어코딩방법

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

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

[ 목차 ] 1. 취약점개요 2. 배경지식 3. 취약점발생결과 (exploit 테스트 ) 4. 취약점발생원인분석 4.1 취약점 Q&A 5. exploit 분석 6. 보안대책 7. 결론 8. 레퍼런스 2

[ 목차 ] 1. 취약점개요 2. 배경지식 3. 취약점발생결과 (exploit 테스트 ) 4. 취약점발생원인분석 4.1 취약점 Q&A 5. exploit 분석 6. 보안대책 7. 결론 8. 레퍼런스 2 CVE-2016-3857 취약점분석보고서 ( 안드로이드커널임의쓰기취약점 ) ㅁ작성자 : x90c (x90chacker@gmail.com) ㅁ작성일 : 2018 년 7 월 18 일 ( 수 ) ㅁ대외비등급 : A (Top Secret) 1 [ 목차 ] 1. 취약점개요 2. 배경지식 3. 취약점발생결과 (exploit 테스트 ) 4. 취약점발생원인분석 4.1 취약점

More information

학습목차 2.1 다차원배열이란 차원배열의주소와값의참조

학습목차 2.1 다차원배열이란 차원배열의주소와값의참조 - Part2- 제 2 장다차원배열이란무엇인가 학습목차 2.1 다차원배열이란 2. 2 2 차원배열의주소와값의참조 2.1 다차원배열이란 2.1 다차원배열이란 (1/14) 다차원배열 : 2 차원이상의배열을의미 1 차원배열과다차원배열의비교 1 차원배열 int array [12] 행 2 차원배열 int array [4][3] 행 열 3 차원배열 int array [2][2][3]

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

C 프로그래밊 개요

C 프로그래밊 개요 구조체 2009 년 5 월 19 일 김경중 강의계획수정 일자계획 Quiz 실습보강 5 월 19 일 ( 화 ) 구조체 Quiz ( 함수 ) 5 월 21 일 ( 목 ) 구조체저녁 6 시 5 월 26 일 ( 화 ) 포인터 5 월 28 일 ( 목 ) 특강 (12:00-1:30) 6 월 2 일 ( 화 ) 포인터 Quiz ( 구조체 ) 저녁 6 시 6 월 4 일 ( 목

More information

컴파일러

컴파일러 YACC 응용예 Desktop Calculator 7/23 Lex 입력 수식문법을위한 lex 입력 : calc.l %{ #include calc.tab.h" %} %% [0-9]+ return(number) [ \t] \n return(0) \+ return('+') \* return('*'). { printf("'%c': illegal character\n",

More information

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

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

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

슬라이드 1

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

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

SRC PLUS 제어기 MANUAL

SRC PLUS 제어기 MANUAL ,,,, DE FIN E I N T R E A L L O C E N D SU B E N D S U B M O TIO

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 임베디드리눅스개발환경실습 Jo, Heeseung 타겟보드모니터링동작실습 호스트 PC 에서시리얼포트를통해서타겟보드를모니터링 타겟보드가프로그램을실행하는동안일어나는일을시리얼포트로메시지를출력하면호스트 PC 에서는시리얼포트를통해메시지를수신하여이를화면에출력 minicom 프로그램사용 - minicom 이정상적으로설정이되고, 타겟보드에최소한부트로더가올라간상태라면 minicom

More information

Microsoft PowerPoint - ch09_파이프 [호환 모드]

Microsoft PowerPoint - ch09_파이프 [호환 모드] 학습목표 파이프를이용한 IPC 기법을이해한다. 이름없는파이프를이용해통신프로그램을작성할수있다. 이름있는파이프를이용해통신프로그램을작성할수있다. 파이프 IT CookBook, 유닉스시스템프로그래밍 2/20 목차 파이프의개념 이름없는파이프만들기 복잡한파이프생성 양방향파이프활용 이름있는파이프만들기 파이프의개념 파이프 두프로세스간에통신할수있도록해주는특수파일 그냥파이프라고하면일반적으로이름없는파이프를의미

More information

2009년 상반기 사업계획

2009년 상반기 사업계획 파이프 IT CookBook, 유닉스시스템프로그래밍 학습목표 파이프를이용한 IPC 기법을이해한다. 이름없는파이프를이용해통신프로그램을작성할수있다. 이름있는파이프를이용해통신프로그램을작성할수있다. 2/20 목차 파이프의개념 이름없는파이프만들기 복잡한파이프생성 양방향파이프활용 이름있는파이프만들기 3/20 파이프의개념 파이프 두프로세스간에통신할수있도록해주는특수파일 그냥파이프라고하면일반적으로이름없는파이프를의미

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

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

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

Microsoft PowerPoint - chap12 [호환 모드]

Microsoft PowerPoint - chap12 [호환 모드] 제 12 장고급입출력 Nov 2007 숙대창병모 1 Contents 1. Nonblocking I/O 2. Record Locking 3. Memory Mapped I/O Nov 2007 숙대창병모 2 12.1 Nonblocking I/O Nov 2007 숙대창병모 3 Nonblocking I/O Blocking I/O I/O 작업완료를기다리며영원히리턴안할수있다

More information

BMP 파일 처리

BMP 파일 처리 BMP 파일처리 김성영교수 금오공과대학교 컴퓨터공학과 학습내용 영상반전프로그램제작 2 Inverting images out = 255 - in 3 /* 이프로그램은 8bit gray-scale 영상을입력으로사용하여반전한후동일포맷의영상으로저장한다. */ #include #include #define WIDTHBYTES(bytes)

More information

C++-¿Ïº®Çؼ³10Àå

C++-¿Ïº®Çؼ³10Àå C C++. (preprocessor directives), C C++ C/C++... C++, C. C++ C. C C++. C,, C++, C++., C++.,.. #define #elif #else #error #if #itdef #ifndef #include #line #pragma #undef #.,.,. #include #include

More information

http://cafedaumnet/pway Chapter 1 Chapter 2 21 printf("this is my first program\n"); printf("\n"); printf("-------------------------\n"); printf("this is my second program\n"); printf("-------------------------\n");

More information

Microsoft Word - KPMC-400,401 SW 사용 설명서

Microsoft Word - KPMC-400,401 SW 사용 설명서 LKP Ethernet Card SW 사용설명서 Version Information Tornado 2.0, 2.2 알 림 여기에실린내용은제품의성능향상과신뢰도의증대를위하여예고없이변경될수도있습니다. 여기에실린내용의일부라도엘케이일레븐의사전허락없이어떠한유형의매체에복사되거나저장될수없으며전기적, 기계적, 광학적, 화학적인어떤방법으로도전송될수없습니다. 엘케이일레븐경기도성남시중원구상대원동

More information

Microsoft Word - FS_ZigBee_Manual_V1.3.docx

Microsoft Word - FS_ZigBee_Manual_V1.3.docx FirmSYS Zigbee etworks Kit User Manual FS-ZK500 Rev. 2008/05 Page 1 of 26 Version 1.3 목 차 1. 제품구성... 3 2. 개요... 4 3. 네트워크 설명... 5 4. 호스트/노드 설명... 6 네트워크 구성... 6 5. 모바일 태그 설명... 8 6. 프로토콜 설명... 9 프로토콜 목록...

More information

OCW_C언어 기초

OCW_C언어 기초 초보프로그래머를위한 C 언어기초 4 장 : 연산자 2012 년 이은주 학습목표 수식의개념과연산자및피연산자에대한학습 C 의알아보기 연산자의우선순위와결합방향에대하여알아보기 2 목차 연산자의기본개념 수식 연산자와피연산자 산술연산자 / 증감연산자 관계연산자 / 논리연산자 비트연산자 / 대입연산자연산자의우선순위와결합방향 조건연산자 / 형변환연산자 연산자의우선순위 연산자의결합방향

More information

ABC 11장

ABC 11장 12 장고급응용 0 수행중인프로그램 프로세스 모든프로세스는유일한프로세스식별번호 (PID) 를가짐 유닉스에서는 ps 명령을사용하여프로세스목록을볼수있음 12-1 프로세스 $ ps -aux USER PID %CPU %MEM SZ RSS TT STAT START TIME COMMAND blufox 17725 34.0 1.6 146 105 i2 R 15:13 0:00

More information

Microsoft PowerPoint - es-arduino-lecture-03

Microsoft PowerPoint - es-arduino-lecture-03 임베디드시스템개론 : Arduino 활용 Lecture #3: Button Input & FND Control 2012. 3. 25 by 김영주 강의목차 디지털입력 Button switch 입력 Button Debounce 7-Segment FND : 직접제어 7-Segment FND : IC 제어 2 디지털입력 : Switch 입력 (1) 실습목표 아두이노디지털입력처리실습

More information

0. 표지에이름과학번을적으시오. (6) 1. 변수 x, y 가 integer type 이라가정하고다음빈칸에 x 와 y 의계산결과값을적으시오. (5) x = (3 + 7) * 6; x = 60 x = (12 + 6) / 2 * 3; x = 27 x = 3 * (8 / 4

0. 표지에이름과학번을적으시오. (6) 1. 변수 x, y 가 integer type 이라가정하고다음빈칸에 x 와 y 의계산결과값을적으시오. (5) x = (3 + 7) * 6; x = 60 x = (12 + 6) / 2 * 3; x = 27 x = 3 * (8 / 4 Introduction to software design 2012-1 Final 2012.06.13 16:00-18:00 Student ID: Name: - 1 - 0. 표지에이름과학번을적으시오. (6) 1. 변수 x, y 가 integer type 이라가정하고다음빈칸에 x 와 y 의계산결과값을적으시오. (5) x = (3 + 7) * 6; x = 60 x

More information

chap8.PDF

chap8.PDF 8 Hello!! C 2 3 4 struct - {...... }; struct jum{ int x_axis; int y_axis; }; struct - {...... } - ; struct jum{ int x_axis; int y_axis; }point1, *point2; 5 struct {....... } - ; struct{ int x_axis; int

More information

Infinity(∞) Strategy

Infinity(∞) Strategy 배열 (Array) 대용량데이터 대용량데이터를다루는기법 배열 (Array) 포인터 (Pointer) 구조체 (Structure) 파일 (File) 변수 (Variable) 변수및메모리할당 변수선언 : int imsi; imsi 4 Bytes 변수선언 : char imsi2; imsi2 1 Byte 배열 (Array) 배열 동일한데이터형을가지고있는데이터들을처리할때사용

More information

SYN flooding

SYN flooding Hacking & Security Frontier SecurityFirst SYN flooding - SYN flooding 공격의원리와코드그리고대응 by amur, myusgun, leemeca 2008. 09. myusgun Agenda 개요...3 원리...3 위협...4 잠깐! - 문서에관하여...4 이문서는...4 Code...4 대응방안...4 소스코드...5

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

Microsoft PowerPoint - chap10-함수의활용.pptx

Microsoft PowerPoint - chap10-함수의활용.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

untitled

untitled - -, (insert) (delete) - - (insert) (delete) (top ) - - (insert) (rear) (delete) (front) A A B top A B C top push(a) push(b) push(c) A B top pop() top A B D push(d) top #define MAX_STACK_SIZE 100 int

More information

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

1장.  유닉스 시스템 프로그래밍 개요 9 장. 파이프 Unix 프로그래밍및실습 1 강의내용 1 절개요 2 절이름없는파이프 3 절이름있는파이프 http://lily.mmu.ac.kr/lecture/13u2/ch09.pdf 책에나온내용반드시 man 으로확인할것! UNIX, LINUX 등시스템마다차이가있을수있음을반드시인식 2 기본실습 #1 [ 예제 9-1] ~ [ 예제 9-7] ( 각 10점 ) 과제개요

More information

untitled

untitled int i = 10; char c = 69; float f = 12.3; int i = 10; char c = 69; float f = 12.3; printf("i : %u\n", &i); // i printf("c : %u\n", &c); // c printf("f : %u\n", &f); // f return 0; i : 1245024 c : 1245015

More information

<4D F736F F F696E74202D20B8B6C0CCC5A9B7CEC7C1B7CEBCBCBCAD202834C1D6C2F7207E2038C1D6C2F729>

<4D F736F F F696E74202D20B8B6C0CCC5A9B7CEC7C1B7CEBCBCBCAD202834C1D6C2F7207E2038C1D6C2F729> 8주차중간고사 ( 인터럽트및 A/D 변환기문제및풀이 ) Next-Generation Networks Lab. 외부입력인터럽트예제 문제 1 포트 A 의 7-segment 에초시계를구현한다. Tact 스위치 SW3 을 CPU 보드의 PE4 에연결한다. 그리고, SW3 을누르면하강 에지에서초시계가 00 으로초기화된다. 동시에 Tact 스위치 SW4 를 CPU 보드의

More information

03장.스택.key

03장.스택.key ---------------- DATA STRUCTURES USING C ---------------- 03CHAPTER 1 ? (stack): (LIFO:Last-In First-Out) 2 : top : ( index -1 ),,, 3 : ( ) ( ) -> ->. ->.... 4 Stack ADT : (LIFO) : init():. is_empty():

More information

Microsoft PowerPoint APUE(File InO)

Microsoft PowerPoint APUE(File InO) Linux/UNIX Programming 문양세강원대학교 IT특성화대학컴퓨터과학전공 강의목표및내용 강의목표 파일의특성을이해한다. 파일을열고닫는다. 파일로부터데이터를읽고쓴다. 기타파일제어함수를익힌다. 강의내용 파일구조 (UNIX 파일은어떤구조일까?) 파일관련시스템호출 시스템호출의효율과구조 Page 2 What is a File? A file is a contiguous

More information

DE1-SoC Board

DE1-SoC Board 실습 1 개발환경 DE1-SoC Board Design Tools - Installation Download & Install Quartus Prime Lite Edition http://www.altera.com/ Quartus Prime (includes Nios II EDS) Nios II Embedded Design Suite (EDS) is automatically

More information

<4D F736F F F696E74202D20C1A63132B0AD20B5BFC0FB20B8DEB8F0B8AEC7D2B4E7>

<4D F736F F F696E74202D20C1A63132B0AD20B5BFC0FB20B8DEB8F0B8AEC7D2B4E7> 제14장 동적 메모리 할당 Dynamic Allocation void * malloc(sizeof(char)*256) void * calloc(sizeof(char), 256) void * realloc(void *, size_t); Self-Referece NODE struct selfref { int n; struct selfref *next; }; Linked

More information

제1장 Unix란 무엇인가?

제1장  Unix란 무엇인가? 1 소켓 2 1 소켓 클라이언트 - 서버모델 네트워크응용프로그램 클리이언트 - 서버모델을기반으로동작한다. 클라이언트 - 서버모델 하나의서버프로세스와여러개의클라이언트로구성된다. 서버는어떤자원을관리하고클라이언트를위해자원관련서비스를제공한다. 3 소켓의종류 소켓 네트워크에대한사용자수준의인터페이스를제공 소켓은양방향통신방법으로클라이언트 - 서버모델을기반으로프로세스사이의통신에매우적합하다.

More information

Chapter 4. LISTS

Chapter 4. LISTS 6. 동치관계 (Equivalence Relations) 동치관계 reflexive, symmetric, transitive 성질을만족 "equal to"(=) 관계는동치관계임. x = x x = y 이면 y = x x = y 이고 y = z 이면 x = z 동치관계를이용하여집합 S 를 동치클래스 로분할 동일한클래스내의원소 x, y 에대해서는 x y 관계성립

More information

Chapter_06

Chapter_06 프로그래밍 1 1 Chapter 6. Functions and Program Structure April, 2016 Dept. of software Dankook University http://embedded.dankook.ac.kr/~baeksj 이장의강의목표 2 문자의입력방법을이해한다. 중첩된 if문을이해한다. while 반복문의사용법을익힌다. do 반복문의사용법을익힌다.

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

Microsoft PowerPoint - 09-Pipe

Microsoft PowerPoint - 09-Pipe 9. 파이프 상명대학교소프트웨어학부 파이프 시그널은이상한사건이나오류를처리하는데는이용하지만, 한프로세스로부터다른프로세스로대량의정보를전송하는데는부적합하다. 파이프 한프로세스를다른관련된프로세스에연결시켜주는단방향의통신채널 2 pipe() Usage #include int pipe(int filedes[2]); 3 < ex_1.c > #include

More information

untitled

untitled 자료형 기본자료형 : char, int, float, double 등 파생자료형 : 배열, 열거형, 구조체, 공용체 vs struct 구조체 _ 태그 _ 이름 자료형멤버 _ 이름 ; 자료형멤버 _ 이름 ;... ; struct student int number; // char name[10]; // double height; // ; // x값과 y값으로이루어지는화면의좌표

More information

Microsoft PowerPoint - chap2

Microsoft PowerPoint - chap2 제 2 장. 파일입출력 (File I/O) 숙대창병모 1 목표 파일의구조및특성을이해한다. 파일을열고닫는다. 파일로부터데이터를읽고쓴다. 파일현재위치변경 기타파일제어 숙대창병모 2 2.1 파일구조 숙대창병모 3 What is a file? a file is a contiguous sequence of bytes no format imposed by the operating

More information

<4D F736F F F696E74202D20C1A63137C0E520B5BFC0FBB8DEB8F0B8AEBFCD20BFACB0E1B8AEBDBAC6AE>

<4D F736F F F696E74202D20C1A63137C0E520B5BFC0FBB8DEB8F0B8AEBFCD20BFACB0E1B8AEBDBAC6AE> 쉽게풀어쓴 C 언어 Express 제 17 장동적메모리와연결리스트 이번장에서학습할내용 동적메모리할당의이해 동적메모리할당관련함수 연결리스트 동적메모리할당에대한개념을이해하고응용으로연결리스트를학습합니다. 동적할당메모리의개념 프로그램이메모리를할당받는방법 정적 (static) 동적 (dynamic) 정적메모리할당 정적메모리할당 프로그램이시작되기전에미리정해진크기의메모리를할당받는것

More information

Microsoft PowerPoint - chap03-변수와데이터형.pptx

Microsoft PowerPoint - chap03-변수와데이터형.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

[8051] 강의자료.PDF

[8051] 강의자료.PDF CY AC F0 RS1 RS0 OV - P 0xFF 0x80 0x7F 0x30 0x2F 0x20 0x1F 0x18 0x17 0x10 0x0F 0x08 0x07 0x00 0x0000 0x0FFF 0x1000 0xFFFF 0x0000 0xFFFF RAM SFR SMOD - - - GF1 GF0 PD IDL 31 19 18 9 12 13 14 15 1 2 3 4

More information