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
Hot Topic (More than 8 Replies) A few problems with the trial version - some help/advice needed... (Read 6000 times)
Swiss Matt
Newbies
*
Offline


Posts: 9
Joined: Nov 30th, 2022
A few problems with the trial version - some help/advice needed...
Dec 1st, 2022 at 4:45pm
Print Post  
I downloaded the trial version and spent some time trying to use it, with VS 2022 on Windows 11. It looks great, but there seem to be some things which are not working properly. Probably I'm doing something wrong. Can anyone help me?
1)      The “Micro Explorer” window is empty (all white), and I can’t use it. Why is this? How can I fix it? See first pic1 below. (Update: I tried it on my old Windows 10 machine, and this is working.)
2)      When I create a new project it now says “(Linux)” after the Sketch4 name, but I’m using Windows. The first project I created did not have this. This happened after I un-installed and re-installed the trial version in VS.
3)      The breakpoint works the first time I build and download (by pressing "> Start"). But after that it does not work, unless I close Visual Studio and re-open it, then it works well, just once. (Update: I have the same problem on my Windows 10 machine.)
4)      I get some OpenOCD errors when I start debugging by pressing “> Start”, see Output Window pic2, but the breakpoints work. The second time I run it, there are no errors, but breakpoints don’t work and the program does not seem to run, see pic2. Closing and opening VS makes it work, only once.

Micro Explorer window is not usable:


Output Window clip 1, the first time “> Start” is pressed, there are some errors, but it runs and the breakpoint is hit.
Output Window clip 2, pressing “> Start” the second time, the program downloads but does not run, no breakpoints etc.

« Last Edit: Dec 1st, 2022 at 5:18pm by Swiss Matt »  

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: A few problems with the trial version - some help/advice needed...
Reply #1 - Dec 1st, 2022 at 5:02pm
Print Post  
Hello,

It is correct that you now see "Linux" at the side of the project name. Old projects use the Microsoft VC++ intellisense engine and new projects use the Micosoft Linux intellisense engine. The type of project is unrelated to anything outside of intellisense such as build, debug etc.

For the newer Linux engine, we are able to feed full sources and cores cor the current board into the intellisense because it fully understands the gcc language that the microcontrollers use. In the older project format intellisense was not as good and required some maintance by us. Now it is automatic and more reliable.

If you have not done so already, please follow the guide in yellow at the top of this page. That will allow us to review your configuration.

Thanks
« Last Edit: Dec 1st, 2022 at 5:34pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Swiss Matt
Newbies
*
Offline


Posts: 9
Joined: Nov 30th, 2022
Re: A few problems with the trial version - some help/advice needed...
Reply #2 - Dec 1st, 2022 at 5:20pm
Print Post  
Log file attached
  

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


Posts: 2441
Joined: Feb 13th, 2019
Re: A few problems with the trial version - some help/advice needed...
Reply #3 - Dec 1st, 2022 at 5:42pm
Print Post  
Breakpoint Problems:
From the output we can see it appears as though you are trying to debug the setup() code in your sketch.

Are you always using Debug > Start to begin debugging, or do you also use Debug > Attach to process for the debugging sessions after the first run?

To prove the debugging is working as expected, try setting a breakpoint in loop(), and let us know if this is hit in each debugging session you try using?
  
Back to top
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2441
Joined: Feb 13th, 2019
Re: A few problems with the trial version - some help/advice needed...
Reply #4 - Dec 2nd, 2022 at 2:58pm
Print Post  
Micro Explorer UI:

Can you try the latest release (2022.11.28-2) available from the top of the board below, and let us know if this resolves this part of the issue?
https://www.visualmicro.com/forums/YaBB.pl?board=VS_ARDUINO_EXT_RELEASES

  
Back to top
IP Logged
 
Swiss Matt
Newbies
*
Offline


Posts: 9
Joined: Nov 30th, 2022
Re: A few problems with the trial version - some help/advice needed...
Reply #5 - Dec 5th, 2022 at 11:34am
Print Post  
Hi Simon,
Simon@Visual Micro wrote on Dec 1st, 2022 at 5:42pm:
Are you always using Debug > Start to begin debugging, or do you also use Debug > Attach to process for the debugging sessions after the first run?

To prove the debugging is working as expected, try setting a breakpoint in loop(), and let us know if this is hit in each debugging session you try using?

I always use "Debug > Start". The very first time I run it after opening VS, it stops at the setup() breakpoint, and also at the loop() breakpoint. See attached log.
The second time I hit "Debug > Start" is does not hit the breakpoints. The program does not seem to run. If I close VS, and re-open it, then it works again, but only the first time.

Simon@Visual Micro wrote on Dec 2nd, 2022 at 2:58pm:
Can you try the latest release (2022.11.28-2)

I have tried the latest release, and the behavior is the same, no changes. The Visual Micro Explorer window is still blank, no tree, see pic above. Note: It works fine on my old Windows 10 machine, so it could be a Windows 11 problem.



« Last Edit: Dec 5th, 2022 at 11:44am by Swiss Matt »  

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


Posts: 2441
Joined: Feb 13th, 2019
Re: A few problems with the trial version - some help/advice needed...
Reply #6 - Dec 5th, 2022 at 5:02pm
Print Post  
Could you answer the below points so we can try to isolate the issue with the Micro Explorer:
1) Does the Serial Monitor work correctly?
2) Can you confirm which Theme you are using in Visual Studio?
3) Can you send us the JSON URL's (if any) which are added for the selected IDE on the IDE locations screen?

  
Back to top
IP Logged
 
Swiss Matt
Newbies
*
Offline


Posts: 9
Joined: Nov 30th, 2022
Re: A few problems with the trial version - some help/advice needed...
Reply #7 - Dec 8th, 2022 at 12:02pm
Print Post  
Hi Simon,
Sorry for the delay, I have a few other projects (and everything is urgent Sad)
1) I am not really familiar enough with it to know if it's working correctly or not. It seems to behave strangely/non-intuitively.
2) "Dark" theme.
3) What should be set on the IDE Locations screen? I have installed Arduino IDE v2.0.3. I assume I should select "Arduino 2", see first pic below, the location is not that of the Arduino IDE. 
If I close the window with OK, then re-open it, it has changed the selection to Arduino 1.6/1.8, and changed the folder location (which seems correct for v2), see second pic below.
So, basically, I'm rather confused...

==> Is there a way that I can set all the vMicro settings back to "factory defaults"? If I uninstall then re-install, it seems to keep the old settings.


Should it be this?


If I close the window with OK, and re-open it, the settings are changed:

« Last Edit: Dec 8th, 2022 at 12:51pm by Swiss Matt »  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2441
Joined: Feb 13th, 2019
Re: A few problems with the trial version - some help/advice needed...
Reply #8 - Dec 8th, 2022 at 1:11pm
Print Post  
Thanks for the update, and the Arduino 2.x or Arduino 1.6/1.8 are the same ones selected on the vMicro > IDE Field.  Multiple can be configured to allow you switch easily between versions of the Arduino IDE or other IDE's such as Energia from TI.

The Arduino2 location isn't user configurable, and as the 2.x IDE does not come packaged with any boards (as the 1.x used to), we don't need to know its location so this is correct.

The 1.6/1.8 IDE location is normally either in C:\Program Files when using the installer, or a folder outside of LocalAppData if you installed from ZIP.  If you do not have the Arduino 1.x IDE installed on your machine the value can be deleted.   

Do you have the 1.x version of the Arduino IDE in C;\Users\matth\AppData\Local\Programs\Arduino IDE?

  
Back to top
IP Logged
 
Swiss Matt
Newbies
*
Offline


Posts: 9
Joined: Nov 30th, 2022
Re: A few problems with the trial version - some help/advice needed...
Reply #9 - Dec 9th, 2022 at 8:03am
Print Post  
Simon@Visual Micro wrote on Dec 8th, 2022 at 1:11pm:
The 1.6/1.8 IDE location is normally either in C:\Program Files when using the installer, or a folder outside of LocalAppData if you installed from ZIP.  If you do not have the Arduino 1.x IDE installed on your machine the value can be deleted. 

I only have Arduino IDE 2.0 installed. It was not clear from the documentation why we need this. My point was that if I select v2 in the "Configure IDE Locations" dialog, close it, then open it again, it gets set back to "1.6/1.8". This does not seem to be the right behavior (e.g. something seems to be wrong there).

Simon@Visual Micro wrote on Dec 5th, 2022 at 5:02pm:
3) Can you send us the JSON URL's (if any) which are added for the selected IDE on the IDE locations screen?

I did not understand this question. I don't see any "JSON URLs" on the the Configure IDE Locations screen, it's just a combobox and some folder locations - or am I on the wrong dialog box?

Simon@Visual Micro wrote on Dec 5th, 2022 at 5:02pm:
1) Does the Serial Monitor work correctly?

In addition to my previous remark, if you mean "Does it have an all-white window with no text?" then the answer is no, everything is visible, so this part is working.

What about a "factory reset" of all options and settings? Is there a way to do that?
Maybe that would do something...

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


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: A few problems with the trial version - some help/advice needed...
Reply #10 - Dec 11th, 2022 at 5:28pm
Print Post  
The IDE locations window allows you to cofigure more than one IDE. It always shows the full list of IDE's available for configuration. You do not select an IDE for use within that window, just configure locations if you want to work with more than one IDE.

You can then select an IDE and board for each project. You have Arduino 2 selected for the project in one of your earlier screen shots. The project will remember which you have selected.

You don't normally need any IDE's installed but because the platform explorer is not working for you then you need to use the board manager in arduino 2 or arduino 1 to install boards. We can see in your screen shot that you already have installed boards. Therefore, you don't need the platform explorer at this time.

You don't need the reset but it is available via "Tools>Import and Export Settings".
« Last Edit: Dec 11th, 2022 at 5:29pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2441
Joined: Feb 13th, 2019
Re: A few problems with the trial version - some help/advice needed...
Reply #11 - Dec 14th, 2022 at 1:55pm
Print Post  
Just for our testing, can you confirm what Resolution and Zoom level you currently have your system set to?
  
Back to top
IP Logged
 
Swiss Matt
Newbies
*
Offline


Posts: 9
Joined: Nov 30th, 2022
Re: A few problems with the trial version - some help/advice needed...
Reply #12 - Dec 16th, 2022 at 8:36am
Print Post  
Hi Simon,
Simon@Visual Micro wrote on Dec 14th, 2022 at 1:55pm:
Just for our testing, can you confirm what Resolution and Zoom level you currently have your system set to?

Main screen: 175% (Recommended), 3840x2160 (Recommended)
Laptop screen: 150% (Recommended), 2560x1440 (Recommended)
Some dialog boxes are not well scaled, see the "Configure IDE Locations" screen shots above, but this does not account for the other behavior.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: A few problems with the trial version - some help/advice needed...
Reply #13 - Dec 16th, 2022 at 1:45pm
Print Post  
We have released an update that hopefully resolves the issues.

Thanks for the post. The blank explorer was related to a problem in attempt to scale the UI above 100%.
« Last Edit: Dec 22nd, 2022 at 11:02pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Swiss Matt
Newbies
*
Offline


Posts: 9
Joined: Nov 30th, 2022
Re: A few problems with the trial version - some help/advice needed...
Reply #14 - Apr 20th, 2023 at 11:24am
Print Post  
Forgive the delay (my evaluation license had expired).

I have updated to the latest version of Visual Micro, and I can confirm that the problems I had with the blank Micro Explorer and Serial Monitor windows on Windows 11 is now fixed.

But I still have problems when attempting to debug a simple sketch:

I’m using an Arduino Zero, VS 2022 latest, Windows 11.

When I open VS and press Start for the very first time, everything works perfectly. The breakpoint is hit, and I can step through the code. See 1st pic in attachment screenshots-20230420.pdf, and 1st log in log-20230420.txt.
But if I press Stop Debugging, then press Start for a second time, it does not work. The system seems to hang. The breakpoint is not hit and nothing works. See 2nd screenshot and log.
(But I don’t think you can see much from the screenshots.)
Pressing pause (Break All) causes the “Frame not in module” error, which I mentioned before. See 3rd screenshot.

Could there be something wrong with my configuration? (I do not understand all the “General / Global Options”, so I have not changed them.) Maybe I need a driver?

I have exactly the same behaviour on both my old Windows 10 machine and the new Windows 11 machine.
The Arduino IDE 2.0.4 works well on both machines. 
I tried the latest version of openocd, but that does not seem to make any difference to the behaviour.

Additional: Cosmetic. Visual Micro’s comment for the “Stop Debugger” button, when you hover over the button, suggests pressing CTRL+F5, but that does nothing. Should this be SHIFT+F5?

  

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


Posts: 2441
Joined: Feb 13th, 2019
Re: A few problems with the trial version - some help/advice needed...
Reply #15 - Apr 20th, 2023 at 11:46am
Print Post  
Thanks for the update.

Can you confirm when you have ended the debugging session, that there are no running processes for either openocd.exe or arm-none-eabi-gdb.exe? (If there are then kill them via Task Manager)

If the above does not help, does resetting the board between debugging sessions help at all?
  
Back to top
IP Logged
 
Swiss Matt
Newbies
*
Offline


Posts: 9
Joined: Nov 30th, 2022
Re: A few problems with the trial version - some help/advice needed...
Reply #16 - Apr 20th, 2023 at 2:16pm
Print Post  
After pressing Stop Debugging (SHIFT+F5), arm-none-eabi-gdb.exe is still running. End Task does not help, neither does resetting the Zero.

In one instance I had a different set of errors:

-------------------------------------
Uploading 'Sketch3' to 'Arduino Zero (Programming Port) (arduino_zero_edbg)' using 'COM9'
Uploader started for board Arduino Zero (Programming Port) (arduino_zero_edbg)
Upload method will be: bootloader
Uploading via Bootloader 
uino7\bin\openocd.exe -d2 -s duino7/share/openocd/scripts/" -f riants/arduino_zero/openocd_scripts/arduino_zero.cfg" -c "telnet_port disabled; program ch3.ino.bin} verify reset 0x2000; shutdown"
Open On-Chip Debugger 0.12.0 (2023-01-14-23:37)
Licensed under GNU GPL v2
For bug reports, read
     http://openocd.org/doc/doxygen/bugs.html
debug_level: 2
Info : auto-selecting first available session transport "swd". To override use 'transport select <transport>'.
Info : CMSIS-DAP: SWD supported
Info : CMSIS-DAP: FW Version = 02.01.0157
Info : CMSIS-DAP: Serial# = OU3D5RJD677YO46I7TWW
Info : CMSIS-DAP: Interface Initialised (SWD)
Info : SWCLK/TCK = 1 SWDIO/TMS = 1 TDI = 1 TDO = 1 nTRST = 0 nRESET = 1
Info : CMSIS-DAP: Interface ready
Info : clock speed 400 kHz
Info : SWD DPIDR 0x0bc11477
Info : [at91samd21g18.cpu] Cortex-M0+ r0p1 processor detected
Info : [at91samd21g18.cpu] target has 4 breakpoints, 2 watchpoints
Info : starting gdb server for at91samd21g18.cpu on 3333
Info : Listening on port 3333 for gdb connections
Error: CMSIS-DAP command mismatch. Expected 0x5 received 0x3
Polling target at91samd21g18.cpu failed, trying to reexamine
Error: CMSIS-DAP command mismatch. Sent 0x3 received 0x5
Error: CMSIS-DAP command CMD_DISCONNECT failed.
Error: CMSIS-DAP command mismatch. Sent 0x12 received 0x2
Info : SWD DPIDR 0x0bc11477
Error: CMSIS-DAP transfer count mismatch: expected 5, got 1
Error: CMSIS-DAP transfer count mismatch: expected 1, got 5
Error: CMSIS-DAP transfer count mismatch: expected 1, got 5
Error: CMSIS-DAP transfer count mismatch: expected 3, got 1
Error: CMSIS-DAP transfer count mismatch: expected 3, got 1
Error: CMSIS-DAP transfer count mismatch: expected 5, got 1
Error: CMSIS-DAP transfer count mismatch: expected 4, got 1
Info : [at91samd21g18.cpu] Cortex-M0+ r0p0 processor detected
Error: CMSIS-DAP transfer count mismatch: expected 3, got 1
Error: CMSIS-DAP transfer count mismatch: expected 2, got 1
Error: CMSIS-DAP transfer count mismatch: expected 2, got 1
Error: CMSIS-DAP transfer count mismatch: expected 3, got 1
Info : [at91samd21g18.cpu] target has 0 breakpoints, 0 watchpoints
Error: CMSIS-DAP transfer count mismatch: expected 3, got 5
Error: CMSIS-DAP transfer count mismatch: expected 5, got 3
Error: CMSIS-DAP transfer count mismatch: expected 5, got 3
Error: CMSIS-DAP transfer count mismatch: expected 2, got 4
Error: CMSIS-DAP transfer count mismatch: expected 4, got 5
Error: CMSIS-DAP transfer count mismatch: expected 1, got 5
Error: CMSIS-DAP transfer count mismatch: expected 5, got 2
Error: CMSIS-DAP transfer count mismatch: expected 1, got 4
Error: CMSIS-DAP transfer count mismatch: expected 1, got 5
Error: CMSIS-DAP transfer count mismatch: expected 3, got 1
Error: CMSIS-DAP transfer count mismatch: expected 5, got 1
Error: CMSIS-DAP command mismatch. Sent 0x10 received 0x5
Error: CMSIS-DAP command CMD_DAP_SWJ_PINS failed.
Error: CMSIS-DAP: Interface reset failed
Error: SRST error
[at91samd21g18.cpu] halted due to debug-request, current mode: Thread 
xPSR: 0x61000000 pc: 0x0000060c msp: 0x20007ffc
Error: CMSIS-DAP transfer count mismatch: expected 2, got 4
** Programming Started **
Error: CMSIS-DAP transfer count mismatch: expected 4, got 2
Error: Couldn't find part corresponding to DID 00000000
Error: auto_probe failed
embedded:startup.tcl:1516: Error: ** Programming Failed **
in procedure 'program' 
The uploader process failed
in procedure 'program_error' called at file "embedded:startup.tcl", line 1581
at file "embedded:startup.tcl", line 1516
Error: CMSIS-DAP command mismatch. Sent 0x3 received 0x5
Error: CMSIS-DAP command CMD_DISCONNECT failed.
----------------------------------

Driver
Could it be the driver? I opened Zadig, and it suggested this:

EDBG CMSIS-DAP (interface 0)
Driver   HidUsb (v10.0.22621.819)  ->  WinUSB (v6.1.7600.16385)

USB cables
I have also tried several different USB cables, with no changes to the behaviour. (And my Wilderness Labs Meadow F7 Feather arrived today, it works well in Visual Studio.)





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


Posts: 2441
Joined: Feb 13th, 2019
Re: A few problems with the trial version - some help/advice needed...
Reply #17 - Apr 20th, 2023 at 5:30pm
Print Post  
Can you try adding a local board.txt file to your project (vMicro > Add Code > Add Local Board.txt) and pasting in the text from the attached file.

When you try to Start Debugging now there will be a delay between the upload and the debugging session kicking in which has improved things when testing on my machine this evening.

Let us know if this helps at all?
  

Please Register or Login to the Forum to see File Attachments
Back to top
IP Logged
 
Swiss Matt
Newbies
*
Offline


Posts: 9
Joined: Nov 30th, 2022
Re: A few problems with the trial version - some help/advice needed...
Reply #18 - Apr 21st, 2023 at 4:24pm
Print Post  
Thanks. Yes, that seems to have fixed it! Smiley A timing problem? I will continue my evaluation...

Just one thing I noticed. If the sketch is running, and I add a new breakpoint by clicking in the margin, then I immediately get a strange exception/interrupt. See attached screenshot. Is this normal? Pressing "Continue >" seems to recover, and the new breakpoint is hit.


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