USIFGDC ?

I found some difficulties in trying to compile the example proposed by

TI in the slac080a.zip archive : msp430x20x3_ usi_06.c .

When I try to compile it, IAR returns 'Error[PE020] : identifier

“USIIFGCC” is undifined’.

Well as I’m a (real) newby I first thought it was my fault … but I

had first modify the .c file to choose the right processor I’m working

with : #include <msp430x20x3. h> (I’m learning with a eZ430!), so that

wasn’t the origin of the problem!

The advantage of such a problem (at least for me!) is that you have to

go futher in the ‘architecture’ of the compiler, the c language, the

files associated with the compiler …

I think I’ve ‘discover’ something! but it sure have been noticed

before by an expert (or I’m completely wrong and I’m doing somewhere

something idiot!):

In the software of TI, the interrupt flag in the USICNT control

register is named USIIFGCC, whereas it seems to be called USIFGDC in

the IAR compiler…

Two things : I didn’t understand how things are going and I’m

completely out of the subject or it’s right and I wonder how Z. Albus

from TI managed to compile and test the I2C exemples he proposed! (I

must admit that at that moment I’m trying to understand the exemples

he gave to the community … it could explain a lot of things !!!)

If someone can give me more informations I would be very very pleased

!! (my goal is to use the USI module with I2C to drive I2C LCD, ADC,

DAC … and I’m a little beat lost with the 4 examples of TI… I

would have preferred routines to drive the I2C module with for example

functions written in C with parametters like slave address, read or

write, data to write … I could have used ‘in extenso’ in my own

applications but I think I’ll have to do the job (and it will take a

long time for me I think …))

Didier

Nota : If I’m right, I’ll ask to IAR a reward : my so desired I2C

routines or a complete version of the compiler, or a private course in

C and MSP430 (it’s perhaps the best choice giving my present level

!!!) … OK I’m joking!!

:lol:

I think the author probably just had a private/earlier version of the include file.

I wouldn’t call it a bug in the compiler.

Just change the .c file to match the include file.

Phil

In the software of TI, the interrupt flag in the USICNT control register is named USIIFGCC, whereas it seems to be called USIFGDC in the IAR compiler…

Actually, IAR header files call this bit USIIFGDC, not USIFGDC.

I searched TI website and found only one reference of USIIFGCC by SLAU144?.pdf and no references to USIIFGDC or SUIFGDC at all.

Just try to be silly, I then Goggled the entire Internet. There are 11 references to USIIFGCC, no references to USIIFGDC, and 1 reference to USIFGDC (didier4064’s posting).

It is my opinion that USIIFGDC is a better name then USIIFGCC. It is also my opinion that the tail is trying to wag the dog.

In fact in the io430x20x3.h and in the msp430x20x3.h files the name of the variable is USIFGDC as I wrote it before and USIIFGCC in the MSP430 doumentation SLAU144.pdf. I thought that the compiler was using the registers name of the µC builder (TI in this case) in order programmers can do easely the link!

OK I can change the .h files to cope with the guide of TI (my version of IAR is V3.40B, which is the one provided with eZ430 kit) but if a download an upgrade, will it still work?

I will preferably (if the specialist do aggree!) change the TI example to cope with the compiler.

Nevertheless, I still don’t understand how does the TI programmer was able to compile the example with the wrong register name …???

Thank you for your answers and the informations you give all over the topics to the MSP community.

Didier.