Pages: [1]   Go Down
Author Topic: Arduino sketch compiler  (Read 1771 times)
0 Members and 1 Guest are viewing this topic.
Maine
Offline Offline
Jr. Member
**
Karma: 0
Posts: 50
You blocked me on facebook and now youre going to die!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Gosport, UK
Offline Offline
Faraday Member
**
Karma: 21
Posts: 3113
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Belgium
Offline Offline
Edison Member
*
Karma: 68
Posts: 1917
Arduino rocks; but with my plugin it can fly rocking the world ;-)
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

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 -

Maine
Offline Offline
Jr. Member
**
Karma: 0
Posts: 50
You blocked me on facebook and now youre going to die!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Gosport, UK
Offline Offline
Faraday Member
**
Karma: 21
Posts: 3113
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Edison Member
*
Karma: 19
Posts: 1041
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Ayer, Massachusetts, USA
Offline Offline
Edison Member
*
Karma: 54
Posts: 1847
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: [1]   Go Up
Jump to: