Go Down

Topic: Arduino sketch compiler (Read 1 time) previous topic - next topic

conradin

Hi all,
is there a specific place to ask questions about the arduino sketch compiler?
I want to know if there is a way to check for unused variables, and unused declarations.
I tried verbose output (under preferences) but it didn't tell me about the unused variables i included.

Also, when I go to File>Examples the examples open in new windows. How can i get them to open in new tabs instead?

If it matters, I am on Linux.

dxw00d

There is nothing supplied with the IDE that checks for unused variables or declarations, that I am aware of.

Tabs have a specific use within the IDE. It expects all open tabs to be part of a single project.

Quote
If it matters, I am on Linux.


It doesn't, in this instance.

Jantje

conradin
Maybe it is time to upgrade to a more professional IDE.
My Arduino Eclipse plugin offers some of the items you request.
Best regards
Jantje
Do not PM me a question unless you are prepared to pay for consultancy.
Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

conradin

I can accept that I will have to upgrade to a different compiler.  I usually use geany as a front end.
What I want to know is how to upload code to the arduino from a different compiler. A terminal command would be just fine with me.

dxw00d

Enable verbose mode in the IDE and upload a sketch. It will show you all the commands used.

WizenedEE

If you enable verbose compilation in the newest IDE, it should give you warnings (which include unused variables, etc). The compiler is gcc 4.3.2 (actually avr-gcc), and if you go into <ARDUINO_DIR>/hardware/tools and move the avr directory, the IDE will try to find avr-gcc in your PATH (so you could write a script called avr-gcc that passes all arguments except -w and adds -Wall to the real avr-gcc if you don't want to use verbose mode).

What version the IDE do you have?

MichaelMeissner


I can accept that I will have to upgrade to a different compiler.  I usually use geany as a front end.
What I want to know is how to upload code to the arduino from a different compiler. A terminal command would be just fine with me.

GCC has such options.  The IDE has to enable them.

Go Up