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/06/09 02:49] suapapa우분투로_임베디드하기 [2013/08/03 05:04] (current) – external edit 127.0.0.1
Line 23: Line 23:
 ====== 크로스컴파일 ====== ====== 크로스컴파일 ======
   * 툴체인(컴파일러등...) 설치   * 툴체인(컴파일러등...) 설치
-    * 코드소서리, avr-gcc+    * [[http://www.codesourcery.com/|CodeSourcery]], avr-gcc
   * Make 파일의 예   * Make 파일의 예
 <code make> <code make>
Line 40: Line 40:
 OBJDUMP         = $(CROSS_COMPILE)objdump OBJDUMP         = $(CROSS_COMPILE)objdump
 </code> </code>
 +<code make>
 test : main.o read.o write.o test : main.o read.o write.o
                 gcc -o test main.o read.o write.o                 gcc -o test main.o read.o write.o
Line 50: Line 50:
 write.o: io.h write.c write.o: io.h write.c
                 gcc -c write.c                 gcc -c write.c
 +</code>
  
 ====== 컴파일 속도 업 ====== ====== 컴파일 속도 업 ======
Line 63: 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 76: 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
우분투로_임베디드하기.1276051798.txt.gz · Last modified: 2013/08/03 05:04 (external edit)