Table of Contents

Intro

리눅스에 대한 일반적인 편견

초보 리눅스의 일반적인 실수

리눅스의 장점

리눅서가 현실에 타협하는 방법

크로스컴파일

CROSS_COMPILE="distcc arm-none-eabi-" -j16
# 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
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

컴파일 속도 업

일반적인 makefile
툴체인 적용
ccache 설명
distcc 설명

Embedded

소개할 어플

Fritzing

빵판에 사운드 센서 구성

eagle cad

arduino

설치

debian/control

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).

* AVR 크로스 컴파일러 설치 * 개발환경 설치

프로그래밍

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);
}

방금 지나간 일

buildlog

...
/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

upload

./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

소개하지 않은 어플들