회원가입 ID/PW 찾기
AA
 아크마님께서 전에 올려주신  ds1620을 이용한 온도측정기 글에 따라 제작하고

첨부한 소스를 빌드시 아래와 같은 오류가 발생하였습니다.

혹시 제가 뭐 잘못한게 있는지?    AVR  Studio    와 |WinAVR 을 사용했습니다.

rm -rf ds1620.o ds16202.o  ds1620.elf dep/* ds1620.hex ds1620.eep
Build succeeded with 0 Warnings...
avr-gcc.exe  -mmcu=atmega16 -Wall -gdwarf-2 -O0 -MD -MP -MT ds1620.o -MF dep/ds1620.o.d  -c  ../ds1620.c
avr-gcc.exe  -mmcu=atmega16 -Wall -gdwarf-2 -O0 -MD -MP -MT ds16202.o -MF dep/ds16202.o.d  -c  ../ds16202.c
../ds16202.c:19: error: parse error before "value"
../ds16202.c: In function `ds1620_set_CLOCK':
../ds16202.c:21: error: `value' undeclared (first use in this function)
../ds16202.c:21: error: (Each undeclared identifier is reported only once
../ds16202.c:21: error: for each function it appears in.)
../ds16202.c:22: warning: implicit declaration of function `SETBIT'
../ds16202.c:22: error: `PORTA' undeclared (first use in this function)
../ds16202.c:22: error: `PORTA1' undeclared (first use in this function)
../ds16202.c:24: warning: implicit declaration of function `CLRBIT'
../ds16202.c: At top level:
../ds16202.c:28: error: parse error before "value"
../ds16202.c: In function `ds1620_set_RST':
../ds16202.c:30: error: `value' undeclared (first use in this function)
../ds16202.c:31: error: `PORTA' undeclared (first use in this function)
../ds16202.c:31: error: `PORTA2' undeclared (first use in this function)
../ds16202.c: At top level:
../ds16202.c:36: error: parse error before "value"
../ds16202.c: In function `ds1620_set_IO':
../ds16202.c:38: error: `DDRA' undeclared (first use in this function)
../ds16202.c:38: error: `PORTA0' undeclared (first use in this function)
../ds16202.c:39: error: `value' undeclared (first use in this function)
../ds16202.c:40: error: `PORTA' undeclared (first use in this function)
../ds16202.c: At top level:
../ds16202.c:46: error: parse error before "ds1620_get_IO"
../ds16202.c:47: warning: return type defaults to `int'
../ds16202.c: In function `ds1620_get_IO':
../ds16202.c:48: error: `PORTA' undeclared (first use in this function)
../ds16202.c:48: error: `PORTA0' undeclared (first use in this function)
../ds16202.c:49: warning: implicit declaration of function `CHKBIT'
../ds16202.c:49: error: `PINA' undeclared (first use in this function)
../ds16202.c:49: error: `PINA0' undeclared (first use in this function)
../ds16202.c: At top level:
../ds16202.c:52: error: parse error before "BYTE"
../ds16202.c:52: warning: type defaults to `int' in declaration of `degree'
../ds16202.c:52: warning: data definition has no type or storage class
../ds16202.c:54: error: parse error before "data"
../ds16202.c: In function `Put1620byte':
../ds16202.c:56: error: `BYTE' undeclared (first use in this function)
../ds16202.c:56: error: parse error before "i"
../ds16202.c:59: error: `i' undeclared (first use in this function)
../ds16202.c:65: error: `data' undeclared (first use in this function)
../ds16202.c: At top level:
../ds16202.c:79: error: parse error before "Get1620byte"
../ds16202.c:80: warning: return type defaults to `int'
../ds16202.c: In function `Get1620byte':
../ds16202.c:82: error: `BYTE' undeclared (first use in this function)
../ds16202.c:82: error: parse error before "i"
../ds16202.c:84: error: `DDRA' undeclared (first use in this function)
../ds16202.c:84: error: `DDA0' undeclared (first use in this function)
../ds16202.c:86: error: `data' undeclared (first use in this function)
../ds16202.c:87: error: `data1' undeclared (first use in this function)
../ds16202.c:95: error: `i' undeclared (first use in this function)
../ds16202.c: In function `ds1620_Init':
../ds16202.c:126: error: `DDRA' undeclared (first use in this function)
../ds16202.c:126: error: `DDA1' undeclared (first use in this function)
../ds16202.c:127: error: `DDA0' undeclared (first use in this function)
../ds16202.c:128: error: `DDA2' undeclared (first use in this function)
../ds16202.c: At top level:
../ds16202.c:139: error: parse error before '*' token
../ds16202.c: In function `GetTemperature':
../ds16202.c:141: error: `BYTE' undeclared (first use in this function)
../ds16202.c:141: error: parse error before "data"
../ds16202.c:148: error: `WORD' undeclared (first use in this function)
../ds16202.c:148: error: parse error before "count_remain"
../ds16202.c:161: error: `data' undeclared (first use in this function)
../ds16202.c:225: error: `temp_and_half_bit' undeclared (first use in this function)
../ds16202.c:226: error: `sign_bit' undeclared (first use in this function)
../ds16202.c:233: error: `count_remain' undeclared (first use in this function)
../ds16202.c:243: error: `count_per_c' undeclared (first use in this function)
../ds16202.c:262: warning: implicit declaration of function `sprintf'
../ds16202.c:262: error: `ptrTemp' undeclared (first use in this function)
../ds16202.c:262: warning: double format, float arg (arg 3)
../ds16202.c:262: warning: embedded `\0' in format
make: *** [ds16202.o] Error 1
Build failed with 49 errors and 10 warnings...
댓글 1
  • No Profile
    전에 군대에서 만드신다던 푸르미님이신거 같군요..

    일단 avrxx.h 와 같이 avr 모델에 따른 헤더파일을 인클루드 해줘야되고요

    128일경우에는

    #include "avr128.h"

    이런식인데 컴파일러마다 조금씩 다르니까 확인해보셔야 합니다.

    매크로로 사용된 setbit등도 main문 위에서 정의되어야 합니다;;

하드웨어 설계 및 개발에 대하여 개발자들이 자유롭게 토론하는 공간입니다.
- Q&A, 자유주재 토론, 관련 정보 공유
- 분야 : 마이크로프로세서 응용, 전기/전자(아날로그/디지털) 회로 설계, C/C++ 프로그래밍, 펌웨어,
         PCB Artwork, 트러블슈팅 등 하드웨어 설계에 관한 전반인 내용
※ 게시글에 맞는 분류를 선택하여 글을 작성해 주시면 쾌적한 사이트 운영에 많은 도움이 됩니다.
※ 하드웨어 인사이트는 회원들간의 거래정보를 게재할 뿐이지, 그 어떤 책임과 의무도 가지지 않습니다.

search
번호 분류 제목 글쓴이 조회 수 날짜
14 구인구직 HOT사람인 - 월급 1000만원 프로젝트, 프로그래머 모집 쭈니닷 5186 2012.06.18
13 구인구직 HOT(주)엑스큐어넷 - 소프트웨어 개발자(프로그래머) 채용 쭈니닷 5015 2012.06.12
12 구인구직 HOT(주)시뮬라인 - 기술개발본부 소프트웨어 팀 신입/경력사원 채용공고 쭈니닷 5586 2012.06.11
11 구인구직 HOT㈜엔써즈 - 시스템엔지니어 신입사원 모집 쭈니닷 6652 2012.06.08
10 구인구직 HOT㈜고우넷 - unix 엔지니어 채용 콘마개마 3944 2012.06.05
9 구인구직 HOT전액무료 자바(java)기반 하이브리드 프레임웍개발 안드로이드 개발교육과정 cocoa13 3602 2012.05.14
8 구인구직 HOT[교육부담 0%] 이공계 전액무료 하이브리드 앱 개발자 취업확정자 교육연수과정 cocoa13 5146 2012.05.01
7 구인구직 HOT[전액무료교육] 구로디지털 단지 자바개발 업체 채용확정자 취업교육” 안드로이드 개발 및 프로젝트 과정 cocoa13 3881 2012.04.30
6 구인구직 HOT[전액무료과정] 웹디자이너 양성교육 비주얼 컨텐츠 디자인 과정 안내 cocoa13 4737 2012.04.26
5 구인구직 HOTPOWER설계 및 하드웨어 경력자 찾아요. 박우종 5055 2012.03.07
4 구인구직 HOT회로수리 및 수땜, ECO작업등 필요하시면 연락주세요. 세윤파파 8810 2012.01.27
3 구인구직 HOT실력있는 펌웨어 엔지니어를 모집합니다. JamesHan 8266 2011.12.27
2 구인구직 HOT(주)로벤 연구소에서 연구원을 모집합니다. maddog 6656 2011.11.10
1 구인구직 HOT[급구] PCB 설계 경력자 & H/W 및 펌웨어 엔지니어 모집 용가리3 13731 2010.12.23
Prev 1 ... 5 6 7 8 9 10 11 12 13 14 Next
  • 경영인의 가장 중요한 과업중의 하나는 자기직원들의 불이행에 대한 변명을 없애는 것이다.
    - 타운센드
  • * 납포인트 정보 *
  • 글 작성 : 3
  • 댓글 작성 : 1
  • 내 글이 추천받음 : 1
저작권법에 위배되는 콘텐츠는 등록 불가하며, 저작물에 대한 권리는 저작자에게 있습니다.
Copyright 2006-2021 © hardwareis.com, All rights reserved.