ASF example on V71 Xplained board gives error

AT91EB40A, EB55, EB42 Evaluation Boards , AT91RM9200-DK, RM3400-DK will be the focus of the discussions: hardware guidance, embedded software, use,...

Moderator: nferre

Marien
Location: The Netherlands
Posts: 22
Joined: Tue May 30, 2006 4:22 pm

ASF example on V71 Xplained board gives error

Fri Jul 29, 2016 2:40 pm

Hi,

I open the ASF example project called AFEC automatic comparison example from ASF 3.31.0.
I rebuild the project, but I get 2 errors:
- Error
recipe for target 'src/ASF/common/services/delay/sam/cycle_counter.o' failed AFEC_EXAMPLE31
D:\Marien\Documents\Atmel Studio\AFEC_EXAMPLE31\AFEC_EXAMPLE31\Debug\Makefile
284

and
- Error
's' undeclared here (not in a function) AFEC_EXAMPLE31
D:\Marien\Documents\Atmel Studio\AFEC_EXAMPLE31\AFEC_EXAMPLE31\src\ASF\sam\utils\compiler.h
242

What can that be? I changed nothing, I only load a new example project and I try to compile that.
This is the peace of code in the compiler.h file:

Code: Select all

/* Define OPTIMIZE_HIGH attribute */
#if defined   ( __CC_ARM   ) /* Keil µVision 4 */
#   define OPTIMIZE_HIGH _Pragma("O3") 
#elif defined ( __ICCARM__ ) /* IAR Ewarm 5.41+ */
#   define OPTIMIZE_HIGH _Pragma("optimize=high")
#elif defined (  __GNUC__  ) /* GCC CS3 2009q3-68 */
#   define OPTIMIZE_HIGH __attribute__((optimize(s)))
#endif
The optimize(s) caused the 2nd error. But other example projects are doing fine with the same compiler.h file.

Who can help me?
I use AS7.0.1006
Marien
PhillyNJ
Posts: 3
Joined: Tue Aug 02, 2016 2:16 am

Re: ASF example on V71 Xplained board gives error

Tue Aug 02, 2016 2:23 am

I've seen this error in a few examples. changing s to 's' works.

Code: Select all

#   define OPTIMIZE_HIGH __attribute__((optimize('s')))
Seems to be a bug in ASF

http://asf.atmel.com/bugzilla/show_bug.cgi?id=3715
Marien
Location: The Netherlands
Posts: 22
Joined: Tue May 30, 2006 4:22 pm

Re: ASF example on V71 Xplained board gives error

Tue Aug 02, 2016 9:13 am

Thank you, that helps.

But why are some examples from the same ASF with the same compiler.h file wrong and other fine?
However, it works now.
Thanks a lot.
Marien

Return to “Evaluation and Development Boards”

Who is online

Users browsing this forum: Google [Bot] and 25 guests