Line #'s in AvrStudio source editor?

Go To Last Post
16 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Is there any way in AvrStudio to see what line number you're on when editing a C source file? (using with avrgcc)

I get compiler errors/warnings referencing line numbers, but I can't find way to view the line numbers in AvrStudio.

Sorry if this is a FAQ, I tried searching this forum but couldn't find an answer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Having trouble with that also, so don't feel alone:)

If you click the error message it will jump to the line in question.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
If you click the error message it will jump to the line in question.

Ahh! Thanks, that will be a big help to know!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I find it a real pain that there is no Goto Line (usually Ctrl-G in other editors) in that editor and sometimes I find that clicking a build error does NOT move me to the line in question but if all else fails the current Ln XXX, Col YYY is shown in the bottom right of the status bar at the bottom of the screen so you can eventually get to a specfic line.

But a GotoLine would be easy to implement and a nice addition!

Cliff

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
if all else fails the current Ln XXX, Col YYY is shown in the bottom right of the status bar at the bottom of the screen

OMG, how could I have missed that! :oops: I was searching the screen thinking something just like it should exist!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Cliff: Could you let me know in which cases that clicking the error does not work as expected?
Is this in the assembler or the gcc plug-in?

Regards,
Torleif

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It happens to me with the gcc plug-in. the 'double click the error' to go to the line has never worked for me. I havn't tried it in assembler.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi chief11.
I need some more information to fix this problem.

Can you post one example of the error messages that cannot be clicked?
You are double-clicking in the *build*window?

Is there anything special about your setup?
Which AVR Studio version are you running?
Where are your sourcefiles located?

Regards,
Torleif Sandnes

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi torleifs,

I'm using AVR Studio Version: 4.12.460

My source files are on a seperate partition than the AVR Studio installation, if that makes a difference.
Nothing special about my setup that I can think of
I am double clicking on the error in the build window, I tried double clicking on the words and on the red dot at the left, its entirely possible that I'm making a very stupid mistake.

I have attached an example of an error that I created.

Cheers

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm hoping that because noone else has jumped in and said that its me doing something wrong, that something is actually wrong with the software.

If I am indeed doing something stupid, can someone please let me know and tell me what I'm doing wrong?

cheers

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

any more news on this?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

No, It will be a while before I can look into this. Sorry.
In the meantime, could you try to create a project on the same partition as AVR Studio and see if the error is still there?

Regards,
Torleif

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I just created a project on the same partition as my AVR Studio installation with the same c code as my previous example and when I double click on the error it brings the cursor to the correct line in my code as it is supposed to :)

Would be nice if it would work with projects on other partitions or drives though, can't have everything though.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The problem has been added as a bug to our bugdatabase.
For future reference, the bug number is 4251.

Regards,
Torleif

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have set up a similar project with exactly the sampe path on my F partition, but cannot reproduce your problem.
Can you confirm that this is still a problem after installing servcepack2?

Torleif

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

torleifs wrote:
I have set up a similar project with exactly the sampe path on my F partition, but cannot reproduce your problem.
Can you confirm that this is still a problem after installing servcepack2?

Torleif

I'm use 4.12, sp3, build 490, and it's still a problem for me. If the message window does not show the path to the source file, the jump doesn't work. I'm working with code files in the same folder as the project file, and the path, when shown, is ../ That is, the path shown is relative to the make file, which is found in ./default

So I have this problem when using my own make file, but not in a tiny test project. Presumably, I will be able to work around this problem by changing my make file, so that the compiler messages have path information.

But it would be nice if the project assumed a path to the source files, perhaps the path to the project file or the path to the make file, or allowed you to specify a path to a source folder, rather than silently failing when the make file is not in the default location.

(david)