Adding ASF to my own project & makefile

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

I'm attempting to use ASF (specifically the st7565r driver) in my own project. I'm on linux and use normal makefiles. I sort of had the expectation that I can just #include and I'm all set, but I found that all asf header files seem to include other asf header files, but without giving the full path. It looks to me like I have to add a -I directive for every relevant (and there are many) ASF directory.

Any hints on making this bearable ?
I'm just starting out and my have overlooked something obvious.

Markus

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

I'd suggest to forget about asf-header.h or asf.h

it's much more clean only to include the needed headers explicitly when needed

and don't forget to add the paths to the INC_PATH list in your makefile.

-sb

PS.: check the make based projects in the standalone asf.

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

yeah, you have to add the include paths yourself.
Shortcut: try Atmel Studio, add the modules you want in a empty project, copy paste the includes paths from the project properties.

Would you be interested into a ASF library that you can link to?

-sma

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

I do only include the definitions I need. In my source code I have this:

#include "conf_st7565r.h"
#include 

and in my makefile this

INCLUDES	= -I /usr/local/asf-3.3.0 -I /usr/local/asf-3.3.0/xmega/utils -I /usr/local/asf-3.3.0/common/utils -I /usr/local/asf-3.3.0/xmega/utils/preprocessor

that's where I stopped and came here to ask if I do something fundamentally wrong because there are more includes the compiler can not find. As said I sort of expected to be able to #include something with no fuss, very much like avr-libc.

After the compilation starts working, do I have to expect similar difficulties while linking ?
Do I have to make libraries first ?

Markus

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

Linux has a nice model for header files. They all go in /usr/include or /usr/include/linux so you just -I those directories (if not already done automatically) then:

#include 

and it is found. Perhaps ASF would benefit from a similar structure?

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

For now I've given up on ASF. The ST7565R part does not seem to provide fonts for character output anyway and my homegrown routines do work enough to prove that the hardware of working fine.

The next step now is to get a library with text support (and fonts), like the dogm library to work. Adding xmega support to dogm looks the best way forward now.

Markus