Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Problems switching to embedded c++
PostPosted: Wed Mar 15, 2006 9:31 am 
Offline
User avatar

Joined: Mon Jul 25, 2005 2:22 pm
Posts: 52
Location: Germany
Hello.
I´m using the IAR Workbench 4.31KS and i have a problem.
I want to twitch the compiler from c to embedded c++ as language.

I´m using the twi-sample and every time i compile the projekt i get the error :

Error[e46]: Undefined external "AT91F_LowLevelInit" referred in ?RESET ( C:\Dokumente und Einstellungen\***\Eigene Dateien\usb\at91sam7s256_iar\

Can someboidy explain my, how i can fix this problem?
MrRossi


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 20, 2006 3:38 pm 
Offline
User avatar

Joined: Mon Jul 25, 2005 2:22 pm
Posts: 52
Location: Germany
Can nobody help me?

I tryy the atmel-sample but with no effect. Is the noboby how can give me a solution for this problem?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 20, 2006 11:31 pm 
Offline

Joined: Tue Oct 18, 2005 6:42 pm
Posts: 43
Try to declare AT91F_LowLevelInit as extern "C"


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 21, 2006 5:09 pm 
Offline
User avatar

Joined: Mon Jul 25, 2005 2:22 pm
Posts: 52
Location: Germany
Thanks for your help, but i have still the same error-message.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 23, 2006 6:12 pm 
Offline

Joined: Fri Jun 18, 2004 10:56 am
Posts: 96
Location: France
Hi

I confirm the declaration without error message

extern "C" void AT91F_Spurious_handler(void);
extern "C" void AT91F_Default_IRQ_handler(void);
extern "C" void AT91F_Default_FIQ_handler(void);

//*----------------------------------------------------------------------------
//* \fn AT91F_LowLevelInit
//* \brief This function performs very low level HW initialization
//* this function can be use a Stack, depending the compilation
//* optimization mode
//*----------------------------------------------------------------------------
extern "C" void AT91F_LowLevelInit( void) @ "ICODE"
{

JPP


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 24, 2006 10:00 am 
Offline

Joined: Fri Jan 06, 2006 2:48 pm
Posts: 29
Location: Netherlands
Hi,

Is the source in a .cpp file?
If it is in a .c file the linker can't resolve your function.

Arno


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 24, 2006 10:52 am 
Offline
User avatar

Joined: Mon Jul 25, 2005 2:22 pm
Posts: 52
Location: Germany
Thanks for your help!
Now ist works fine! It is not nessesary to chane the file-name in .cpp!
MrRossi


Top
 Profile  
 
 Post subject: Re: Problems switching to embedded c++
PostPosted: Thu Feb 04, 2010 3:22 pm 
Offline

Joined: Fri May 13, 2005 2:23 pm
Posts: 55
Hi,
I found this old post. I'm trying to do exactly what U were doing with the same error.When linking in C++.
How did U solve it?

Thanks


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: