LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 04-27-2013, 06:40 PM   #1
saavedra29
Member
 
Registered: Aug 2010
Location: Greece
Distribution: slackware
Posts: 42

Rep: Reputation: 3
How to add a static avr library and just include header files in code?


Hello, I have Debian Wheezy and write some C code to program avr microcontrollers.
I'm new on programming and microcontrollers. I use simple makefiles (4-5 lines) to automate the compiling. There are some libraries that i use very often. But i have to add them in the source, create separate object files and so on every time i have to use them. I've read many articles but got confused. What i see is that even if i make a library i have to pass parameters in avr-gcc every time.
The question is:
Is there a way to just include the header files ( like for the standard libraries, <avr/io.h> for example ) without having to do all this mess every time?
 
Old 04-28-2013, 02:02 PM   #2
gdejonge
Member
 
Registered: Aug 2010
Location: Netherlands
Distribution: Kubuntu, Debian, Suse, Slackware
Posts: 311

Rep: Reputation: 71
Yes, you could create your own libraries, that would link staticly, but you would need to create libraries for each avr chip. If you want more info about this, I would advise you to take a look at the avrfreaks site. It's one of the best sites for working with the avr chips.
 
Old 04-29-2013, 12:17 PM   #3
saavedra29
Member
 
Registered: Aug 2010
Location: Greece
Distribution: slackware
Posts: 42

Original Poster
Rep: Reputation: 3
Quote:
Originally Posted by gdejonge View Post
Yes, you could create your own libraries, that would link staticly, but you would need to create libraries for each avr chip. If you want more info about this, I would advise you to take a look at the avrfreaks site. It's one of the best sites for working with the avr chips.
Thanks, i added a post at avrFreaks. I just thought it was a better place here as it had to do more about the programming and software than the microcontroller itself.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can i add the header files in /usr/include? homerzhou Linux - Newbie 1 09-05-2012 05:16 AM
Is it possible to add a shared library to a static library ? rupa_123 Linux - Newbie 2 03-24-2012 11:25 AM
how to install or add avr library on suse STR00G Linux - Software 1 01-14-2011 04:06 PM
How to add a static library to my own static library gmsa Programming 6 03-31-2010 09:33 AM
Problem with C++ include/header files! Pisces107 Programming 12 12-24-2003 12:06 AM


All times are GMT -5. The time now is 07:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration