LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to add a static avr library and just include header files in code? (http://www.linuxquestions.org/questions/linux-software-2/how-to-add-a-static-avr-library-and-just-include-header-files-in-code-4175459820/)

saavedra29 04-27-2013 06:40 PM

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?

gdejonge 04-28-2013 02:02 PM

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.

saavedra29 04-29-2013 12:17 PM

Quote:

Originally Posted by gdejonge (Post 4940633)
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.


All times are GMT -5. The time now is 01:49 PM.