Stepping through a program

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

Hi Folks,

Is there a way to step through a program (main.c), in AS7 there is stepping option but it requires some devices.

In C compiler like Turco C such thing was possible.

Any other way to do stepping through the program in AS7?

Regards.

 

Karanbir

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

Not sure what you mean by:

there is stepping option but it requires some devices

AS7 is a tool for writing software for Atmel micrcontrollers so, of course, when you create a project and right some code you are going to have to pick a device. Or did by "devices" you mean a programming/debugging tool like Dragon,  JTAGICE3, Atmel-ICE, etc?

 

Well, yes, it's true that one of the ways you can see your code operate is to have AS7 use one of thise interfaces to program the code into an AVR and then step through it in the real silicon.

 

HOWEVER another choice in AS7 is the simulator. You build your code then load it into the simulator for debugging and then you can step throught it and do other debugging without requiring any hardware at all - neither a debug interface nor even a real silicon chip. the behaviour of the silicon is simulated on the PC.

 

the one thing the AS7 simulator does not simulate are any kind of external devices. So yes it (on the whole) simulates how UART, SPI, TWI and other devices in side an AVR operate but it won't simulate things like button inputs, LCD screens and things like that.

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

Yes it asks for debugging/programming tools like Dragon,JTAG...ATMEL-ICE etc. These are expensive. are they a necessity?
I program the Atmel micros 328,32 etc by flashing the hex file by using AVRDUDES
Thanks

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

I don't think you need a device.  Set "simulator" in the project properties.  As I remember, right click on the project, and click properties, or whatever it is, at the bottom of the menu.  On the properties screen, there is something at or near the bottom that allows you to select the simulator.  The last I knew, it didn't simulate the I/O devices very well, if at all, but it can be better than nothing.

 

I think one thing it can do is count the number of machine cycles between two places in the code.

 

 

Last Edited: Fri. Jan 22, 2016 - 07:03 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you

 

​Clawson and

Steve

 

​I"ve got my answer.