This is a bit of a strange one, perhaps someone can shed some light on it for me?
The problem started after a minor change, reverting it didn’t help, I hadn’t worked on the program for some time so I think more likely it was broken by a VS2022 upgrade.
I build and start debugging, the usual loading messages go by, the device reboots and is waiting for the debugger, then it just hangs. For a day, if I leave it. However the program has loaded and will happily run if I reset the board, I just can’t start/attach the debugger.
Things I’ve tried so far:
- Restart VS2022
- Reboot the PC.
- Switch debugging from serial to USB
- Change to another SCM20260 device
- Change to another PC (new build, install VS2022/TinyCLR components from scratch)
none of which made any difference.
However if I open the same project with VS2019, it will go through the same load procedure and connect to the debugger as normal. So at least there is that!
And if I run a small project (blinky, RTC test, MassStorage test) with VS2022 it will happily connect and debug. So it appears to be something to do with size/timing of a large project and a recent change to VS2022.
Deployment and debug output below below. You can see the deployment area isn’t full.
Any suggestions appreciated
====================== TinyCLR Device Deployment Output
Looking for a device on transport 'Serial'.
Found device port 'Serial' with ID 'b5e54d5e-a217-47b9-b2af-b65f052999fa' for transport 'Serial'.
Starting device deployment.
Attempting to connect to device 'Serial:COM3': iteration 0.
Opening port '\\.\COM3'.
Attaching debugger engine.
Debugger engine attached.
Generating device specific assemblies.
- AnodeMeter v4.2.8830.39953 with size 114,724 bytes at 'D:\usr\src\Alcoa\Projects\Potrod\Software\TinyCLR\AnodeMeter\AnodeMeter\bin\Debug\pe\AnodeMeter.pe'.
- ESP8266Library v1.0.0.0 with size 36,560 bytes at 'D:\usr\src\Alcoa\Projects\Potrod\Software\TinyCLR\AnodeMeter\AnodeMeter\bin\Debug\pe\ESP8266Library.pe'.
- mscorlib v2.2.0.7000 with size 72,556 bytes at 'D:\usr\src\Alcoa\Projects\Potrod\Software\TinyCLR\AnodeMeter\AnodeMeter\bin\Debug\pe\mscorlib.pe'.
- GHIElectronics.TinyCLR.Cryptography v2.2.0.7000 with size 8,424 bytes at 'D:\usr\src\Alcoa\Projects\Potrod\Software\TinyCLR\AnodeMeter\AnodeMeter\bin\Debug\pe\GHIElectronics.TinyCLR.Cryptography.pe'.
- GHIElectronics.TinyCLR.Data.Xml v2.2.0.7000 with size 61,168 bytes at 'D:\usr\src\Alcoa\Projects\Potrod\Software\TinyCLR\AnodeMeter\AnodeMeter\bin\Debug\pe\GHIElectronics.TinyCLR.Data.Xml.pe'.
- GHIElectronics.TinyCLR.Devices.Adc v2.2.0.7000 with size 2,612 bytes at 'D:\usr\src\Alcoa\Projects\Potrod\Software\TinyCLR\AnodeMeter\AnodeMeter\bin\Debug\pe\GHIElectronics.TinyCLR.Devices.Adc.pe'.
- GHIElectronics.TinyCLR.Devices.Dac v2.2.0.7000 with size 2,228 bytes at 'D:\usr\src\Alcoa\Projects\Potrod\Software\TinyCLR\AnodeMeter\AnodeMeter\bin\Debug\pe\GHIElectronics.TinyCLR.Devices.Dac.pe'.
- GHIElectronics.TinyCLR.Devices.Gpio v2.2.0.7000 with size 4,880 bytes at 'D:\usr\src\Alcoa\Projects\Potrod\Software\TinyCLR\AnodeMeter\AnodeMeter\bin\Debug\pe\GHIElectronics.TinyCLR.Devices.Gpio.pe'.
- GHIElectronics.TinyCLR.Devices.I2c v2.2.0.7000 with size 10,464 bytes at 'D:\usr\src\Alcoa\Projects\Potrod\Software\TinyCLR\AnodeMeter\AnodeMeter\bin\Debug\pe\GHIElectronics.TinyCLR.Devices.I2c.pe'.
- GHIElectronics.TinyCLR.Devices.Pwm v2.2.0.7000 with size 3,012 bytes at 'D:\usr\src\Alcoa\Projects\Potrod\Software\TinyCLR\AnodeMeter\AnodeMeter\bin\Debug\pe\GHIElectronics.TinyCLR.Devices.Pwm.pe'.
- GHIElectronics.TinyCLR.Devices.Rtc v2.2.0.7000 with size 3,316 bytes at 'D:\usr\src\Alcoa\Projects\Potrod\Software\TinyCLR\AnodeMeter\AnodeMeter\bin\Debug\pe\GHIElectronics.TinyCLR.Devices.Rtc.pe'.
- GHIElectronics.TinyCLR.Devices.Storage v2.2.0.7000 with size 3,432 bytes at 'D:\usr\src\Alcoa\Projects\Potrod\Software\TinyCLR\AnodeMeter\AnodeMeter\bin\Debug\pe\GHIElectronics.TinyCLR.Devices.Storage.pe'.
- GHIElectronics.TinyCLR.Devices.Uart v2.2.0.7000 with size 8,012 bytes at 'D:\usr\src\Alcoa\Projects\Potrod\Software\TinyCLR\AnodeMeter\AnodeMeter\bin\Debug\pe\GHIElectronics.TinyCLR.Devices.Uart.pe'.
- GHIElectronics.TinyCLR.Devices.Usb v2.2.0.7000 with size 1,156 bytes at 'D:\usr\src\Alcoa\Projects\Potrod\Software\TinyCLR\AnodeMeter\AnodeMeter\bin\Debug\pe\GHIElectronics.TinyCLR.Devices.Usb.pe'.
- GHIElectronics.TinyCLR.Devices.UsbClient v2.2.0.7000 with size 21,112 bytes at 'D:\usr\src\Alcoa\Projects\Potrod\Software\TinyCLR\AnodeMeter\AnodeMeter\bin\Debug\pe\GHIElectronics.TinyCLR.Devices.UsbClient.pe'.
- GHIElectronics.TinyCLR.Devices.Watchdog v2.2.0.7000 with size 1,652 bytes at 'D:\usr\src\Alcoa\Projects\Potrod\Software\TinyCLR\AnodeMeter\AnodeMeter\bin\Debug\pe\GHIElectronics.TinyCLR.Devices.Watchdog.pe'.
- GHIElectronics.TinyCLR.IO v2.2.0.7000 with size 21,052 bytes at 'D:\usr\src\Alcoa\Projects\Potrod\Software\TinyCLR\AnodeMeter\AnodeMeter\bin\Debug\pe\GHIElectronics.TinyCLR.IO.pe'.
- GHIElectronics.TinyCLR.IO.TinyFileSystem v2.2.0.7000 with size 16,372 bytes at 'D:\usr\src\Alcoa\Projects\Potrod\Software\TinyCLR\AnodeMeter\AnodeMeter\bin\Debug\pe\GHIElectronics.TinyCLR.IO.TinyFileSystem.pe'.
- GHIElectronics.TinyCLR.Native v2.2.0.7000 with size 6,200 bytes at 'D:\usr\src\Alcoa\Projects\Potrod\Software\TinyCLR\AnodeMeter\AnodeMeter\bin\Debug\pe\GHIElectronics.TinyCLR.Native.pe'.
- GHIElectronics.TinyCLR.Networking v2.2.0.7000 with size 12,600 bytes at 'D:\usr\src\Alcoa\Projects\Potrod\Software\TinyCLR\AnodeMeter\AnodeMeter\bin\Debug\pe\GHIElectronics.TinyCLR.Networking.pe'.
- GHIElectronics.TinyCLR.Update v2.2.0.7000 with size 4,440 bytes at 'D:\usr\src\Alcoa\Projects\Potrod\Software\TinyCLR\AnodeMeter\AnodeMeter\bin\Debug\pe\GHIElectronics.TinyCLR.Update.pe'.
Total deployment size is 415,972 bytes.
Incrementally deploying assemblies to the device:
Allocating assemblies:
- Address: 0x08140000 => AnodeMeter
- Address: 0x0815C024 => mscorlib
- Address: 0x0816DB90 => GHIElectronics.TinyCLR.Data.Xml
- Address: 0x0817CA80 => ESP8266Library
- Address: 0x08185950 => GHIElectronics.TinyCLR.Devices.UsbClient
- Address: 0x0818ABC8 => GHIElectronics.TinyCLR.IO
- Address: 0x0818FE04 => GHIElectronics.TinyCLR.IO.TinyFileSystem
- Address: 0x08193DF8 => GHIElectronics.TinyCLR.Networking
- Address: 0x08196F30 => GHIElectronics.TinyCLR.Devices.I2c
- Address: 0x08199810 => GHIElectronics.TinyCLR.Cryptography
- Address: 0x0819B8F8 => GHIElectronics.TinyCLR.Devices.Uart
- Address: 0x0819D844 => GHIElectronics.TinyCLR.Native
- Address: 0x0819F07C => GHIElectronics.TinyCLR.Devices.Gpio
- Address: 0x081A038C => GHIElectronics.TinyCLR.Update
- Address: 0x081A14E4 => GHIElectronics.TinyCLR.Devices.Storage
- Address: 0x081A224C => GHIElectronics.TinyCLR.Devices.Rtc
- Address: 0x081A2F40 => GHIElectronics.TinyCLR.Devices.Pwm
- Address: 0x081A3B04 => GHIElectronics.TinyCLR.Devices.Adc
- Address: 0x081A4538 => GHIElectronics.TinyCLR.Devices.Dac
- Address: 0x081A4DEC => GHIElectronics.TinyCLR.Devices.Watchdog
- Address: 0x081A5460 => GHIElectronics.TinyCLR.Devices.Usb
Deploying assemblies:
- Erasing sector 1 (131,072 bytes).
- Writing sector 1 (131,072 bytes).
- Writing sector 2 (131,072 bytes).
- Writing sector 3 (131,072 bytes).
- Writing sector 4 (22,784 bytes).
Assemblies deployed. There are 238,364 bytes left in the deployment area.
Restarting interpreter.
Attaching to device.
Waiting for device to initialize.
====================== Debug Output
Loading Deployment Assemblies.
Attaching deployed file.
Assembly: AnodeMeter (4.2.8830.39953) Attaching deployed file.
Assembly: mscorlib (2.2.0.7000) Attaching deployed file.
Assembly: GHIElectronics.TinyCLR.Data.Xml (2.2.0.7000) Attaching deployed file.
Assembly: ESP8266Library (1.0.0.0) Attaching deployed file.
Assembly: GHIElectronics.TinyCLR.Devices.UsbClient (2.2.0.7000) Attaching deployed file.
Assembly: GHIElectronics.TinyCLR.IO (2.2.0.7000) Attaching deployed file.
Assembly: GHIElectronics.TinyCLR.IO.TinyFileSystem (2.2.0.7000) Attaching deployed file.
Assembly: GHIElectronics.TinyCLR.Networking (2.2.0.7000) Attaching deployed file.
Assembly: GHIElectronics.TinyCLR.Devices.I2c (2.2.0.7000) Attaching deployed file.
Assembly: GHIElectronics.TinyCLR.Cryptography (2.2.0.7000) Attaching deployed file.
Assembly: GHIElectronics.TinyCLR.Devices.Uart (2.2.0.7000) Attaching deployed file.
Assembly: GHIElectronics.TinyCLR.Native (2.2.0.7000) Attaching deployed file.
Assembly: GHIElectronics.TinyCLR.Devices.Gpio (2.2.0.7000) Attaching deployed file.
Assembly: GHIElectronics.TinyCLR.Update (2.2.0.7000) Attaching deployed file.
Assembly: GHIElectronics.TinyCLR.Devices.Storage (2.2.0.7000) Attaching deployed file.
Assembly: GHIElectronics.TinyCLR.Devices.Rtc (2.2.0.7000) Attaching deployed file.
Assembly: GHIElectronics.TinyCLR.Devices.Pwm (2.2.0.7000) Attaching deployed file.
Assembly: GHIElectronics.TinyCLR.Devices.Adc (2.2.0.7000) Attaching deployed file.
Assembly: GHIElectronics.TinyCLR.Devices.Dac (2.2.0.7000) Attaching deployed file.
Assembly: GHIElectronics.TinyCLR.Devices.Watchdog (2.2.0.7000) Attaching deployed file.
Assembly: GHIElectronics.TinyCLR.Devices.Usb (2.2.0.7000) Resolving.
The debugging target runtime is loading the application assemblies and starting execution.
Ready.
'GHIElectronics.TinyCLR.VisualStudio.ProjectSystem.dll' (Managed): Loaded 'D:\usr\src\Alcoa\Projects\Potrod\Software\TinyCLR\AnodeMeter\AnodeMeter\bin\Debug\pe\..\mscorlib.dll'
'GHIElectronics.TinyCLR.VisualStudio.ProjectSystem.dll' (Managed): Loaded 'D:\usr\src\Alcoa\Projects\Potrod\Software\TinyCLR\AnodeMeter\AnodeMeter\bin\Debug\pe\..\GHIElectronics.TinyCLR.Native.dll'
'GHIElectronics.TinyCLR.VisualStudio.ProjectSystem.dll' (Managed): Loaded 'D:\usr\src\Alcoa\Projects\Potrod\Software\TinyCLR\AnodeMeter\AnodeMeter\bin\Debug\pe\..\GHIElectronics.TinyCLR.Devices.Dac.dll'
'GHIElectronics.TinyCLR.VisualStudio.ProjectSystem.dll' (Managed): Loaded 'D:\usr\src\Alcoa\Projects\Potrod\Software\TinyCLR\AnodeMeter\AnodeMeter\bin\Debug\pe\..\GHIElectronics.TinyCLR.Devices.Gpio.dll'
'GHIElectronics.TinyCLR.VisualStudio.ProjectSystem.dll' (Managed): Loaded 'D:\usr\src\Alcoa\Projects\Potrod\Software\TinyCLR\AnodeMeter\AnodeMeter\bin\Debug\pe\..\GHIElectronics.TinyCLR.Devices.Pwm.dll'
'GHIElectronics.TinyCLR.VisualStudio.ProjectSystem.dll' (Managed): Loaded 'D:\usr\src\Alcoa\Projects\Potrod\Software\TinyCLR\AnodeMeter\AnodeMeter\bin\Debug\pe\..\GHIElectronics.TinyCLR.Devices.Usb.dll'
'GHIElectronics.TinyCLR.VisualStudio.ProjectSystem.dll' (Managed): Loaded 'D:\usr\src\Alcoa\Projects\Potrod\Software\TinyCLR\AnodeMeter\AnodeMeter\bin\Debug\pe\..\GHIElectronics.TinyCLR.Devices.UsbClient.dll'
'GHIElectronics.TinyCLR.VisualStudio.ProjectSystem.dll' (Managed): Loaded 'D:\usr\src\Alcoa\Projects\Potrod\Software\TinyCLR\AnodeMeter\AnodeMeter\bin\Debug\pe\..\GHIElectronics.TinyCLR.Devices.Storage.dll'
'GHIElectronics.TinyCLR.VisualStudio.ProjectSystem.dll' (Managed): Loaded 'D:\usr\src\Alcoa\Projects\Potrod\Software\TinyCLR\AnodeMeter\AnodeMeter\bin\Debug\pe\..\GHIElectronics.TinyCLR.Devices.Rtc.dll'
'GHIElectronics.TinyCLR.VisualStudio.ProjectSystem.dll' (Managed): Loaded 'D:\usr\src\Alcoa\Projects\Potrod\Software\TinyCLR\AnodeMeter\AnodeMeter\bin\Debug\pe\..\GHIElectronics.TinyCLR.Devices.Uart.dll'
'GHIElectronics.TinyCLR.VisualStudio.ProjectSystem.dll' (Managed): Loaded 'D:\usr\src\Alcoa\Projects\Potrod\Software\TinyCLR\AnodeMeter\AnodeMeter\bin\Debug\pe\..\GHIElectronics.TinyCLR.Networking.dll'
'GHIElectronics.TinyCLR.VisualStudio.ProjectSystem.dll' (Managed): Loaded 'D:\usr\src\Alcoa\Projects\Potrod\Software\TinyCLR\AnodeMeter\AnodeMeter\bin\Debug\pe\..\ESP8266Library.dll', Symbols loaded.
'GHIElectronics.TinyCLR.VisualStudio.ProjectSystem.dll' (Managed): Loaded 'D:\usr\src\Alcoa\Projects\Potrod\Software\TinyCLR\AnodeMeter\AnodeMeter\bin\Debug\pe\..\GHIElectronics.TinyCLR.Cryptography.dll'
'GHIElectronics.TinyCLR.VisualStudio.ProjectSystem.dll' (Managed): Loaded 'D:\usr\src\Alcoa\Projects\Potrod\Software\TinyCLR\AnodeMeter\AnodeMeter\bin\Debug\pe\..\GHIElectronics.TinyCLR.Update.dll'
'GHIElectronics.TinyCLR.VisualStudio.ProjectSystem.dll' (Managed): Loaded 'D:\usr\src\Alcoa\Projects\Potrod\Software\TinyCLR\AnodeMeter\AnodeMeter\bin\Debug\pe\..\GHIElectronics.TinyCLR.Devices.I2c.dll'
'GHIElectronics.TinyCLR.VisualStudio.ProjectSystem.dll' (Managed): Loaded 'D:\usr\src\Alcoa\Projects\Potrod\Software\TinyCLR\AnodeMeter\AnodeMeter\bin\Debug\pe\..\GHIElectronics.TinyCLR.Devices.Watchdog.dll'
'GHIElectronics.TinyCLR.VisualStudio.ProjectSystem.dll' (Managed): Loaded 'D:\usr\src\Alcoa\Projects\Potrod\Software\TinyCLR\AnodeMeter\AnodeMeter\bin\Debug\pe\..\GHIElectronics.TinyCLR.Devices.Adc.dll'
'GHIElectronics.TinyCLR.VisualStudio.ProjectSystem.dll' (Managed): Loaded 'D:\usr\src\Alcoa\Projects\Potrod\Software\TinyCLR\AnodeMeter\AnodeMeter\bin\Debug\pe\..\GHIElectronics.TinyCLR.IO.dll'
'GHIElectronics.TinyCLR.VisualStudio.ProjectSystem.dll' (Managed): Loaded 'D:\usr\src\Alcoa\Projects\Potrod\Software\TinyCLR\AnodeMeter\AnodeMeter\bin\Debug\pe\..\GHIElectronics.TinyCLR.IO.TinyFileSystem.dll'
'GHIElectronics.TinyCLR.VisualStudio.ProjectSystem.dll' (Managed): Loaded 'D:\usr\src\Alcoa\Projects\Potrod\Software\TinyCLR\AnodeMeter\AnodeMeter\bin\Debug\pe\..\GHIElectronics.TinyCLR.Data.Xml.dll'
'GHIElectronics.TinyCLR.VisualStudio.ProjectSystem.dll' (Managed): Loaded 'D:\usr\src\Alcoa\Projects\Potrod\Software\TinyCLR\AnodeMeter\AnodeMeter\bin\Debug\pe\..\AnodeMeter.exe', Symbols loaded.