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 How to roll back to a previous version of Visual Micro (Read 999 times)
Tammybai
Ex Member


How to roll back to a previous version of Visual Micro
Oct 20th, 2023 at 6:54pm
Print Post  
I have Visual Micro (paid, registered) installed on one computer (computer A), and I can compile/run my application no problem.

I then switch to another computer (computer B - free trial) and set up everything the same way, however when I go to run/debug the application on that computer, I run into the following problems:

- the build events that I have defined in the custom boards.txt file do not appear to be getting run unless I tick the "vMicro->Compiler->always export binary"... specifically, the following recipe hook doesn't seem to work on computer B until I ticked that box on computer B: recipe.hooks.savehex.postsavehex)
- visual micro appears to add a breakpoint to main.cpp (not my main.cpp, but the one in the MiniCore core files) --> this doesn't happen on computer A
- my application gets stuck on a line that is waiting for the Timer2 peripheral's prescaler to finish being latched by hardware--> this doesn't happen on computer A

Here are the things that are the same between computer A and B:

- Microchip studio v 7.0.2594
- Arduino 1.8.8 IDE
- MiniCore v2.2.2 (board manager)
- Platform: ATmega328PB with Bootloader

And here are some  things that are different:

Visual Micro Version:

computer A --> Arduino IDE for Microchip Studio (2023.507.703)
computer B -->  Arduino IDE for Microchip Studio (2023.507.714)

I'm guessing that since the core files are the same, that this must have something to do with differences in how the project is compiled between these two versions of visual micro?  Does that make sense?

Here is the line of code that debugging gets stuck on when running my application on computer B:

Code (C++)
Select All
while((GTCCR & (1<<PSRASY)){};
 




I noticed that when stepping through the early-init code (the main.cpp in MiniCore core files that Visual Micro is putting the breakpoint in), that there appears to be a spot in wiring.c in the init() function which configures TC2, and I'm guessing that this is messing with my app's code and causing the while loop (above) to be an infinite loop.

Is it possible that rolling the version of Visual Micro installed on computer B back to the version installed on computer A would fix these issues?

If so, how do I roll back visual micro from 2023.507.714 to 2023.507.703 ?



What are the "gotchas" that I should know about when I'm trying to work on the same visual micro project on two different computers (using Git to push/pull my development files)?


I've attached some of the relevant config files.




« Last Edit: Oct 20th, 2023 at 6:56pm by »  

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


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How to roll back to a previous version of Visual Micro
Reply #1 - Oct 21st, 2023 at 5:33pm
Print Post  
The export of hex to project folder is a separate command in the arduino ide. as you know visual micro has facility to always export after build. It caused confusion for some users therefore became an option that you need to enable some time ago. It might be that you could have used the post compile event and reference the hex that results in the {build.path}. 

You will see in the output you posted that the standard events referrence the hex file as 
"{build.path}\{build.project_name}.hex"

In Microchip Studio. if you have "hardware debugging" enabled and are not using GDB Stub then visual micro asks microchip studio to launch whatever debugger/options you have configured in the microchip studio project device/debug properties. It's a complete override. Microchip studio will be setting the intial breakpoint. If you manually set a breakpoint where you want one that might help.

All previous versions are available in the releases section of this forum although an older version is not recommended.

The only point to note in source control is that the project file can change between machines because intellisense path discovery might find different locations. This means the project might appear to have changed when actually it still provides the same build between the two machines. The reason for this is the auto discovery nature of arduino libraries and platforms.

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