Problems switching to embedded c++

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

Moderator: nferre

User avatar
MrRossi
Location: Germany
Posts: 52
Joined: Mon Jul 25, 2005 2:22 pm

Problems switching to embedded c++

Wed Mar 15, 2006 9:31 am

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
User avatar
MrRossi
Location: Germany
Posts: 52
Joined: Mon Jul 25, 2005 2:22 pm

Mon Mar 20, 2006 3:38 pm

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?
Juro
Contact:
Posts: 43
Joined: Tue Oct 18, 2005 6:42 pm

Mon Mar 20, 2006 11:31 pm

Try to declare AT91F_LowLevelInit as extern "C"
User avatar
MrRossi
Location: Germany
Posts: 52
Joined: Mon Jul 25, 2005 2:22 pm

Tue Mar 21, 2006 5:09 pm

Thanks for your help, but i have still the same error-message.
JPP
Location: France
Posts: 96
Joined: Fri Jun 18, 2004 10:56 am

Thu Mar 23, 2006 6:12 pm

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
aarkest
Location: Netherlands
Posts: 31
Joined: Fri Jan 06, 2006 2:48 pm

Fri Mar 24, 2006 10:00 am

Hi,

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

Arno
User avatar
MrRossi
Location: Germany
Posts: 52
Joined: Mon Jul 25, 2005 2:22 pm

Fri Mar 24, 2006 10:52 am

Thanks for your help!
Now ist works fine! It is not nessesary to chane the file-name in .cpp!
MrRossi
gerharddvs
Posts: 55
Joined: Fri May 13, 2005 2:23 pm

Re: Problems switching to embedded c++

Thu Feb 04, 2010 3:22 pm

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

Return to “Development Tools”

Who is online

Users browsing this forum: No registered users and 6 guests