Simulator mode in AS7

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

Hello,

 

I'm a new user of Atmel Studio.

I have installed Atmel Studio 7 and I wanted to test an Arduino SW in Simulator mode.

I have opened Demo_3D_cube and there is no error during the build.

However, when I want to "start debugging and break" ; there is an error during the upload. AS7 is looking for a COM port to open, but I have selected "Simulator" in the project property and I have no hardware connected.

 

Is it possible to debug an Arduino SW in Simulator mode ? When I connect the arduino board, I can see that I can debug and put breakpoints.

 

Thanks for your support.

 

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

Tell us more about this COM port.

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

Hello,

 

Thanks for your answer.

 

I took some screenshot to make it clear. I have opened Blink.ino (example code) and put a breakpoint

 

 

Then, I have the following setting for "Simulator"

 

 

Then I click on "start debugging"

 

 

But in the output, I can see that AS7 is looking for avrdude and try to open a COM port

 

 

How can I do to avoid this error ? I guess the error comes from the "external tool" window

 

 

Here we can see that the command is directed to avrdude. Is it a right setting if we want to perform simulation without hardware ?

 

Thanks a lot for your support,

 

Regards.

 

 

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

Hello,

 

Nobody to help me on this topic ?

 

Thanks and have a nice day.

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

I think you need someone from Atmel to read this.

 

I have no idea how simply clicking the Start Debug/Break button when Simulator is selected as the target would lead to a defined external command being executed!

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

It's not, it's starting visual micro. Other than that, I can't really help, since I don't know the ins and outs of Visual Micro (but I think a Visual Micro project overrides some of the debug features)...

:: Morten

 

(yes, I work for Atmel, yes, I do this in my spare time, now stop sending PMs)

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

Hello,

 

Thanks for your answers.

 

I guess you have seen the rootcause of the error ; I have well selected simulator but Board type and COM number takes over the Simulator mode.

 

 

Here is the output

 

I'm in a freemode for vMicro ; do we need a licence version for debugging without board ?

 

Thanks.

 

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

... you'll have to ask them

:: Morten

 

(yes, I work for Atmel, yes, I do this in my spare time, now stop sending PMs)

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

Doesn't the Visual Micro thing simply have a big "on/off" switch then? When attempting to simulate I'd just turn it off completely.

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

Hello,

 

I have restarted the computer but the problem is the same.

I have requested to Atmel/Microchip at the moment about this issue.

 

Thanks.

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

But Morten *is* from Atmel/Microchip ?!?

 

As he says this is nothing to do with them - it's because you have installed an extension from a 3rd party company: VisualMicro so if that extension makes the IDE behave in "odd" ways it's a question you will have to take up with them.

 

Clearly the way it usually works is that when you start/break then normally it downloads a "monitor" into the Arduino so they can take a certain amount of debugging control of the chip. But their code *should* recognise when the debug target is "simulator" and in that case not attempt the download. As I say is it not possible to simply "turn off" the VisualMicro extension so it does not get in the way when you try to start the simulator?

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

I though Atmel Studio 7 did this all "natively" - so didn't need the VisualMicro plug-in any more ?

 

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

Hello,

 

I have found the issue ; I have added all the buttons possibles in the shortcut view and I have seen that "No Programmer" was found in the tool used ; I think that's why it tries by default to open a serial COM port.

 

I have put "Atmel Studio Device Programming" (Simulator is used in this Device Programming window) and click on "Use When Uploading"

 

Then I can perform some debug test with all the features.

 

Thanks a lot for your support and have a nice week,

 

Regards.

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

Hello,

 

I come back here because there are some settings that I don't understand in Atmel Studio 7.

 

I will divise my point in 2 steps.

 

1) Simulator works fine but now, I'd like to go back to No Tool to be able to program directly by USB of Arduino.

However, it seems to be not possible...

Do you know how we can solve that ?

 

2) On another  project, when I no tool is selected, I can't debug and I get the following window:

 

Thanks a lot for your support,

 

Regards.

 

 

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

But you should no need to do anything there "to program directly by USB of Arduino.", just get the .hex file generated by Studio and use ANYTHING you want to program the chip.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

Hello js,

 

Thanks for your answer.

I understand we can get the .hex generated by AS7 and load it via avrdude.exe for example.

However, I know that there is a debugger embedded into the Mega2560 and I wanted to test the software by implementing breakpoints, run, pause, ...

 

Regards.

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

read back to your posts, how did you manage to make the simulator work? reverse that, and you should get back to Visual Micro.

:: Morten

 

(yes, I work for Atmel, yes, I do this in my spare time, now stop sending PMs)

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

Hello,

 

At the beginning, the combo box "Select Debugger/Programmer" was empty and I could debug the example code Blinking LED.

Then, I wanted to test my own software and I selected "Simulator".

Now, I'd like to move back and chose the combo box as empty but it is not possible ; either "Simulator", either "Custom Programming Tool"

 

Thanks.

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

But you clicked the use when upload button...

:: Morten

 

(yes, I work for Atmel, yes, I do this in my spare time, now stop sending PMs)

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

Hello,

 

Ok, I understand the mechanism; thanks a lot for your help.

Now, it is working as I wish.

 

Thanks again and have a nice day,

 

Regards.