avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] strange behaviour with ceil()


From: Theodore Roth
Subject: Re: [avr-gcc-list] strange behaviour with ceil()
Date: Fri, 26 Jul 2002 09:00:24 -0600 (MDT)

On Fri, 26 Jul 2002, Joerg Wunsch wrote:

:) "E. Weddington" <address@hidden> wrote:
:)
:) > When migrating to AVR GCC from another compiler (like I have
:) > recently), how / where is one supposed to find out that the
:) > standard C math routines are in a seperate library file?
:)
:) That's a FAQ (not only for AVR-GCC but for Unix newbie programmers as
:) well), the same like the typical question about a missing `volatile'
:) variable declaration.
:)
:) So basically, we probably need a FAQ that is referenced from all
:) locations where one could obtain AVR-GCC from.

I was thinking about this myself. [blatant plug] I think there should be a
FAQ section in the avr-libc manual. Joerg, can I volunteer you to start
it? ;-) There should be enough examples in cvs now to get you started.

:) To be honest, i always found the AVR Freaks Makefile templates overly
:) complicated.  In some respects, it's even dangerous in that it
:) encourages people to employ a bad Makefile style that is at the risk
:) of becoming buggy, like with their variable name indentation to
:) right-align them at the equal sign: you /must/ use spaces to indent
:) them, if you use a TAB, Makefile syntax mandates that a TAB is
:) introducing a shell command, and some implementations will simply
:) complain about it.  So it would be better to simply start all variable
:) names flush left.

I agree with Joerg here. I looked at those makefile a long time ago and
found them to be really confusing. Then again, I used to writing makefiles
from scratch and feel they should not be including makefile template that
are outside the scope of the project (what happens when you move the code
to another computer that doesn't have the template?)

:)
:) My typical AVR project Makefile doesn't have more than 50 lines, where
:) i copy about half of it as a `template' from another old project, and
:) modify the remainder for the actual filenames in my new project.  But
:) then, i come from a Unix background, so compiler flags and arguments
:) as well as the use of `make' is quite common to me.
:)
:) However, the risk of those large template buildings is that you never
:) really learn how `make' is working, and are at the end of your road as
:) soon as you encounter a situation which is not covered by the
:) template.  So i'd rather encourage people to not only study the
:) compiler documentation, but that of `make' as well.  (Of course, i
:) have no clue whether the texinfo documentation of gcc and make is
:) actually included and easily readable in the Windows distributions.)

That's why everyone should use Linux. (Just kidding!) Make is so much more
powerful that just compiling your code. I have makefiles where I just type
'make upload' and the project is compiled, linked and uploaded into the
device. Joerg is right, if you develop software, you should learn how to
right makefiles.

Sorry for the rant. ;-)

Ted Roth

avr-gcc-list at http://avr1.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]