Help with ASF

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

Hi Group.

I'm a newcomer to ASF and thought I understood what I am doing, but it didn't work. So here goes.

 

I am trying to use SPI on a xmega-A3BU xplained board.

I used the ASF Wizard to locate the SPI for this processor - no issue.

I selected both available SPI modules, Added them and Applied them - no issue.

 

 

They show up in the Selected Modules section of the ASF Wizard. they also show up in the ASF Explorer.

 

 

When I try to compile the file, I get an error: spi_master.h: No such file or directory   

 

Any ideas or suggestions?

 

Thanks,

Paul

 

 

 

 

You never know where life is going to take you; sit back and enjoy the ride!

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

When you initially created the project, how did you do so, ASF Board Project or GCC Executable Project?  Adding ASF modules to a GCC Executable project doesn't work.

Greg Muth

Portland, OR, US

Xplained/Pro/Mini Boards mostly

 

Make Xmega Great Again!

 

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

Hello Greg,

 

I used New – Example Project

 

Then selected an ADC Example project so I have the LCD display running. Now I want to add the SPI so I can talk to an external ADC.

 

If you cannot add ASF modules to a GCC Executable Project what good are they?

 

Thanks,

Paul

You never know where life is going to take you; sit back and enjoy the ride!

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

PaulieT wrote:
If you cannot add ASF modules to a GCC Executable Project what good are they?

AIUI/AFAIR, The 'GCC Executable Project' is specifically for the case where you are not using ASF?

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

Hi,

 

I just performed a Windows search on the Atmel Studio folder looking for spi_master.h and came up empty.

I also tried spi.h and it was found.

 

So, unless it's coded to be invisible, spi_master.h is not in Atmel Studio!

 

Paul.

 

You never know where life is going to take you; sit back and enjoy the ride!

Last Edited: Mon. Jul 3, 2017 - 05:02 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

But that file is present in your project explorer tree! So it exists.

 

The problem is not it that it does not exists but probably that a #include directive is set up wrong so it won't find the file.

 

Show us

 

1) The complete build output: After a Rebuild, switch to the Output tab, copy everything and paste in a post here.

 

2) The source file that generates the error you are talking about.

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.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

Last Edited: Mon. Jul 3, 2017 - 05:12 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi again,

 

The file SPI_master.h shows up in ASF Explorer, however, double clicking on the file name, yields nothing.

 

Since I could not find the file by searching I tried reloading ASF into Atmel Studio 7.

 

Now it compiles fine and I can even open the implementation of spi_master.h.

Spi_master.h still does not show up in a Windows search of the Atmel Studio program folder but does show up when I search the folder where the solution is stored.

 

Thanks for all your help and suggestions.

 

Paul

 

 

 

You never know where life is going to take you; sit back and enjoy the ride!

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

PaulieT wrote:
Spi_master.h still does not show up in a Windows search of the Atmel Studio program folder

They are in some kind of "compressed" repository - hence the Windows search will not find them.

 

but does show up when I search the folder where the solution is stored.

Yes - the ASF Wizards gets them out of the "repository" and into your project/solution.

 

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:

They are in some kind of "compressed" repository - hence the Windows search will not find them.

 

It's Git, actually. Looks like a "bare" repository - i.e. one without a "working area" ("working tree" or "working copy" being alternative terms). The thing you'd normally have on a server.

 

I have one at "C:\Program Files (x86)\Atmel\Studio\7.0\Extensions\atmel\as-asf-vsix\7.0.745\Repository\Asf.git".

 

You can create a clone of it in another spot, if you like ;-) . That will get you a working area. The repo is huge and compressed, so the cloning will take some time (several minutes). But then it looks like one has an "ordinary" repo that you can do your normal Git operations on - e.g. look at history and do comparisons:

 

C:\Users\JohnDoe\Desktop\ASFclone\Asf\avr32\services\usb\_asf_v1\class\hid\examples>git log -5

commit 5a3557fa9375c78a5e73aa7a394622a7d4c93a5d
Author: buildmaster <buildmaster@atmel.com>
Date:   Mon Feb 20 05:15:43 2017 +0100

    asf-3.34.1

commit 26f8d8169fe43f9ec47a3f2b3c192805c870b38b
Author: buildmaster <buildmaster@atmel.com>
Date:   Mon Feb 20 05:08:42 2017 +0100

    asf-3.33.0

.
.
.

 

I guess the tool built into Studio is to be preferred, but for the geeks..

 

One could perhaps/probably do these kinds of operations directly on the original repo, but I'm stumped as to how.. The above manouvre worked for me. I only have the Git command line installed on this machine so didn't play around more. Some might prefer to use a graphical UI Git client like TortoiseGit or "Git Extensions". I'd rather shoot myself than using "Git GUI"... ;-) 

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.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

Last Edited: Mon. Jul 3, 2017 - 09:32 PM