Teensyduino Serial Monitor vs VSCode and PlatformIO flashing - Fireworks!

Davidelvig

Well-known member
I think I've narrowed down a hard crash on my older (and now newer) MacBook Pro.

I recall the old blue-screen-of-death days on a Windows PC.
These are equivalent Mac crashes. Exceedingly rare in my experience. But reproducible in this case.

I've been Teensy programming in VS Code with PlatformIO for 6 months, and love it, with one exception...
With USB Type defined only as MIDI, I get no serial debugging in VC Code.
So I've been using the Serial Monitor from Arduino (Teensyduino) after coding and flashing from VC Code.

If I leave the Arduino Serial Monitor running during flashing from VS Code, about half of the time I'll get the hard crash. The Mac screen goes blank and it reboots.

This happens fairly regularly on these two Macs
- MacBook Pro 2017, running Catalina or Big Sur (and the one before Catalina)
- MacBook M1 (new last week) running Big Sur.

Latest VS Code is each case and latest stable Teensyduino.

I have a pretty good work-around...
- when programming, include Serial in the USB Type, and use the Serial Monitor in VS Code/PlatformIO - and not the Arduino one.
- If I need to ship a product to a user that will use a MIDI hub that is confused by USB Serial, I can cut a special build with a USB Type of MIDI only.

I could also remember to kill the Arduino Serial Monitor before flashing - but my memory is defective at times.

Have others found this issue?
 
Not seen this before. Combining MAC and VS Code makes it a rather unique setup.

Most I know are using Windows and avoid the IDE SerMon using TyCommander. TyCommander has a thread and a github share point and can replace just the IDE SerMon, or both SerMon and TeensyLoader to perform the upload.

In Windows the IDE can still use TeensyLoader and TyCommander as Serial Monitor automatically 'steps aside' to allow TeensyLoader to upload. Or with 'Integration' TyCommander edits the build to replace TeensyLoader.

TyCommander can be used on MAC - but how it would interface with VS Code would have to be tested.

Edit>> Looking to post link to TyCOmmander I found this thread showing it and perhaps details for VS Code uage :: VScode-amp-tycommander-not-finds-teensy-4-1-board
 
Back
Top