유명환 - 우분투에서의 임베디드 개발 환경 구축 (2011y03m26d)
TRANSCRIPT
/** FILE : HELLO.C*/
#include <stdio.h>
int main(){printf(“Hello! \n”);return 0;
}
Hello.bin
Memory
HDD
Hello.bin
Memory
Hello.bin
Flash Compile
HW Programming
Execute
PC (Computer)Target Board
# include <stdio.h>
int main(void){
printf(“Hello\n”);
return 0;}
a.out (Executable ELF)gcc (GNU C Compiler)
hello.o (Relocatable ELF)
hello.c (C Source Code)
컴파일
링킹
# 처리
C 문법 검사
라이브러리 호출 루틴 추가
CPU, 메모리 등 정보 추가
Application
(System) Library
System Call
Virtual File System
Device File System
Character Device Driver
General File System Network File System
Buffer Cache
Block Device Driver
TCP/IP Protocol Stack
Network Device Driver
Device Interface
Block Device Character Device Network Device
User Level
Kernel Level
System Call Hacking
Software Interrupt
int main(){
………
open();
………}
fd = open();
sd = socket();
Application
open(){
………
swi 0x900005;
………}
(System) Library
Interrupt Vector (1)
Interrupt Vector (2)
Interrupt Vector (3)
Interrupt Vector (4)
Interrupt Vector (5)
………sys_open()
Software Interrupt System Call
Interrupt Vector Table
User Level Kernel Level
source1.S
source2.c
source3.c
source(n).c
...
vmlinux piggy.o
piggy.gz
unzip code
ELF BIN zImage
Firmware, RTOS System Non-RTOS System
Firmware User App. Firmware
User Application
OS (Kernel)
Hardware (Device)Hardware (Device)
VMware
Ubuntu LTS version : 10.04
AutomaticLogin=root : /etc/gdm/custom.conf
Some Packages update
Server Configuration : Samba, Telnet
PC (Computer) Target Board
Parallel, USB : Programming, JTAG
Serial : Monitoring
Ethernet, USB : Downloading