Forum Menu




 


Log in Problems?
New User? Sign Up!
AVR Freaks Forum Index

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
markus_b
PostPosted: Aug 06, 2012 - 10:50 AM
Posting Freak


Joined: Mar 20, 2001
Posts: 1517
Location: Switzerland

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 <asf-header.h> 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
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
sambrown
PostPosted: Aug 06, 2012 - 02:27 PM
Hangaround


Joined: May 24, 2011
Posts: 254
Location: Berlin

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.
 
 View user's profile Send private message  
Reply with quote Back to top
sma
PostPosted: Aug 07, 2012 - 08:06 AM
Posting Freak


Joined: Jan 14, 2007
Posts: 1836
Location: Nantes, France

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
 
 View user's profile Send private message  
Reply with quote Back to top
markus_b
PostPosted: Aug 07, 2012 - 09:34 AM
Posting Freak


Joined: Mar 20, 2001
Posts: 1517
Location: Switzerland

I do only include the definitions I need. In my source code I have this:
Code:
#include "conf_st7565r.h"
#include <common/components/display/st7565r/st7565r.h>

and in my makefile this
Code:
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
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
clawson
PostPosted: Aug 07, 2012 - 09:49 AM
10k+ Postman


Joined: Jul 18, 2005
Posts: 62354
Location: (using avr-gcc in) Finchingfield, Essex, England

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:
Code:
#include <foo.h>

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

_________________
 
 View user's profile Send private message  
Reply with quote Back to top
markus_b
PostPosted: Aug 09, 2012 - 11:31 PM
Posting Freak


Joined: Mar 20, 2001
Posts: 1517
Location: Switzerland

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
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT + 1 Hour
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2006 The PNphpBB Group
Credits