Opinions on Atmel Studio4 sw?

I'm still trying to get away from the 8051 with the Raisonance C compiler, which is normally fine for the junk I do.

I've got the latest Winavr/GCC and Studio 4 installed, but I getting a bit suspicious of the simulator in Studio 4 when doing stuff in C

It's probably me doing it wrong.

The simulator/debug seems to miss single stepping through procedures, like my "TwiddlePORTD" routine, just appearing to ignore them in my main while(1) loop. PORTD does update, so I'm wondering if I've missed a menu somewhere for showing this?

Not a bad day, learnt quite a lot :)

martin

Reply to
Martin Griffith
Loading thread data ...

I don't know Atmel Studio, but I know GCC and maybe you compiled it with optimizing settings (e.g. -O3), which can confuse the debugger, because there is not always a 1:1 mapping between C code and assembler after optimizing. Try compiling it in debug mode, e.g. with -O0 -g3.

--
Frank Buss, fb@frank-buss.de
http://www.frank-buss.de, http://www.it4-systems.de
Reply to
Frank Buss

Most debuggers have two step buttons - one which steps "over" the call (executing it as if it were a single instruction) and another that steps into it. Then there's also often one to "step out" of the current procedure if you decide that it's not what you wanted to be looking at (or if you hit step in when you should have hit step over).

Probably various icons on the menus and functions keys for these step capabilities. And the function key assignments are never consistent. Even between various product offerings of the same vendor!

Reply to
cs_posting

Thanks Frank, I will try to get my head around GCC and make files.

martin

Reply to
Martin Griffith

Found it in an Atmel menu, set to O0, it works fine, but I could not find the g3 part

Thanks :)

martin

Reply to
Martin Griffith

-g3 creates many debug information, maybe you don't need it, if it works. Usually you can see all the switches in the compiling window. If you can't see any g-option, then the default, -g2, is used, which creates source code line number information, so from the GCC side it should work then.

--
Frank Buss, fb@frank-buss.de
http://www.frank-buss.de, http://www.it4-systems.de
Reply to
Frank Buss

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.