| Author |
Message |
|
|
Posted: Feb 13, 2012 - 09:19 PM |
|

Joined: Apr 17, 2008
Posts: 18
Location: Crestline, Ca. USA
|
|
What am I missing? I want Line Numbers shown in edit?
Usually it can be turned on as an option?
Also in debug, sometimes (?) it does not jump to the line with the error. It does state the line numbers.
but they are not show in the editor?
Stupid problem, but could save a lot of time using the simulator?
Using latest Studio 4 Version
Thanks for any Help!
Mike |
|
|
| |
|
|
|
|
|
Posted: Feb 13, 2012 - 09:56 PM |
|


Joined: Nov 22, 2002
Posts: 12193
Location: Tangent, OR, USA
|
|
By line numbers, do you mean memory addresses? That is what the debugger shows.
Sometimes, the code jumps to places you do not expect. That is because of the way C is constructed. If you view as "disassembled", it will show you where it is actually executing.
As I recall, the simulator does not show you the memory address of the currently executed instruction. Yes, it would be nice, but I don't think you can get it, there. But, you should be able to read it in the PC register.
Jim |
_________________ Jim Wagner
Oregon Research Electronics, Consulting Div.
Tangent, OR, USA
"The only thing standing between us and victory is defeat" P.G.Wodhouse in Wooster & Jeeves series
|
| |
|
|
|
|
|
Posted: Feb 13, 2012 - 10:07 PM |
|


Joined: Mar 28, 2001
Posts: 20630
Location: Sydney, Australia (Gum trees, Koalas and Kangaroos, No Edelweiss)
|
|
|
Quote:
I want Line Numbers shown in edit?
It doesn't exist in AS4, maybe AS5 has it, don't know. |
_________________ John Samperi
Ampertronics Pty. Ltd.
www.ampertronics.com.au
* Electronic Design * Custom Products * Contract Assembly
|
| |
|
|
|
|
|
Posted: Feb 13, 2012 - 11:07 PM |
|

Joined: Apr 17, 2008
Posts: 18
Location: Crestline, Ca. USA
|
|
Thanks Guys!
I was looking for the C edit window to show line numbers and having debug jump there!
I have used MPLAB mostly for Pics, I just could not find the option in Studio 4. I have been afraid to switch to Studio 5?
Great, I need to Know!!
Mike
A Tinkerer!
High in the Mountains, Crestline, Ca. |
|
|
| |
|
|
|
|
|
Posted: Feb 14, 2012 - 01:48 AM |
|


Joined: Mar 28, 2001
Posts: 20630
Location: Sydney, Australia (Gum trees, Koalas and Kangaroos, No Edelweiss)
|
|
By the way the line and column number is shown at the bottom of the screen for the line you click on.
Not what you want but of some help. |
_________________ John Samperi
Ampertronics Pty. Ltd.
www.ampertronics.com.au
* Electronic Design * Custom Products * Contract Assembly
|
| |
|
|
|
|
|
Posted: Feb 14, 2012 - 09:38 AM |
|


Joined: Jul 18, 2005
Posts: 62938
Location: (using avr-gcc in) Finchingfield, Essex, England
|
|
|
Quote:
and having debug jump there!
Can you explain what you mean by that?
If you are talking about placing breakpoints you just right-click a line and select "toggle breakpoint" |
_________________
|
| |
|
|
|
|
|
Posted: Feb 14, 2012 - 12:55 PM |
|


Joined: Jan 23, 2004
Posts: 9878
Location: Trondheim, Norway
|
|
In AS5/5.1, check "Display Line Numbers" box in the Tools->Options screen, Text Editor->All Languages node in the list.
- Dean  |
_________________ Atmel Studio 6.1 is now released, grab it here.
Report AS6/ASF bugs here.
|
| |
|
|
|
|
|
Posted: Feb 16, 2012 - 04:55 PM |
|

Joined: Apr 17, 2008
Posts: 18
Location: Crestline, Ca. USA
|
|
Yes, I wanted to see line numbers on screen in my source.
Sounds like it is and option in Studio 5.
Thanks, I have been reluctant to go to Studio 5!
How is the experience! Are my projects going to find all the right stuff?
Mike |
|
|
| |
|
|
|
|
|
Posted: Feb 16, 2012 - 05:56 PM |
|


Joined: Jul 18, 2005
Posts: 62938
Location: (using avr-gcc in) Finchingfield, Essex, England
|
|
|
Quote:
I wanted to see line numbers on screen in my source.
I see this request from time to time. I've never understood it. If you want to go to a specific line almost every editor on earth supports ctrl-g and if this is for mapping line numbers reported in build errors to the right line in the edited text is there an IDE that does not simply support double-click on the error to get you there (surely this is one of the fundamental features of an IDE?) so what does it really matter to you whether the error is on line 37 or line 4825 ? |
_________________
|
| |
|
|
|
|
|
Posted: Feb 16, 2012 - 07:11 PM |
|


Joined: Jan 23, 2004
Posts: 9878
Location: Trondheim, Norway
|
|
It's handy for mental bookmarks - makes it easier to note that "ok, I'm on line 123, gotta check something else and come back to it" and a few other reasons, so I like it on. Yes, I know some IDEs (AS5!) has bookmarks for thus purpose.
- Dean  |
_________________ Atmel Studio 6.1 is now released, grab it here.
Report AS6/ASF bugs here.
|
| |
|
|
|
|
|
Posted: Feb 16, 2012 - 08:14 PM |
|


Joined: Jul 18, 2005
Posts: 62938
Location: (using avr-gcc in) Finchingfield, Essex, England
|
|
|
Quote:
Yes, I know some IDEs (AS5!) has bookmarks for thus purpose.
I'm a luddite. I type @@@ as a marker to myself then Ctr-F,@@@ to get back
Editors that allow you to have split windows so you can have two views of the same document generally do away with the need for this. |
_________________
|
| |
|
|
|
|
|
Posted: Feb 16, 2012 - 08:53 PM |
|

Joined: Apr 17, 2008
Posts: 18
Location: Crestline, Ca. USA
|
|
Some explanation why I was wanting line numbers.
In the Studio 4 Editor it does NOT have an option to have line numbers, but on build shows where the errors are by line. Sometimes it will not jump to the error by clicking the error? I may be wrong, but that started me looking for the simple option to turn them on.
I have just loaded Studio 5. It takes an hour or more.
As mentioned above from a reply, if you look hard, you can turn the line numbers on.
Every editor I have ever used had this function, Except Studio 4?
Thanks for the help, now I am a Studio 5 beginner.
Mike |
|
|
| |
|
|
|
|
|
Posted: Feb 16, 2012 - 10:03 PM |
|


Joined: Jul 18, 2005
Posts: 62938
Location: (using avr-gcc in) Finchingfield, Essex, England
|
|
|
Quote:
Sometimes it will not jump to the error by clicking the error?
Then that is a SERIOUS bug in the IDE and the test case should be reported.
(AS4 did show line/column in the statusbar) |
_________________
|
| |
|
|
|
|
|
Posted: Feb 16, 2012 - 10:31 PM |
|


Joined: Mar 27, 2002
Posts: 18752
Location: Lund, Sweden
|
|
|
Quote:
AS4 did show line/column in the statusbar
So does AS5. And AS5 also has ctrl-G to go to a specific line. |
|
|
| |
|
|
|
|
|
Posted: Feb 19, 2012 - 03:49 PM |
|

Joined: Apr 17, 2008
Posts: 18
Location: Crestline, Ca. USA
|
|
I am now trying Studio 5. Yes it has Line # Option.
BUT, I is huge! Took 20 minutes to download. Slow loading. And look at all the clutter at the top.
Way too many options, on a 22" screen, I can hardly make out the icons. Who wants all these features?
They changed the Run and other symbols just to confuse you? I don't think I could see the Icons on a laptop?
Also, in a simple program brought from Studio4, it clobbers a variable. In an timer0 interrupt I increment a count (defined at top of program as volatile unsigned int). I just want the timer0 to increment the count every interrupt, but Studio5 Simulator shows count rolls over at 8 bits? I never use timer0 count, but somehow it resets my bigger count? I can never test the count over 255. It is to control a model servo motor (variable pulse every 20 mS). It works fine in Studio 4. Could be some kind of optimization mode? I never found the options for that in Studio 5. Nor do I know enough about optimization to do anything with it!
So, I guess I am going back to Studio 4.
I ordered an Atmel Dragon from Mouser that will be my next adventure.
Studio 5 is NOT for me. I will go without line #!
This might should have been posted in Studio 5, but I am using WinAVR GCC
Thanks for all the help guys!
Mike, with all the snow melting in Crestline, Ca.
., |
|
|
| |
|
|
|
|
|
Posted: Feb 19, 2012 - 04:16 PM |
|


Joined: Mar 27, 2002
Posts: 18752
Location: Lund, Sweden
|
|
|
Quote:
Who wants all these features?
You are perfectly free to customize the toolbars as you wish (show, hide, add or remove buttons).
Quote:
Could be some kind of optimization mode? I never found the options for that in Studio 5.
Project, Properties.
Toolchain tab.
Optimization in the tree view. |
|
|
| |
|
|
|
|
|
Posted: Feb 19, 2012 - 05:46 PM |
|

Joined: Apr 17, 2008
Posts: 18
Location: Crestline, Ca. USA
|
|
OK, I fixed my problem with the roll over. I used a wrong mask item for my interrupt when adding Timer1 along with timer0. So Timer1 must have causing a roll over interrupt, when I meant it to be on a hardware signal edge. All working now in SIM!
Found the Optimization was same setting as Studio4.
I am getting along better with Studio 5. Been using the stopwatch in the processor view for timing checks. Would like a better way, like a logic analyzer function similar to MPLAB for Pic?
So now awaiting to see the Dragon coming later this week!
Happy Camper Now, thanks for the time you guys took!
Mike |
|
|
| |
|
|
|
|
|