Solved: can't build some project example with Atmel Studio 7.0

Go To Last Post
10 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi everyone

 

I am a novice of atmel studio and of this ide.

I just installed atmel studio 7.0 and I compiled and run an example project for my evaluation board, the LEDs flash and I'm happy.

Next I tried to compile a second example project but I fail. I noticed that many of the example projects in the program fail to be compiled.

this is the error compiling adc_example:

 

Error        recipe for target 'src/adc_calibration.o' failed    ADC_EXAMPLE52    C:\Users\Samanta\Documents\Atmel Studio\7.0\ADC_EXAMPLE52\ADC_EXAMPLE52\Debug\Makefile    212

 

this is a part of the output file

------ Build started: Project: ADC_EXAMPLE52, Configuration: Debug AVR ------
Build started.
Project "ADC_EXAMPLE52.cproj" (default targets):
Target "PreBuildEvent" skipped, due to false condition; ('$(PreBuildEvent)'!='') was evaluated as (''!='').
Target "CoreBuild" in file "C:\Program Files (x86)\Atmel\Studio\7.0\Vs\Compiler.targets" from project "C:\Users\Andrea\Documents\Atmel Studio\7.0\ADC_EXAMPLE52\ADC_EXAMPLE52\ADC_EXAMPLE52.cproj" (target "Build" depends on it):
    Using "RunCompilerTask" task from assembly "C:\Program Files (x86)\Atmel\Studio\7.0\Extensions\Application\AvrGCC.dll".
    Task "RunCompilerTask"
        Shell Utils Path C:\Program Files (x86)\Atmel\Studio\7.0\shellUtils
        C:\Program Files (x86)\Atmel\Studio\7.0\shellUtils\make.exe all --jobs 4 --output-sync
        Building file: ../src/adc_calibration.c
        Invoking: AVR/GNU C Compiler : 5.4.0
        In file included from ../src/asf.h:56:0,
                         from ../src/adc_calibration.c:121:
        ../src/ASF/xmega/drivers/adc/adc.h: In function 'adcch_set_input':
C:\Users\Samanta\Documents\Atmel Studio\7.0\ADC_EXAMPLE52\ADC_EXAMPLE52\src\ASF\xmega\drivers\adc\adc.h(1458,5): error: 'ADC_CH_MUXNEGL_INTGND_gc' undeclared (first use in this function)
             ADC_CH_MUXNEGL_INTGND_gc
             ^
C:\Users\Samanta\Documents\Atmel Studio\7.0\ADC_EXAMPLE52\ADC_EXAMPLE52\src\ASF\xmega\drivers\adc\adc.h(1458,5): info: each undeclared identifier is reported only once for each function it appears in
C:\Users\Samanta\Documents\Atmel Studio\7.0\ADC_EXAMPLE52\ADC_EXAMPLE52\src\ASF\xmega\drivers\adc\adc.h(1459,7): error: 'ADC_CH_MUXNEGL_GND_gc' undeclared (first use in this function)
             : ADC_CH_MUXNEGL_GND_gc);
               ^

 

excuse me but I am a beginner, thanks for the help

Last Edited: Sat. Jan 6, 2018 - 08:16 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Welcome to AVRFreaks.

 

What is the name of the evaluation board you are using?  What is the full name of the example project you selected?  It is very hard to determine which project it is with just "ADC_EXAMPLE52" to go on.  Though I suspect it is a missing include file that is giving you the error that you posted.

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"void transmigratus(void) {transmigratus();} // recursio infinitus" - larryvc

"It's much more practical to rely on the processing powers of the real debugger, i.e. the one between the keyboard and chair." - JW wek3

"When you arise in the morning think of what a privilege it is to be alive: to breathe, to think, to enjoy, to love." -  Marcus Aurelius

Last Edited: Sat. Dec 16, 2017 - 08:45 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@larryvc wrote:

What is the name of the evaluation board you are using?  What is the full name of the example project you selected?

My guess is AVR XMEGA Analog to Digital Converter Driver Example 5 ADC calibration with the DAC voltage supply for reference voltage for the XMEGA-E5 Xplained.

 

edit: added emphasis

Greg Muth

Portland, OR, US

Atmel Studio 7.0 on Windows 10

Xplained/Pro/Mini Boards mostly

 

 

Last Edited: Sat. Dec 16, 2017 - 08:52 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@larryvc wrote:

Though I suspect it is a missing include file that is giving you the error that you posted.

 

...or changes to an header file without corresponding changes in other header file(s).  .../src/ASF/xmega/drivers/adc/adc.h has a number of #if !XMEGA_E conditionals.

 

Severity    Code    Description    Project    File    Line
Error        'ADC_SAMPNUM_512X_gc' undeclared here (not in a function)    ADC_EXAMPLE51    D:\Users\mutha\Documents\Atmel Studio\7.0\ADC_EXAMPLE51\ADC_EXAMPLE51\src\ASF\xmega\drivers\adc\adc.h    1610
Error        recipe for target 'src/adc_calibration.o' failed    ADC_EXAMPLE51    D:\Users\mutha\Documents\Atmel Studio\7.0\ADC_EXAMPLE51\ADC_EXAMPLE51\Debug\Makefile    212
Error        recipe for target 'src/ASF/xmega/drivers/adc/adc.o' failed    ADC_EXAMPLE51    D:\Users\mutha\Documents\Atmel Studio\7.0\ADC_EXAMPLE51\ADC_EXAMPLE51\Debug\Makefile    261
Error        recipe for target 'src/ASF/xmega/drivers/adc/xmega_e/adc_e.o' failed    ADC_EXAMPLE51    D:\Users\mutha\Documents\Atmel Studio\7.0\ADC_EXAMPLE51\ADC_EXAMPLE51\Debug\Makefile    268
Error        'ADC_CH_MUXNEGL_INTGND_gc' undeclared (first use in this function)    ADC_EXAMPLE51    D:\Users\mutha\Documents\Atmel Studio\7.0\ADC_EXAMPLE51\ADC_EXAMPLE51\src\ASF\xmega\drivers\adc\adc.h    1458
Message        each undeclared identifier is reported only once for each function it appears in    ADC_EXAMPLE51    D:\Users\mutha\Documents\Atmel Studio\7.0\ADC_EXAMPLE51\ADC_EXAMPLE51\src\ASF\xmega\drivers\adc\adc.h    1458
Error        'ADC_CH_MUXNEGL_INTGND_gc' undeclared (first use in this function)    ADC_EXAMPLE51    D:\Users\mutha\Documents\Atmel Studio\7.0\ADC_EXAMPLE51\ADC_EXAMPLE51\src\ASF\xmega\drivers\adc\adc.h    1458
Message        each undeclared identifier is reported only once for each function it appears in    ADC_EXAMPLE51    D:\Users\mutha\Documents\Atmel Studio\7.0\ADC_EXAMPLE51\ADC_EXAMPLE51\src\ASF\xmega\drivers\adc\adc.h    1458
Error        'ADC_CH_MUXNEGL_INTGND_gc' undeclared (first use in this function)    ADC_EXAMPLE51    D:\Users\mutha\Documents\Atmel Studio\7.0\ADC_EXAMPLE51\ADC_EXAMPLE51\src\ASF\xmega\drivers\adc\adc.h    1458
Message        each undeclared identifier is reported only once for each function it appears in    ADC_EXAMPLE51    D:\Users\mutha\Documents\Atmel Studio\7.0\ADC_EXAMPLE51\ADC_EXAMPLE51\src\ASF\xmega\drivers\adc\adc.h    1458
Error        'ADC_CH_MUXNEGL_GND_gc' undeclared (first use in this function)    ADC_EXAMPLE51    D:\Users\mutha\Documents\Atmel Studio\7.0\ADC_EXAMPLE51\ADC_EXAMPLE51\src\ASF\xmega\drivers\adc\adc.h    1459
Error        'ADC_CH_MUXNEGL_GND_gc' undeclared (first use in this function)    ADC_EXAMPLE51    D:\Users\mutha\Documents\Atmel Studio\7.0\ADC_EXAMPLE51\ADC_EXAMPLE51\src\ASF\xmega\drivers\adc\adc.h    1459
Error        'ADC_CH_MUXNEGL_GND_gc' undeclared (first use in this function)    ADC_EXAMPLE51    D:\Users\mutha\Documents\Atmel Studio\7.0\ADC_EXAMPLE51\ADC_EXAMPLE51\src\ASF\xmega\drivers\adc\adc.h    1459
Error        'ADC_SAMPNUM_2X_gc' undeclared here (not in a function)    ADC_EXAMPLE51    D:\Users\mutha\Documents\Atmel Studio\7.0\ADC_EXAMPLE51\ADC_EXAMPLE51\src\ASF\xmega\drivers\adc\adc.h    1594
Error        'ADC_SAMPNUM_2X_gc' undeclared here (not in a function)    ADC_EXAMPLE51    D:\Users\mutha\Documents\Atmel Studio\7.0\ADC_EXAMPLE51\ADC_EXAMPLE51\src\ASF\xmega\drivers\adc\adc.h    1594
Error        'ADC_SAMPNUM_2X_gc' undeclared here (not in a function)    ADC_EXAMPLE51    D:\Users\mutha\Documents\Atmel Studio\7.0\ADC_EXAMPLE51\ADC_EXAMPLE51\src\ASF\xmega\drivers\adc\adc.h    1594
Error        'ADC_SAMPNUM_4X_gc' undeclared here (not in a function)    ADC_EXAMPLE51    D:\Users\mutha\Documents\Atmel Studio\7.0\ADC_EXAMPLE51\ADC_EXAMPLE51\src\ASF\xmega\drivers\adc\adc.h    1596
Error        'ADC_SAMPNUM_4X_gc' undeclared here (not in a function)    ADC_EXAMPLE51    D:\Users\mutha\Documents\Atmel Studio\7.0\ADC_EXAMPLE51\ADC_EXAMPLE51\src\ASF\xmega\drivers\adc\adc.h    1596
Error        'ADC_SAMPNUM_4X_gc' undeclared here (not in a function)    ADC_EXAMPLE51    D:\Users\mutha\Documents\Atmel Studio\7.0\ADC_EXAMPLE51\ADC_EXAMPLE51\src\ASF\xmega\drivers\adc\adc.h    1596
Error        'ADC_SAMPNUM_8X_gc' undeclared here (not in a function)    ADC_EXAMPLE51    D:\Users\mutha\Documents\Atmel Studio\7.0\ADC_EXAMPLE51\ADC_EXAMPLE51\src\ASF\xmega\drivers\adc\adc.h    1598
Error        'ADC_SAMPNUM_8X_gc' undeclared here (not in a function)    ADC_EXAMPLE51    D:\Users\mutha\Documents\Atmel Studio\7.0\ADC_EXAMPLE51\ADC_EXAMPLE51\src\ASF\xmega\drivers\adc\adc.h    1598
Error        'ADC_SAMPNUM_8X_gc' undeclared here (not in a function)    ADC_EXAMPLE51    D:\Users\mutha\Documents\Atmel Studio\7.0\ADC_EXAMPLE51\ADC_EXAMPLE51\src\ASF\xmega\drivers\adc\adc.h    1598
Error        'ADC_SAMPNUM_16X_gc' undeclared here (not in a function)    ADC_EXAMPLE51    D:\Users\mutha\Documents\Atmel Studio\7.0\ADC_EXAMPLE51\ADC_EXAMPLE51\src\ASF\xmega\drivers\adc\adc.h    1600
Error        'ADC_SAMPNUM_16X_gc' undeclared here (not in a function)    ADC_EXAMPLE51    D:\Users\mutha\Documents\Atmel Studio\7.0\ADC_EXAMPLE51\ADC_EXAMPLE51\src\ASF\xmega\drivers\adc\adc.h    1600
Error        'ADC_SAMPNUM_16X_gc' undeclared here (not in a function)    ADC_EXAMPLE51    D:\Users\mutha\Documents\Atmel Studio\7.0\ADC_EXAMPLE51\ADC_EXAMPLE51\src\ASF\xmega\drivers\adc\adc.h    1600
Error        'ADC_SAMPNUM_32X_gc' undeclared here (not in a function)    ADC_EXAMPLE51    D:\Users\mutha\Documents\Atmel Studio\7.0\ADC_EXAMPLE51\ADC_EXAMPLE51\src\ASF\xmega\drivers\adc\adc.h    1602
Error        'ADC_SAMPNUM_32X_gc' undeclared here (not in a function)    ADC_EXAMPLE51    D:\Users\mutha\Documents\Atmel Studio\7.0\ADC_EXAMPLE51\ADC_EXAMPLE51\src\ASF\xmega\drivers\adc\adc.h    1602
Error        'ADC_SAMPNUM_32X_gc' undeclared here (not in a function)    ADC_EXAMPLE51    D:\Users\mutha\Documents\Atmel Studio\7.0\ADC_EXAMPLE51\ADC_EXAMPLE51\src\ASF\xmega\drivers\adc\adc.h    1602
Error        'ADC_SAMPNUM_64X_gc' undeclared here (not in a function)    ADC_EXAMPLE51    D:\Users\mutha\Documents\Atmel Studio\7.0\ADC_EXAMPLE51\ADC_EXAMPLE51\src\ASF\xmega\drivers\adc\adc.h    1604
Error        'ADC_SAMPNUM_64X_gc' undeclared here (not in a function)    ADC_EXAMPLE51    D:\Users\mutha\Documents\Atmel Studio\7.0\ADC_EXAMPLE51\ADC_EXAMPLE51\src\ASF\xmega\drivers\adc\adc.h    1604
Error        'ADC_SAMPNUM_64X_gc' undeclared here (not in a function)    ADC_EXAMPLE51    D:\Users\mutha\Documents\Atmel Studio\7.0\ADC_EXAMPLE51\ADC_EXAMPLE51\src\ASF\xmega\drivers\adc\adc.h    1604
Error        'ADC_SAMPNUM_128X_gc' undeclared here (not in a function)    ADC_EXAMPLE51    D:\Users\mutha\Documents\Atmel Studio\7.0\ADC_EXAMPLE51\ADC_EXAMPLE51\src\ASF\xmega\drivers\adc\adc.h    1606
Error        'ADC_SAMPNUM_128X_gc' undeclared here (not in a function)    ADC_EXAMPLE51    D:\Users\mutha\Documents\Atmel Studio\7.0\ADC_EXAMPLE51\ADC_EXAMPLE51\src\ASF\xmega\drivers\adc\adc.h    1606
Error        'ADC_SAMPNUM_128X_gc' undeclared here (not in a function)    ADC_EXAMPLE51    D:\Users\mutha\Documents\Atmel Studio\7.0\ADC_EXAMPLE51\ADC_EXAMPLE51\src\ASF\xmega\drivers\adc\adc.h    1606
Error        'ADC_SAMPNUM_256X_gc' undeclared here (not in a function)    ADC_EXAMPLE51    D:\Users\mutha\Documents\Atmel Studio\7.0\ADC_EXAMPLE51\ADC_EXAMPLE51\src\ASF\xmega\drivers\adc\adc.h    1608
Error        'ADC_SAMPNUM_256X_gc' undeclared here (not in a function)    ADC_EXAMPLE51    D:\Users\mutha\Documents\Atmel Studio\7.0\ADC_EXAMPLE51\ADC_EXAMPLE51\src\ASF\xmega\drivers\adc\adc.h    1608
Error        'ADC_SAMPNUM_256X_gc' undeclared here (not in a function)    ADC_EXAMPLE51    D:\Users\mutha\Documents\Atmel Studio\7.0\ADC_EXAMPLE51\ADC_EXAMPLE51\src\ASF\xmega\drivers\adc\adc.h    1608
Error        'ADC_SAMPNUM_512X_gc' undeclared here (not in a function)    ADC_EXAMPLE51    D:\Users\mutha\Documents\Atmel Studio\7.0\ADC_EXAMPLE51\ADC_EXAMPLE51\src\ASF\xmega\drivers\adc\adc.h    1610
Error        'ADC_SAMPNUM_512X_gc' undeclared here (not in a function)    ADC_EXAMPLE51    D:\Users\mutha\Documents\Atmel Studio\7.0\ADC_EXAMPLE51\ADC_EXAMPLE51\src\ASF\xmega\drivers\adc\adc.h    1610
Error        'ADC_SAMPNUM_1024X_gc' undeclared here (not in a function)    ADC_EXAMPLE51    D:\Users\mutha\Documents\Atmel Studio\7.0\ADC_EXAMPLE51\ADC_EXAMPLE51\src\ASF\xmega\drivers\adc\adc.h    1612
Error        'ADC_SAMPNUM_1024X_gc' undeclared here (not in a function)    ADC_EXAMPLE51    D:\Users\mutha\Documents\Atmel Studio\7.0\ADC_EXAMPLE51\ADC_EXAMPLE51\src\ASF\xmega\drivers\adc\adc.h    1612
Error        'ADC_SAMPNUM_1024X_gc' undeclared here (not in a function)    ADC_EXAMPLE51    D:\Users\mutha\Documents\Atmel Studio\7.0\ADC_EXAMPLE51\ADC_EXAMPLE51\src\ASF\xmega\drivers\adc\adc.h    1612

 

Greg Muth

Portland, OR, US

Atmel Studio 7.0 on Windows 10

Xplained/Pro/Mini Boards mostly

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Greg Muth

Portland, OR, US

Atmel Studio 7.0 on Windows 10

Xplained/Pro/Mini Boards mostly

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Greg_Muth wrote:

@larryvc wrote:

What is the name of the evaluation board you are using?  What is the full name of the example project you selected?

My guess is AVR XMEGA Analog to Digital Converter Driver Example 5 ADC calibration with the DAC voltage supply for reference voltage for the XMEGA-E5 Xplained.

 

edit: added emphasis

 

100% true

how did u get XMEGA-E5 Xplained?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

#define XMEGA_E , checked....it's defined

 

looking to the other post, the problem is this file:

 

The old iox32e5.h is located at Atmel/Sudio/7.0/toolchain/avr8/avr8-gnu-toolchain/avr/include/avr. 

The new one is located at Atmel/Studio/7.0/packs/atmel/XMEGAE_DFP/1.2.51/include/avr. 

 

putting the old file in place of the new one solved the problem, the project build correctly.

 

I will have to move files for all the projects?

What's the easiest way to direct the compiler to include the old one instead of the new one?

What's the right approach to solve these problems?

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@samantha_s wrote:

100% true

how did u get XMEGA-E5 Xplained?

I have an XMEGA-E5 Xplained and remember having similar problems.

 

I will have to move files for all the projects?

No.  You've already replaced the new, broken header file with the older, working one, although installing/upgrading the XMEGAE device pack will either break it again (more likely) or fix it (less likely).

 

What's the right approach to solve these problems?

File a bug report and wait for Hell to freeze over..?

 

Greg Muth

Portland, OR, US

Atmel Studio 7.0 on Windows 10

Xplained/Pro/Mini Boards mostly

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The official fix is here
 

EDIT: and it works!  I get a single warning when doing a build now:

Severity    Code    Description    Project    File    Line
Warning        'sck_pin' may be used uninitialized in this function [-Wmaybe-uninitialized]    ADC_EXAMPLE51    D:\Users\mutha\Documents\Atmel Studio\7.0\ADC_EXAMPLE51\ADC_EXAMPLE51\src\ASF\xmega\drivers\usart\usart.c    101

 

Greg Muth

Portland, OR, US

Atmel Studio 7.0 on Windows 10

Xplained/Pro/Mini Boards mostly

 

 

Last Edited: Sun. Dec 17, 2017 - 07:36 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

100% examples working

 

thanks