Weird warnings with IAR and ATSAM7A3 library from Atmel

All design tool related questions: compiler, assembler, linker. Embedded programming questions: assembler, C code.

Moderator: nferre

bulek
Posts: 13
Joined: Tue Mar 13, 2007 5:59 pm

Weird warnings with IAR and ATSAM7A3 library from Atmel

Thu May 03, 2007 1:41 pm

Hi,

I'm more or less newbie and have strange problems using library functions in my programs. I bet this is some basic knowledge I'm missing.

I'd like to get rid of those warnings :
Warning[w6]: Type conflict for external/entry "AT91F_PIO_ClearOutput", in module Oled against external/entry in module dataflash; prototyped function vs K&R function
I have this :

Code: Select all

in dataflash.h :
#define DATAFLASH_CHIP_SELECT	 (AT91F_PIO_ClearOutput(AT91C_BASE_PIOA, AT91C_PA7_SPI1_NPCS3))

in dataflash.c :
       ...TRACE_PRINT("AT91F_DataFlashExtID Manufacturer:%x DeviceID1:%x DeviceID1:%x StringLen:%x\n\r",*( (unsigned char *) (pDesc->rx_cmd_pt) +1),*( (unsigned char *) (pDesc->rx_cmd_pt) +2),*( (unsigned char *) (pDesc->rx_cmd_pt) +3),*( (unsigned char *) (pDesc->rx_cmd_pt) +4));
        DATAFLASH_CHIP_DESELECT ;...

in oled.h :
#define CLEAR(...)    { AT91F_PIO_ClearOutput(AT91C_BASE_PIOB,   __VA_ARGS__);  }
#define OLED_CSEL       (1<<22)	  /* PB22 -Chip Select  */

and use it in oled.c :

 CLEAR(OLED_CSEL);
What am I doing wrong ? Where can I get more info about proper use of #define ?

I also get error in other file that cannot understand .
Error[e46]: Undefined external "AT91F_PIO_CfgDirectDrive" referred in Oled ( C:\Atmel\Iar\....\RAM_Debug\Obj\Oled.r79 )
I have this in Oled.c :

Code: Select all

#include "include/AT91SAM7A3.h"
and use those functions without problems in other modules. What is wrong ?

In .map file I have :
Warning[w6]: Type conflict for external/entry "AT91F_PIO_ClearOutput", in module Oled against external/entry in module dataflash; prototyped function vs K&R function
/* In module Oled: */
/* K&R Function, args 0, attr 0 */
int (__atpcs __interwork AT91F_PIO_ClearOutput)();
/* In module dataflash: */
/* Function, args 2, attr 0 */
void (__atpcs __interwork AT91F_PIO_ClearOutput)(AT91PS_PIO,
unsigned int);
typedef struct _AT91S_PIO * AT91PS_PIO;
Warning[w6]: Type conflict for external/entry "AT91F_PIO_SetOutput", in module Oled against external/entry in module dataflash; prototyped function vs K&R function
/* In module Oled: */
/* K&R Function, args 0, attr 0 */
int (__atpcs __interwork AT91F_PIO_SetOutput)();
/* In module dataflash: */
/* Function, args 2, attr 0 */
void (__atpcs __interwork AT91F_PIO_SetOutput)(AT91PS_PIO,
unsigned int);
typedef struct _AT91S_PIO * AT91PS_PIO;
Warning[w6]: Type conflict for external/entry "AT91F_PIO_CfgOutput", in module Oled against external/entry in module main; prototyped function vs K&R function
/* In module Oled: */
/* K&R Function, args 0, attr 0 */
int (__atpcs __interwork AT91F_PIO_CfgOutput)();
/* In module main: */
/* Function, args 2, attr 0 */
void (__atpcs __interwork AT91F_PIO_CfgOutput)(AT91PS_PIO,
unsigned int);
typedef struct _AT91S_PIO * AT91PS_PIO;
Warning[w6]: Type conflict for external/entry "print_time", in module main against external/entry in module util; prototyped function vs K&R function
/* In module main: */
/* K&R Function, args 0, attr 0 */
int (__atpcs __interwork print_time)();
/* In module util: */
/* Function, args 0, attr 0 */
void (__atpcs __interwork print_time)(void);
Error[e46]: Undefined external "AT91F_PIO_CfgDirectDrive" referred in Oled ( C:\Atmel\Iar\Projekt_Varnost\Osnova\Compil\RAM_Debug\Obj\Oled.r79 )
Error[e46]: Undefined external "AT91F_PIO_ForceOutput" referred in Oled ( C:\Atmel\Iar\Projekt_Varnost\Osnova\Compil\RAM_Debug\Obj\Oled.r79 )
Thanks in advance,

regards,

B.
Galan
Posts: 1
Joined: Fri Mar 18, 2011 8:42 pm

Re: Weird warnings with IAR and ATSAM7A3 library from Atmel

Fri Mar 18, 2011 8:52 pm

Warning [w6]: Implies that you have duplicate .h or .hpp file in your project. Make sure only one copy of the AT91F_PIO_ClearOutput.h exists in your project directories.

Galan

Return to “Development Tools”

Who is online

Users browsing this forum: No registered users and 3 guests