1주차

배재영·2021년 5월 20일
0

자율주행 S/W 교육

목록 보기
1/7
post-thumbnail

😀1주차 - 임베디드 c언어
(#:명령어 입력, //:주석)

  1. VMplayer 설치 (Virtual Box) - windows에서 linux 사용 가능

  2. ubuntu 10. 10_installed(3kb) 설치
    (Linux 공유폴더 위치 : cd /mnt/hgfs/Data/)
    // player - manage - setting - 공유 폴더 add
    #cd /mnt/hgfs/Data/
    #cp MDS2450.bin /tftpboot
    #ls -al // 이 디렉토리에 어떤 파일이 있는지 표시
    // linux에서 tab을 활용하여 단어 자동 완성
    // Linux에서 tar은 묶음, bz2는 압축 파일의 확장자명
    // cd /root -> root@ubuntu- vm ~ // 로그인 중
    #tar xvjf arm-2011.03-42-arm-none-eabi-i686-pc-linux-gnu.tar.bzb2 // 압축 풀기
    // 크로스 컴파일러 환경 설정
    // Host Board
    #cd /etc
    #cd xinetd.d
    #gedit // vm editor
    #gedit tftpd

❗터미널 창에서 작성❗
service tftp
{
protocol = udp
port = 69
socket_type = dgram
wait = yes
user = nobody
server = /usr/sbin/in.tftpd

#mkdir /tftpboot
#chmod 777 /tftpboot
#/etc/init.d/xinetd restart
#netstat -au
// FTP = File Transform Port
// 이더넷 방식으로 연결하기 위해 tftp 사용
// Host Computer - server, Board - client


#ifconfig
#ifconfig eth1 192.168.0.2 up


#cp work.zip /root
#make clean
#make

  1. tera term 실행
    시리얼 포트 - COM 1 연결 - 설정 - 시리얼 포트 - 속도(115200) 설정 - uart(직렬)연결
    // Boot-loader prompt 상태 : 부팅 시 command 써주는 기능
    // server ip - PC, ipaddr - Board
    #printenv
    #tftp 30000000 MDS2450.bin // HostBoarcdd에 있는 30000000번째 주소 사용
    #go 30000000 // LED ON

directory에 copy
gedit Makefile에 추가

example 310 - LED ON
cp(TOPDIR)/(TOPDIR)/@ /tftboot
##평소에는 vcc1, gnd1 이었다가 gnd가 0이 되는 순간 스위치 ON

✔Main.c 접속 순서
1. cd /root
2. cd work
3. cd 03-06_~~
4. cd SOURCE
5. gedit Main.c

✔받아오는 Source.zip 리눅스에 옮기는 순서
1. # mkdir (source_name)final
2. # mv /mnt/hgfs/Data/final.zip ./final/
3. unzip -r final/final.zip
4. cd mnt/hgfs/Data/final/SOURCE/

profile
Automotive programer

0개의 댓글