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) Start Debugging session changes target 3.6->3.2 ?!? (Read 2939 times)
PoutinePlatter
Junior Member
**
Offline


Posts: 23
Joined: Jun 16th, 2019
Start Debugging session changes target 3.6->3.2 ?!?
Jun 16th, 2019 at 4:02pm
Print Post  
VisualMicro 1906.3.0
VS2017 Community
Teensy 3.6 on USB


Target platform keeps reverting. 

Compiles fine, uploads fine, but as soon as session starts, target platform in VS changes to Teensy 3.2/3.1.  This value persists after exiting the session (thereby triggering errors in my compiles because the 3.2/3.1 doesnt have the hardware I'm using). 

Some very simple code based on this demo (and I went back to fresh bare bones demo-code here just to be sure was not some mistake I made). 
https://github.com/skpang/Teensy-3.6-Dual-CAN-Bus-Breakout-Board

Save Board and Port option is turned on and works (can close solution and re-open and I get the correct board... as long as I don't save it whilst its been screwed up...)

Suggestions much appreciated.
« Last Edit: Jun 16th, 2019 at 4:21pm by PoutinePlatter »  
Back to top
 
IP Logged
 
PoutinePlatter
Junior Member
**
Offline


Posts: 23
Joined: Jun 16th, 2019
Re: Start Debugging session changes target 3.6->3.2 ?!?
Reply #1 - Jun 16th, 2019 at 4:59pm
Print Post  
Updated to 1906.16.1 - same issue.   
Changes during the flash/update period I believe.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Start Debugging session changes target 3.6->3.2 ?!?
Reply #2 - Jun 16th, 2019 at 8:37pm
Print Post  
This is because you have enabled "vMicro>General>Auto select board/port when a device connects"

The feature works well for Arduino boards which all have a unique vid/pid. However some hardware has inconsistencies. If you look in the boards.txt for the "arduinoide/hardware/teensy/avr" you will see that Teensy31 has a vid.0=0x16C0 but the teensy36 does not have a vid/pid defined. The problem means that Teensy 3.6 has same vid/pid as Teensy 3.1/3.2.

You could add the vid pid settings to the teensy36 definition if you want to then click rescan or restart the ide, or you could ask Teensy on the pjrc.com web site to add it for you in the next release, or switch off the auto select board/port feature.

  
Back to top
WWW  
IP Logged
 
PoutinePlatter
Junior Member
**
Offline


Posts: 23
Joined: Jun 16th, 2019
Re: Start Debugging session changes target 3.6->3.2 ?!?
Reply #3 - Jun 16th, 2019 at 8:40pm
Print Post  
Ok that was easy.  I can turn that off, although its nice when I plug in other targets,  I can manage that.  Thanks!
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Start Debugging session changes target 3.6->3.2 ?!?
Reply #4 - Jun 16th, 2019 at 8:44pm
Print Post  
  
Back to top
WWW  
IP Logged
 
PoutinePlatter
Junior Member
**
Offline


Posts: 23
Joined: Jun 16th, 2019
Re: Start Debugging session changes target 3.6->3.2 ?!?
Reply #5 - Jun 17th, 2019 at 12:51pm
Print Post  
Not to make extra work for you, but, maybe temporary workaround/improvement until they do better on the Teensy side:

If PID = Teensy3.x 
     If projfile.containsTeensy3xPID 
          VID/PID=projfile.PID
     Else MsgBox("Your thing is a Teensy3.x can't tell which one be sure you select it right in the box up above")

That way if I've saved the target in the file it stays put after the reboot, but otherwise will prompt somebody to choose the right target. 

Don't ask me why I wrote pseudocode in pseudoVB syntax. I have no idea where that came from.  Roll Eyes
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Start Debugging session changes target 3.6->3.2 ?!?
Reply #6 - Jun 17th, 2019 at 5:48pm
Print Post  
Not sure I fully understand. If the current board has the vid/pid passed on usb connect then we use the current board otherwise we look for a board with the vid/pid. That's only if you have enabled the "auto select board"

  
Back to top
WWW  
IP Logged
 
PoutinePlatter
Junior Member
**
Offline


Posts: 23
Joined: Jun 16th, 2019
Re: Start Debugging session changes target 3.6->3.2 ?!?
Reply #7 - Jun 17th, 2019 at 7:19pm
Print Post  
Tim@Visual Micro wrote on Jun 17th, 2019 at 5:48pm:
Not sure I fully understand. If the current board has the vid/pid passed on usb connect then we use the current board otherwise we look for a board with the vid/pid. That's only if you have enabled the "auto select board"



Hmm.  Hard for me to explain more simply but I'll try.   And I thought my pseudocode was so simple.  Undecided

At the moment if "auto select" is on, then every time you see a Teensy3x board ID, you force the Target = Teensy3.2   

Regardless of the fact that 2ms ago the whole project was setup and successfully compiled for Teensy3.5/6/999.   

To be clear - it does this every single time the board loads a sketch, so there is now way for a 3.5/6 board user to leave autoselect on as part of their other work routine, even if they have a pile of other units to manage. 

My suggestion is: 

Implement the above logic only if "auto select board" is on, and the ID # turns out to be a Teensy3.x.   

It will just mean that those of us w/ Teensy3.x won't be forced to choose either not use auto select (again I have a stack of different devboards here so it IS nice...) or, constantly have to correct the forced ID. 



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


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Start Debugging session changes target 3.6->3.2 ?!?
Reply #8 - Jun 17th, 2019 at 7:28pm
Print Post  
It does ignore the boot port if different when uploading but in this case the board just reconnects after upload. It's unrelated to debugging and someone might have simply plugged in a new board.

The problem is that the teensy 3.6 doesn't have a vid/pid, if it did then life would be easy, even if the same vid/pid is used for multiple boards.

What I think you are heading towards is suggesting that "auto select board" be disabled for the Teensy3x entirely. This makes sense based on the current teensy config and will try to add to the next version thanks.



  
Back to top
WWW  
IP Logged
 
PoutinePlatter
Junior Member
**
Offline


Posts: 23
Joined: Jun 16th, 2019
Re: Start Debugging session changes target 3.6->3.2 ?!?
Reply #9 - Jun 17th, 2019 at 7:31pm
Print Post  
Tim@Visual Micro wrote on Jun 17th, 2019 at 7:28pm:
It does ignore the boot port if different when uploading but in this case the board just reconnects after upload. It's unrelated to debugging and someone might have simply plugged in a new board.

The problem is that the teensy 3.6 doesn't have a vid/pid, if it did then life would be easy, even if the same vid/pid is used for multiple boards.

What I think you are heading towards is suggesting that "auto select board" be disabled for the Teensy3x entirely. This makes sense based on the current teensy config and will try to add to the next version thanks.





Yes correct its the reconnect after the reboot/upload when it occurs clearly. 

I thought my suggest was more clever in the sense of "as long as a board for this project is selected, assume all boards for this project are on the same version"... but probably "selective disable" is nearly as good and simpler to implement... 
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Start Debugging session changes target 3.6->3.2 ?!?
Reply #10 - Jun 17th, 2019 at 8:06pm
Print Post  
Yes I will give it some more thought. Maybe if any platform has missing vid/pid then ignore switching for any board of that platform. This would be simple and easy to support.
  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Start Debugging session changes target 3.6->3.2 ?!?
Reply #11 - Jun 18th, 2019 at 4:30pm
Print Post  
A solution has been added to the next release. Thanks again.
  
Back to top
WWW  
IP Logged
 
PoutinePlatter
Junior Member
**
Offline


Posts: 23
Joined: Jun 16th, 2019
Re: Start Debugging session changes target 3.6->3.2 ?!?
Reply #12 - Jun 18th, 2019 at 4:32pm
Print Post  
Thanks much!
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Start Debugging session changes target 3.6->3.2 ?!?
Reply #13 - Jun 26th, 2019 at 4:58pm
Print Post  
While waiting for a new release of visual micro for AS7 you might like to try the new debug features of Visual Micro in VS2017 or VS2019. They are "experimental" so we expect a few failures initially.

The debugger is selected on the vMicro>Debugger menu Off/Serial or Hardware. When Hardware is selected a second list appears showing different debuggers. There is also a new tool bar called "Micro Debug Options" which is easier to use than the menus.

The VS gallery version of visual micro does not include ICE debug for SAMD boards but the release in this forum does...
https://www.visualmicro.com/forums/YaBB.pl?num=1561552797
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint