Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

How to use avrfix

Status
Not open for further replies.

polashd

Member
MCU= Atmel Avr (Atmega, Attiny..)
Programming software= WinAvr avrgcc

I've downloaded avrfix to use fixed point math in my program.

The zip file contains files named - "avrfix.h" "libavrfix.a" "sizes.txt" (not sure if it is of any use)
Q:-
-How do I use these files for fixed point calculations?
-In which directory these files to be copied so that the IDE (Winavr avrgcc) can use these.
-Do I need to change anything in the make file.

note:-
I created libraries for my self ( pair of files *.c & *.h) for different purposes.
I saved these in the same dir of main.c
 
>> -How do I use these files for fixed point calculations?
Try #including the "avrfix.h" header file and linking the "libavrfix.a" library file. This is done using the -lavrfix commandline switch (this can go into your makefile). Also include the directory of the library file using the -L switch...

e.g. -L c:\users\me\libraries -lavrfix

>> -In which directory these files to be copied so that the IDE (Winavr avrgcc) can use these.
The files can go in the same directory as the code. You could put them in the winavr lib and include directories if you think you'll be using them often I guess...

>> -Do I need to change anything in the make file.
Add the linker switch in link to the static library.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top