Go Down

Topic: Possible IDE addition... (Read 1 time) previous topic - next topic

govtcontact

Hello all, and first, great job on the work done making the arduino as popular as you have.

One thing that I would like to see implemented has to do with the IDE.  After verifying/compiling, if errors are generated when using multiple libraries, the only way that I know of to track down the code with the error is to open Kate: Find in Files: Select my project directory, take the results and search through those files in the IDE.

Is it possible to impliment in future builds the ability to say 'double click' on the error message and have you taken to that error in your project?  Or at least have the error highlighted in the IDE and then one could quickly skim through the their code looking for the highlighted code.

vipersnh

Yep a valuable addition for ide..
Hope the developers of ide implement it.

govtcontact

Also, one error that put me off of the Arduino for some time was an error that simply stated " expected '}' after declaration".  I quit working with the Arduino because I was tired of going through all the code and the temp compiled .cpp file looking for the lonely }.  I finally went back to the code and using JEdit, selected each } and noted if it had a mate ( { ).  After searching through 250+ { } pairs, the problem was located.

I only suggest this addition because if that error pissed me off enough to stop playing with the Arduino for several months, I think some one new might just slide the arduino into the garbage, delete the code and move to some other processor and IDE.

I see a promising future for the Arduino, its clones and its IDE, that is my purpose of this posting.

PaulS

Quote
I finally went back to the code and using JEdit, selected each } and noted if it had a mate ( { ).  After searching through 250+ { } pairs, the problem was located.

250+ pairs of { and } in one function? Time to learn how to create functions, don't you think?
The art of getting good answers lies in asking good questions.

ericwertz


I only suggest this addition because if that error pissed me off enough to stop playing with the Arduino for several months, I think some one new might just slide the arduino into the garbage, delete the code and move to some other processor and IDE.

I see a promising future for the Arduino, its clones and its IDE, that is my purpose of this posting.


This problem isn't really specific to either the Arduino or the ATmega -- it's a complaint against the error reporting of GCC, the compiler.  Given that many toolchains use GCC, moving to another processor or devboard isn't going to make much difference.

I have two suggestions for you.  First, use #if 0 .. #endif to comment out large blocks of code (numerous functions at a time, if need be) to help you narrow down the area in which the (often, syntax) error lies.  Zeroth, only focus on the first error reported during the failed compile, as subsequently reported errors are often the product of the parser getting lost from earlier errors.  Fix the first error and recompile.

Tracking down compiler errors is something that you'll get better at with practice.  Radically improved error detection and exact reporting is the stuff that PhD dissertations are/were made of.

govtcontact



250+ pairs of { and } in one function? Time to learn how to create functions, don't you think?


Allow me to clarify... No, the 250+ pairs were not in one function.  The 250+ was when I was going through the temporary compiled .cpp file. 

Quote

byte startup_check(void)
        {
   if(DEBUG_SUBSYSTEM > 0)
          {      
         return 0;
         }
   }



Also, not wishing to re-invent the wheel, or being lazzy, I was yanking sections of code from multiple projects and places all grouped together by related function as included files.

govtcontact

#6
Oct 29, 2011, 06:24 pm Last Edit: Oct 29, 2011, 06:30 pm by govtcontact Reason: 1

I have two suggestions for you.  First, use #if 0 .. #endif to comment out large blocks of code (numerous functions at a time, if need be) to help you narrow down the area in which the (often, syntax) error lies.  Zeroth, only focus on the first error reported during the failed compile, as subsequently reported errors are often the product of the parser getting lost from earlier errors.  Fix the first error and recompile.



Tracking down my errors, I would focus on the first error, fix it, then recompile.  Thank you for the #if 0 .. #endif bit, doing that had not even crossed my mind.

I was unaware that the error reporting (or lack of helpfulness) was due to GCC.  As I am trying to keep my mind from turning to mush, I figured I would learn some C/C++.  Unfortunately, the way I learn best, though not the quickest, is to jump in and either sink or swim.

Go Up