Maker Pro
Maker Pro

Is WINAVR crap or what?

J

John Devereux

Jan 1, 1970
0
Joel Koltner said:
Yes, you certainly do.


There's probably a setting where you can get the optimizer to issue
warnings when it completely removes a chunk of code.

However, the idea is that -- in many cases, with more complex code --
it might not be obvious to the casual observer that a particular chunk
of code is constant-value or otherwise always does the same thing and
hence can be eliminated; if you were to examine a large, complex piece
of code such as a web browser, you'd probably be quite surprised just
how many optimizations the compiler is able to find (including how
many lines of code can be eliminated). Heck, these days many people
advocate writing code that makes it more obvious what's happening
under the assumption that the compiler will perform optimization,
e.g., writing "if ( x & (1<<15) )" to test bit 15 of x rather than
writing "if (x & 0xf000)".

Nicely demonstrating your point, since it's x & 0x8000 :)


[...]
 
W

Warren

Jan 1, 1970
0
Arlet Ottens expounded in
google "winavr tutorial" brings up plenty of useful stuff,
and so does "winavr makefile example", and "winavr example
project"

There's plenty of documentation, but you'll have to look
for it.

The main problem is that with winavr you're working in a
hostile development environment. It's not winavr's fault if
you work in the "DOS box". Linux would give a better
experience, but you'd still be using a make file.

As a compromise, I use Cygwin to give me a Unix like
environment under Windows. However, that alone won't make
winavr happy, because it is native windows and cygwin is not
(but with some scripting you can work around it).

The recommended way (aside from GUI IDE solutions) seems to be
either to run from MSYS or to use and install the windows
native suggested make command. But you don't like makefiles,
so that isn't going to help you much.

If you're in a hurry, you'll want one of the IDE suggested
solutions instead.

Even MS Visual Studio (or whatever it is called today) uses
their brand of makefile underneath the hood.

The only other alternative is to go with the Arduino
environment, which hides the makefile from you. But that has
its own disadvantages. ;-)

Warren
 
W

Warren

Jan 1, 1970
0
Nico Coesel expounded in
RTM. Eclipse really beats any IDE I've used hands down so
far.

If it deleted my work, it really would be The F'n Manual (in
RTFM).

On acronyms: I love the recent Wiki[leaks] Task Force (WTF)
acronym.

Warren
 
Top