Problem with ASF in Microchip Studio and XMEGA-E5

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

Hello,

 

i have fresh install of Microchip Studio für AVR and SAM devices (November 2020 Version from MC Website).

I´ve created a new "GCC C ASF Board Project" and select the Board "XMEGA-E5 Xplained - ATxmega32E5" in the following dialog. So far so good. Next i opened ASF Wizard and added ADC Support to my project. After trying to compile my Project, compile process fails with a lot of errors (some of them ADC-related). If i remove ADC Support, my (empty) Project compiles fine.
Can anyone confirm this Problem? I have tried a full reinstall of Microchip Studio but it is still the same error. Because of the pandemic i have no chance to try it on another PC at the moment.

Versions are:

MC-Studio: 7.0.2542 (November 2020 Version from Website)
ASF: 3.49.1

Device Pack XMEGAE_DFP: 1.3.114

 

It would be nice if anyone can help me. Because i want to use a lot of the ASF Drivers for my Project. But if it fails with simple ADC it is frustrating.

 

Thank you for your help!!!

 

This topic has a solution.
Last Edited: Thu. Dec 17, 2020 - 11:07 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

funnybox2006 wrote:
compile process fails with a lot of errors

you need to show the errors, and the code they relate to.

 

You can copy & paste the messages from the 'Output' window.

 

See Tip #1 in my signature, below, for how to post source code (or zip-up and attach the Project):

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Here is the Sourcecode (Generated automatically by MC-Studio). The only thing i did is adding ADC Support with ASF Wizard.

 

#include <asf.h>

int main (void)
{
	/* Insert system clock initialization code here (sysclk_init()). */

	board_init();

	/* Insert application code here, after the board has been initialized. */
}

and here ist the Output after Compiling:

 

Severity	Code	Description	Project	File	Line
Error		recipe for target 'src/ASF/xmega/drivers/adc/adc.o' failed	GccBoardProject1	C:\Users\Florian\Documents\Atmel Studio\7.0\GccBoardProject1\GccBoardProject1\Debug\Makefile	180
Error		recipe for target 'src/ASF/xmega/drivers/adc/xmega_e/adc_e.o' failed	GccBoardProject1	C:\Users\Florian\Documents\Atmel Studio\7.0\GccBoardProject1\GccBoardProject1\Debug\Makefile	187
Error		'ADC_CH_MUXNEGL_INTGND_gc' undeclared (first use in this function)	GccBoardProject1	C:\Users\Florian\Documents\Atmel Studio\7.0\GccBoardProject1\GccBoardProject1\src\ASF\xmega\drivers\adc\adc.h	1448
Message		each undeclared identifier is reported only once for each function it appears in	GccBoardProject1	C:\Users\Florian\Documents\Atmel Studio\7.0\GccBoardProject1\GccBoardProject1\src\ASF\xmega\drivers\adc\adc.h	1448
Error		'ADC_CH_MUXNEGL_INTGND_gc' undeclared (first use in this function)	GccBoardProject1	C:\Users\Florian\Documents\Atmel Studio\7.0\GccBoardProject1\GccBoardProject1\src\ASF\xmega\drivers\adc\adc.h	1448
Message		each undeclared identifier is reported only once for each function it appears in	GccBoardProject1	C:\Users\Florian\Documents\Atmel Studio\7.0\GccBoardProject1\GccBoardProject1\src\ASF\xmega\drivers\adc\adc.h	1448
Error		'ADC_CH_MUXNEGL_GND_gc' undeclared (first use in this function)	GccBoardProject1	C:\Users\Florian\Documents\Atmel Studio\7.0\GccBoardProject1\GccBoardProject1\src\ASF\xmega\drivers\adc\adc.h	1449
Error		'ADC_CH_MUXNEGL_GND_gc' undeclared (first use in this function)	GccBoardProject1	C:\Users\Florian\Documents\Atmel Studio\7.0\GccBoardProject1\GccBoardProject1\src\ASF\xmega\drivers\adc\adc.h	1449
Error		'ADC_SAMPNUM_2X_gc' undeclared here (not in a function)	GccBoardProject1	C:\Users\Florian\Documents\Atmel Studio\7.0\GccBoardProject1\GccBoardProject1\src\ASF\xmega\drivers\adc\adc.h	1584
Error		'ADC_SAMPNUM_2X_gc' undeclared here (not in a function)	GccBoardProject1	C:\Users\Florian\Documents\Atmel Studio\7.0\GccBoardProject1\GccBoardProject1\src\ASF\xmega\drivers\adc\adc.h	1584
Error		'ADC_SAMPNUM_4X_gc' undeclared here (not in a function)	GccBoardProject1	C:\Users\Florian\Documents\Atmel Studio\7.0\GccBoardProject1\GccBoardProject1\src\ASF\xmega\drivers\adc\adc.h	1586
Error		'ADC_SAMPNUM_4X_gc' undeclared here (not in a function)	GccBoardProject1	C:\Users\Florian\Documents\Atmel Studio\7.0\GccBoardProject1\GccBoardProject1\src\ASF\xmega\drivers\adc\adc.h	1586
Error		'ADC_SAMPNUM_8X_gc' undeclared here (not in a function)	GccBoardProject1	C:\Users\Florian\Documents\Atmel Studio\7.0\GccBoardProject1\GccBoardProject1\src\ASF\xmega\drivers\adc\adc.h	1588
Error		'ADC_SAMPNUM_8X_gc' undeclared here (not in a function)	GccBoardProject1	C:\Users\Florian\Documents\Atmel Studio\7.0\GccBoardProject1\GccBoardProject1\src\ASF\xmega\drivers\adc\adc.h	1588
Error		'ADC_SAMPNUM_16X_gc' undeclared here (not in a function)	GccBoardProject1	C:\Users\Florian\Documents\Atmel Studio\7.0\GccBoardProject1\GccBoardProject1\src\ASF\xmega\drivers\adc\adc.h	1590
Error		'ADC_SAMPNUM_16X_gc' undeclared here (not in a function)	GccBoardProject1	C:\Users\Florian\Documents\Atmel Studio\7.0\GccBoardProject1\GccBoardProject1\src\ASF\xmega\drivers\adc\adc.h	1590
Error		'ADC_SAMPNUM_32X_gc' undeclared here (not in a function)	GccBoardProject1	C:\Users\Florian\Documents\Atmel Studio\7.0\GccBoardProject1\GccBoardProject1\src\ASF\xmega\drivers\adc\adc.h	1592
Error		'ADC_SAMPNUM_32X_gc' undeclared here (not in a function)	GccBoardProject1	C:\Users\Florian\Documents\Atmel Studio\7.0\GccBoardProject1\GccBoardProject1\src\ASF\xmega\drivers\adc\adc.h	1592
Error		'ADC_SAMPNUM_64X_gc' undeclared here (not in a function)	GccBoardProject1	C:\Users\Florian\Documents\Atmel Studio\7.0\GccBoardProject1\GccBoardProject1\src\ASF\xmega\drivers\adc\adc.h	1594
Error		'ADC_SAMPNUM_64X_gc' undeclared here (not in a function)	GccBoardProject1	C:\Users\Florian\Documents\Atmel Studio\7.0\GccBoardProject1\GccBoardProject1\src\ASF\xmega\drivers\adc\adc.h	1594
Error		'ADC_SAMPNUM_128X_gc' undeclared here (not in a function)	GccBoardProject1	C:\Users\Florian\Documents\Atmel Studio\7.0\GccBoardProject1\GccBoardProject1\src\ASF\xmega\drivers\adc\adc.h	1596
Error		'ADC_SAMPNUM_128X_gc' undeclared here (not in a function)	GccBoardProject1	C:\Users\Florian\Documents\Atmel Studio\7.0\GccBoardProject1\GccBoardProject1\src\ASF\xmega\drivers\adc\adc.h	1596
Error		'ADC_SAMPNUM_256X_gc' undeclared here (not in a function)	GccBoardProject1	C:\Users\Florian\Documents\Atmel Studio\7.0\GccBoardProject1\GccBoardProject1\src\ASF\xmega\drivers\adc\adc.h	1598
Error		'ADC_SAMPNUM_256X_gc' undeclared here (not in a function)	GccBoardProject1	C:\Users\Florian\Documents\Atmel Studio\7.0\GccBoardProject1\GccBoardProject1\src\ASF\xmega\drivers\adc\adc.h	1598
Error		'ADC_SAMPNUM_512X_gc' undeclared here (not in a function)	GccBoardProject1	C:\Users\Florian\Documents\Atmel Studio\7.0\GccBoardProject1\GccBoardProject1\src\ASF\xmega\drivers\adc\adc.h	1600
Error		'ADC_SAMPNUM_512X_gc' undeclared here (not in a function)	GccBoardProject1	C:\Users\Florian\Documents\Atmel Studio\7.0\GccBoardProject1\GccBoardProject1\src\ASF\xmega\drivers\adc\adc.h	1600
Error		'ADC_SAMPNUM_1024X_gc' undeclared here (not in a function)	GccBoardProject1	C:\Users\Florian\Documents\Atmel Studio\7.0\GccBoardProject1\GccBoardProject1\src\ASF\xmega\drivers\adc\adc.h	1602
Error		'ADC_SAMPNUM_1024X_gc' undeclared here (not in a function)	GccBoardProject1	C:\Users\Florian\Documents\Atmel Studio\7.0\GccBoardProject1\GccBoardProject1\src\ASF\xmega\drivers\adc\adc.h	1602

 

Last Edited: Wed. Dec 16, 2020 - 07:08 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Zip up your project and attach the ZIP.

It is much simpler for you.   And it is easier for readers to replicate your problem.    And possibly post you a working ZIP back.

 

XMEGA-E5 requires ASF3 and very old device Pack.

Many Symbols and BITNAMES have changed.

 

David.

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

Here attached is my Project as ZIP. I tried using ASF3 with XMEGAE_DFP 1.3.114

This is not working for me.

 

 

Attachment(s): 

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

I downloaded the ZIP.  Unzipped into my 7.0 directory.

 

Sure enough,   massive errors.

Change the Pack to 1.0.30 and it builds just fine.

 

So I "looked" at your main.c and discovered it was just a dummy.

 

If you want help with a real-life 32E5 project,   attach a real-life ZIP.

 

David.

 

p.s.   attaching a ZIP is by far the best way to post information about an AS7.0 problem.    Accompanied by a brief explanation in English.

Last Edited: Wed. Dec 16, 2020 - 08:16 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

david.prentice wrote:

Change the Pack to 1.0.30 and it builds just fine.

 

So I "looked" at your main.c and discovered it was just a dummy.

 

David.

 

Hi David, thank you very much for your help. The main.c was a blank project automatically generated by MC Studio as i sayed in my earlier post. I still wondered why a "empty/dummy" project did not compile when i simply add ADC Support with ASF-Wizard. Now with Device File Pack 1.0.30 it works just fine. But why does Atmel/Microchip provides newer Versions auf XMEGAE_DFP when they are not working for example with ADC? That is the part i know can´t undestand.

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have used 128A1, 32A4U, 128A4U.   Only recently did I get an Xplained 32E5.

 

The E5 series has peripherals that are very differently named versus the A series.

For example EDMA is different to A-Series DMA

 

I think that the newer E5 Packs attempt to follow the A-Series names as much as possible.

 

Things like ASF3 were built for v1.0.x Packs and never the twain shall meet.

For example,  you need v1.0.30 to build the Example firmware for the Xplained-32E5 kit.

 

Oh,  and wouldn't it be nice if there was a 128E5 ?

 

David.

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

funnybox2006 wrote:
here ist the Output after Compiling

No, that's just the "Error list",  which is not really very useful - because it loses context, disconnects information which should come together, etc.

 

What you need is the 'Output' window: https://www.avrfreaks.net/commen...

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

awneil wrote:

What you need is the 'Output' window: https://www.avrfreaks.net/commen...

 

Hi awneil,

 

i attached Output.txt to this post. The user david.prentice said, that newer XMEGAE_DFP Packs have different name schemes. With the old XMEGAE_DFP v1.0.30 it works.

Attachment(s): 

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

funnybox2006 wrote:
The user david.prentice said, that newer XMEGAE_DFP Packs have different name schemes. With the old XMEGAE_DFP v1.0.30 it works.

Indeed - so please mark that as the solution - see Tip #5.

 

 

i attached Output.txt to this post

For future reference, note how that gives much more useful information; eg,

 

c:\users\halfmann\Documents\Atmel Studio\7.0\GccBoardProject1\GccBoardProject1\src\ASF\xmega\drivers\adc\adc.h(1448,5): error: 'ADC_CH_MUXNEGL_INTGND_gc' undeclared (first use in this function)
		     ADC_CH_MUXNEGL_INTGND_gc
		     ^ 
c:\users\halfmann\Documents\Atmel Studio\7.0\GccBoardProject1\GccBoardProject1\src\ASF\xmega\drivers\adc\adc.h(1448,5): info: each undeclared identifier is reported only once for each function it appears in

Note how it gives you a pointer - I've highlighted it  yellow - to show exactly what & where it's referring to.

 

And the 'info' is presented together with the 'error' to which it refers - instead of being separated from it (as the 'Error List' stupidly does).

 

 

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Fri. Nov 12, 2021 - 09:44 AM