Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

RE: [AVR-Chat] Re: WinAvr TWI include files

2010-12-29 by Steve Hodge

Don, I think I have those things correctly.   Here are the include files (in
order):

 

#include <inttypes.h>

#include <stdio.h>

#include <stdlib.h>

#include <avr/io.h>

 

and here is the compile line generated and the first few error messages:

 

avr-gcc -I"C:\Program Files\WinAVR\avr\include\avr" -I"C:\Program
Files\WinAVR\avr\include\util"  -mmcu=atmega644p -Wall -gdwarf-2 -Os
-std=gnu99 -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums
-MD -MP -MT I2C.o -MF dep/I2C.o.d  -c  ../I2C

.c

 

../I2C.c: In function 'ioinit':

../I2C.c:106: error: 'TXEN' undeclared (first use in this function)

../I2C.c:106: error: (Each undeclared identifier is reported only once

.........

 

Roger on the reason for the other twi.h files.   Does that mean I can delete
those other include directories if I know I'll never need to go backwards?

 

Steve

 

From: AVR-Chat@yahoogroups.com [mailto:AVR-Chat@yahoogroups.com] On Behalf
Of Don Kinzer
Sent: Wednesday, December 29, 2010 10:54 AM
To: AVR-Chat@yahoogroups.com
Subject: [AVR-Chat] Re: WinAvr TWI include files

 

  

--- In AVR-Chat@yahoogroups.com <mailto:AVR-Chat%40yahoogroups.com> , "Steve
Hodge" <steve@...> wrote:
>But the Project Configuration/Compile does
>not seem to use [the file iom644PA.h].
The part-specific include file will be included automatically if:
1) you include "avr/io.h"
2) you properly define the target MCU so that it gets passed to the compiler
via the -mmcu option.

Failure to do either of these will result in the register/bit names not
being present.

> Why, for one thing, the multiple TWI.H files?
The avr-libc documentation suggests including "util/twi.h". Why not just
follow that advice? The other twi.h files may be in their respective
locations for backward compatibility with previous versions.

Don Kinzer
ZBasic Microcontrollers
http://www.zbasic.net





__________ Information from ESET Smart Security, version of virus signature
database 5742 (20101229) __________

The message was checked by ESET Smart Security.

http://www.eset.com

 

__________ Information from ESET Smart Security, version of virus signature
database 5742 (20101229) __________

 

The message was checked by ESET Smart Security.

 

http://www.eset.com



[Non-text portions of this message have been removed]

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.