Error building AT91 GNU sample project - "struct _reent"

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

Moderator: nferre

weartronics
Posts: 4
Joined: Fri Jan 23, 2009 2:10 am

Error building AT91 GNU sample project - "struct _reent"

Fri Jan 23, 2009 2:24 am

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
weartronics
Posts: 4
Joined: Fri Jan 23, 2009 2:10 am

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

Sat Jan 24, 2009 3:23 am

I have not resolved this problem, but a workaround appears to be to use the GNUARM toolchain.
raki7
Posts: 1
Joined: Mon Dec 12, 2005 10:36 am

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

Wed Dec 16, 2009 9:11 am

hi,

This error is linux gcc tools

try windows gcc tools

ok?

bye~~
glgi
Posts: 1
Joined: Tue May 04, 2010 11:11 am

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

Tue May 04, 2010 11:42 am

I have the same Problem. Is their still no solution ???
bastian
Posts: 17
Joined: Thu Jul 23, 2009 9:17 am

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

Thu May 06, 2010 2:27 pm

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.
bastian
Posts: 17
Joined: Thu Jul 23, 2009 9:17 am

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

Tue May 11, 2010 12:50 pm

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.
andi
Posts: 1
Joined: Tue Aug 10, 2010 8:43 am

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

Tue Aug 10, 2010 9:00 am

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.
Superfro
Posts: 11
Joined: Sun Jan 23, 2011 7:18 pm

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

Thu Mar 24, 2011 10:17 pm

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]

Return to “Development Tools”

Who is online

Users browsing this forum: No registered users and 2 guests