Page 1 of 1

Error building AT91 GNU sample project - "struct _reent"

Posted: Fri Jan 23, 2009 2:24 am
by weartronics
Hi AT91,

I am trying to build an AT91 GNU sample project, "getting-started-project-at91sam7x-ek". Here is the problem code.

Code: Select all

//------------------------------------------------------------------------------
//         Global Variables
//------------------------------------------------------------------------------

// Required for proper compilation.
struct _reent r = {0, (FILE *) 0, (FILE *) 1, (FILE *) 0};
struct _reent *_impure_ptr = &r;
The code is in ../at91lib/utility/stdio.c:64, however "struct _reent" is not defined in this source or any included headers, resulting in "error: variable 'r' has initializer but incomplete type". I am using the latest CodeSourcery G++ Lite toolchain on Linux. Searching Google doesn't provide any useful clues, please can you help me?

Best regards,

weartronics

Re: Error building AT91 GNU sample project - "struct _reent"

Posted: Sat Jan 24, 2009 3:23 am
by weartronics
I have not resolved this problem, but a workaround appears to be to use the GNUARM toolchain.

Re: Error building AT91 GNU sample project - "struct _reent"

Posted: Wed Dec 16, 2009 9:11 am
by raki7
hi,

This error is linux gcc tools

try windows gcc tools

ok?

bye~~

Re: Error building AT91 GNU sample project - "struct _reent"

Posted: Tue May 04, 2010 11:42 am
by glgi
I have the same Problem. Is their still no solution ???

Re: Error building AT91 GNU sample project - "struct _reent"

Posted: Thu May 06, 2010 2:27 pm
by bastian
The new bootstrap for the at91sam9g20 has the same problem. Seems that it can only be built with the CodeSourcery toolchain. Not very nice.
I have a toolchain under linux (using buildroot). Building the old bootstrap there is no problem, but the new one has this problem.
I really don't want to use CodeSourcery just for one bootstrap.

Re: Error building AT91 GNU sample project - "struct _reent"

Posted: Tue May 11, 2010 12:50 pm
by bastian
I asked the Atmel support and just got this link as an answer: http://support.atmel.no/bin/customer?=& ... try&id=898
It seems to be not possible to use something else than the CodeSourcery Toolchain.
Not nice, but there is no other solution.

Re: Error building AT91 GNU sample project - "struct _reent"

Posted: Tue Aug 10, 2010 9:00 am
by andi
It looks like you have to use exactly the right version of compiler: To get sam-ba applets to compile under linux I had to use Sourcery G++ Lite 2008q3-39 for ARM EABI from http://www.codesourcery.com/sgpp/lite/a ... release567 Anything newer or older gave (different) errors.

Re: Error building AT91 GNU sample project - "struct _reent"

Posted: Thu Mar 24, 2011 10:17 pm
by Superfro
Yep, this version works. Thanks a lot, I appreciate it.


[quote="andi"]It looks like you have to use exactly the right version of compiler: To get sam-ba applets to compile under linux I had to use Sourcery G++ Lite 2008q3-39 for ARM EABI from http://www.codesourcery.com/sgpp/lite/a ... release567 Anything newer or older gave (different) errors.[/quote]