Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Where VM Free ends and VM pro begins. (Read 3162 times)
Phil Abbate
Newbies
*
Offline


Posts: 7
Location: Atlanta GA USA
Joined: Sep 17th, 2017
Where VM Free ends and VM pro begins.
Nov 18th, 2017 at 5:51pm
Print Post  
I discovered AS7 and VM about two months ago. I went from Arduino IDE straight to AS7/VM at the same time. After much futzing I am at the point where I have used the free version to set breakpoints in the code and run the simulator and debugger. 

I have a JTAGICE MKII connected to the ISP port and can read and program the fuses as well as load the bootloader onto an unprogrammed ATMEGA328P.

I am pretty confused about where any one of the above items end and where the next begins.

I have a simple traffic light VS7/VM solution. It uses a hardware interrupt Int0 on Pin3.

I can set breakpoints , see I/O pin states, and watch my target arduino LED tree hardware track right along with where the breakpoints are set in my sketch. Sweet. 

At one point I was able to use Int0 and increment a counter inside of the Interrupt Service Routing and see it change on the serial.print when I went back into the loop. 

I had the JTAGICE in SPI mode when it did not crash (above). Now I can not seem to get it to react like that, incrementing the counter in the interrupt service routine. Now when I push the interrupt button the serial monitor prints a "VM" and I have to recompile without debug and then recompile with debug to get the program to work in breakpoint mode. 

I would appreciate any insight into what is going on above.
« Last Edit: Nov 18th, 2017 at 6:04pm by Phil Abbate »  
Back to top
 
IP Logged
 
Phil Abbate
Newbies
*
Offline


Posts: 7
Location: Atlanta GA USA
Joined: Sep 17th, 2017
Re: Where VM Free ends and VM pro begins.
Reply #1 - Nov 18th, 2017 at 5:59pm
Print Post  
My next step will be getting this Arduino Uno to work with AS7/VM in the debug wire (dWire) mode. I saw several youtubes where they can step the code without setting breakpoints, break inside of the ISR and display all the registers. My previous tests could not do any of these things. 

I realize now that I must cut the trace "RESET-EN" for dWire to work with the UNO. I have not tried this yet. 

Here is my question; "At what point do I need VM PRO before I lose functionalityI can not get with the demo?" Currently I keep extending the free trial. I am very unclear how to navigate this step which involves one of my least favorite things. ;....spending my dwindling treasure.
  
Back to top
 
IP Logged
 
Phil Abbate
Newbies
*
Offline


Posts: 7
Location: Atlanta GA USA
Joined: Sep 17th, 2017
Re: Where VM Free ends and VM pro begins.
Reply #2 - Nov 18th, 2017 at 6:06pm
Print Post  
Here is my test sketch. 



int isr_ctr =0;    //debug how many times the ISR runs
int stop = 2;
int yellow = 2;
int go = 7;

void setup() {       // put your setup code here, to run once:
     Serial.begin(9600);
     pinMode(8,OUTPUT);          //Red LED
     pinMode(9,OUTPUT);          //Yellow LED
     pinMode(10,OUTPUT);         //green LED
     pinMode (11,OUTPUT);        // OUTSIDE GREEN LED --BUTTON PUSHED
     
     // pinMode(5,INPUT_PULLUP);    //input red switch  flapping input
     // pinMode(6,INPUT );          //input red switch with 5k pullup
     digitalWrite(8,HIGH);   
     Serial.println ("traffic-- int_ctr INITIALIZING" );
     Serial.print ("Stop Variable is  ");
     Serial.println ( stop );
     digitalWrite(9,HIGH);
     Serial.print ("Yellow Variable is  ");
     Serial.println ( yellow );
     digitalWrite(10,HIGH);
     Serial.print ("Go Variable is  ");
     Serial.println ( go);
     digitalWrite (11, HIGH);
     attachInterrupt (0, changeTime,RISING); // FALLING EDGE, INT0-PIN3 (D2) isr= changeTime
delay( 1000);
}

void loop() {                              // put your main code here, to run repeatedly:
     
     golight(go);
     yieldlight(yellow);
     stoplight (stop);
}

void golight (int time) {
     digitalWrite(8,LOW);
     digitalWrite(9,LOW);
     digitalWrite(10,HIGH);
     Serial.println ("time - go  - ISR   ");
     Serial.print (time);
     Serial.print  ("   -- ");
     Serial.print (go);            // debug
     Serial.print  ("   --  ");
     Serial.println( isr_ctr);
     Serial.println("");
     delay(time * 500 );
     digitalWrite(11,LOW);
     go = 2;
}

void yieldlight (int time) {
     digitalWrite(8,LOW);
     digitalWrite(9,HIGH);
     digitalWrite(10,LOW);
     delay(time * 500 );
     }


void stoplight (int time) {
     digitalWrite(8,HIGH);
     digitalWrite(9,LOW);
     digitalWrite(10,LOW);
     delay(time * 500 );
}


void changeTime(){   // interrupt service routine - IO D3 momentary switch closed.
     isr_ctr++;       // debug count
     go = 5;
     digitalWrite(11,HIGH);
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Where VM Free ends and VM pro begins.
Reply #3 - Nov 18th, 2017 at 8:46pm
Print Post  
I think there are points here:-

1) Each trial is 7 days. If you are not in a trial you have the opportunity to start one using the option that appears on the vMicro menu

2) As you have said, you are using a powerful tool set that when configured correctly can step outside the arduino camp and combine atmel studio standard tools with standard arduino projects

3) The only reason to buy would really be to make me feel it's worth doing things for other people.

4) Visual Micro keeps you in line with Arduino so you should be able to switch very easily. So far Visual Micro has been available for approx 9 years. 90% of users are free users
« Last Edit: Nov 18th, 2017 at 8:53pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Phil Abbate
Newbies
*
Offline


Posts: 7
Location: Atlanta GA USA
Joined: Sep 17th, 2017
Re: Where VM Free ends and VM pro begins.
Reply #4 - Nov 20th, 2017 at 9:30pm
Print Post  
Good to know there are still kind folks like you Tim. 

So I guess I should be able to get the dWire interface to the arduino with the free version. I have not been very successful at this step. .....yet. 

I really want to see this do everything I see it doing on the internet.....like stepping into code and manupulating registers from AS7. 

Thanks.

  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Where VM Free ends and VM pro begins.
Reply #5 - Nov 21st, 2017 at 2:34am
Print Post  
if i were you I would use the atmel file>open convert to convert from ardiuino to standard atmel avr gcc then use the atmel documentation to make it work.

  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint