User Tools

Site Tools


우분투로_임베디드하기

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
우분투로_임베디드하기 [2010/05/26 15:24] suapapa우분투로_임베디드하기 [2013/08/03 05:04] (current) – external edit 127.0.0.1
Line 2: Line 2:
   * 내 소개,   * 내 소개,
   * 어쩌다가 우분투를 쓰게 되었나?   * 어쩌다가 우분투를 쓰게 되었나?
 +====== 리눅스에 대한 일반적인 편견 ======
 +  * 리눅스는 공짜다 -> 리눅스는 비싸다
 +  * 하드웨어 지원이 부족하다
 +    * nvidia, HP6LPro, MS 전략 커맨더, 스캐너,
 +  * 좋아서(like) 쓴다 -> 좋아서(better) 쓴다
 +  * 어렵다 -> 쉽다
 +====== 초보 리눅스의 일반적인 실수 ======
 +  * root권한 남발
 +  * 질문은 공손하게
 +  * 아쉬운 사람이 우물 파라!
 +====== 리눅스의 장점 ======
 +  * bash >>>> 넘사벽 >>>> cmd
 +  * 각종 언어의 컴파일러가 공짜로 딸려온다.
 +  * 가장 효율적인 패지키 관리 시스템
 +====== 리눅서가 현실에 타협하는 방법 ======
 +  * 오픈소스 어플은 거의 대부분 다른 OS에서도 똑같이 동작한다
 +    * vim, gimp, openoffice, arduino, eaglecad, eclipse
 +  * cygwin, virtualbox, vmware와 같은 가상 리눅스 환경
 +  * python과 같은 os indepedent한 인터페이스가 철학인 언어 습득
 +====== 크로스컴파일 ======
 +  * 툴체인(컴파일러등...) 설치
 +    * [[http://www.codesourcery.com/|CodeSourcery]], avr-gcc
 +  * Make 파일의 예
 +<code make>
 +CROSS_COMPILE="distcc arm-none-eabi-" -j16
 +</code>
 +<code make> 
 +# Make variables (CC, etc...)
 +AS              = $(CROSS_COMPILE)as
 +LD              = $(CROSS_COMPILE)ld
 +CC              = $(CROSS_COMPILE)gcc
 +CPP             = $(CC) -E
 +AR              = $(CROSS_COMPILE)ar
 +NM              = $(CROSS_COMPILE)nm
 +STRIP           = $(CROSS_COMPILE)strip
 +OBJCOPY         = $(CROSS_COMPILE)objcopy
 +OBJDUMP         = $(CROSS_COMPILE)objdump
 +</code>
 +<code make>
 +test : main.o read.o write.o
 +                gcc -o test main.o read.o write.o
  
 +main.o : io.h main.c 
 +                gcc -c main.c
 +read.o : io.h read.c
 +                gcc -c read.c
 +write.o: io.h write.c
 +                gcc -c write.c
 +</code>
 +
 +====== 컴파일 속도 업 ======
 +  일반적인 makefile
 +  툴체인 적용
 +  ccache 설명
 +  distcc 설명
 ====== Embedded ====== ====== Embedded ======
   * XX안에 들어가 있는 컴퓨터   * XX안에 들어가 있는 컴퓨터
Line 10: Line 64:
   * qcad - 기구   * qcad - 기구
   * eagle cad - HW   * eagle cad - HW
-  * [[http://fritzing.org/download/|fritzing]]+===== Fritzing ===== 
 +빵판에 사운드 센서 구성 
 +  * [[http://fritzing.org/download/|Fritzing]] 
 +  * [[http://web.suapapa.net:8080/wordpress/?p=101&language=ko|참조 포스트]] 
   * gerbv - FAB   * gerbv - FAB
   * arduino - SW   * arduino - SW
Line 23: Line 81:
 ====== arduino ====== ====== arduino ======
   * 소개   * 소개
-    * 구입 +===== 설치 ===== 
-  * 설치 +debian/control 
-  * 프로그래밍+<code bash> 
 +Package: arduino 
 +Architecture: all 
 +Depends: ${misc:Depends}, gcc-avr, avr-libc, avrdude (>= 5.10-1ubuntu1), default-jre | java6-runtime, librxtx-java (>=2.1.7r2-4ubuntu1) 
 +Description: The Arduino libraries and the development environment 
 + Arduino is an open-source electronics prototyping platform based on flexible, 
 + easy-to-use hardware and software. It's intended for artists, designers, 
 + hobbyists, and anyone interested in creating interactive objects or   
 + environments. 
 + . 
 + Arduino can sense the environment by receiving input from a variety of sensors 
 + and can affect its surroundings by controlling lights, motors, and other 
 + actuators. The microcontroller on the board is programmed using the Arduino 
 + programming language (based on Wiring) and the Arduino development environment 
 + (based on Processing). Arduino projects can be stand-alone or they can 
 + communicate with software on running on a computer 
 + (e.g. Flash, Processing, MaxMSP). 
 + 
 +</code> 
 +AVR 크로스 컴파일러 설치 
 +개발환경 설치 
 + 
 +====== 프로그래밍 ===== 
 +<code cpp> 
 +bool isOn; 
 + 
 +void setup() 
 +
 +  pinMode(13, OUTPUT); 
 +  pinMode(12, INPUT); 
 + 
 +  isOn = false; 
 +  digitalWrite(13, HIGH); 
 +
 + 
 +void loop() 
 +
 +  if(digitalRead(12) == HIGH) 
 +  { 
 +    // double check for debouncing 
 +    delay(1); 
 +    if (digitalRead(12) == HIGH) 
 +    { 
 +        isOn = !isOn; 
 +    } 
 +  } 
 + 
 +  if(isOn) 
 +    digitalWrite(13, HIGH); 
 +  else 
 +    digitalWrite(13, LOW); 
 +
 +</code> 
 +====== 방금 지나간 일 ====== 
 +buildlog 
 +<code> 
 +... 
 +/usr/bin/avr-ar rcs applet/core.a /home/suapapa/apps/arduino-0017/hardware/cores/arduino/WInterrupts.o 
 +/usr/bin/avr-ar rcs applet/core.a /home/suapapa/apps/arduino-0017/hardware/cores/arduino/HardwareSerial.o 
 +/usr/bin/avr-ar rcs applet/core.a /home/suapapa/apps/arduino-0017/hardware/cores/arduino/WMath.o 
 +/usr/bin/avr-ar rcs applet/core.a /home/suapapa/apps/arduino-0017/hardware/cores/arduino/Print.o 
 +/usr/bin/avr-gcc -mmcu=atmega8 -I. -gstabs -DF_CPU=16000000 -I/home/suapapa/apps/arduino-0017/hardware/cores/arduino -Os -Wall -Wstrict-prototypes -std=gnu99  -o applet/ClapOn.elf applet/ClapOn.cpp -L. applet/core.a -lm 
 +/usr/bin/avr-objcopy -O ihex -R .eeprom applet/ClapOn.elf applet/ClapOn.hex 
 +</code> 
 +upload 
 +<code> 
 +./pulsedtr.py /dev/ttyUSB1 
 +/home/suapapa/apps/arduino-0017/hardware/tools/avrdude -V -F -C /home/suapapa/apps/arduino-0017/hardware/tools/avrdude.conf -p atmega8 -P /dev/ttyUSB1 -c stk500v1 -b 19200 -U flash:w:applet/ClapOn.hex 
 +</code> 
  
  
 ====== 소개하지 않은 어플들 ====== ====== 소개하지 않은 어플들 ======
   * gnucap   * gnucap
우분투로_임베디드하기.1274887465.txt.gz · Last modified: 2013/08/03 05:04 (external edit)