FEZ Bit & Portal - no code execution, blank screens

I have FEZ Bits and a FEZ Portal that has been upgraded to firmware: 2.2.0.4000

All three I can connect to, Ping with TinyCLRConfig, however, no VS2019, or VS2022 C# TinyCLR applications will execute, after successful build and deploy.

Exits with “the debugging target is not in an initialized state”.

I have reloaded the firmware three (3) times on each, reset, tried different USB ports, with no success. The screens are just blank white; see image…

Sorry to hear that,

Can you make a simple project and load into the device?
If still doesn’t work, send us that project and take a screenshot of the screen where you see " “the debugging target is not in an initialized state”. We would like to see more information.

And, do these devices work before?

Updating to firmware 2.2.0 requires update nugets as well, did you do that?

  • Worked fine when I took out of the antistatic wrap - first time. Required an update to latest firmware to work with VS2022; firmware successful, build of the Blinky project, deployed and worked fine.

  • Started a new project to use the Display on the FEZ Bit, installed and updated all NUGET packages. Build successful, deploy successful, screen went blank and since that time no success. Tried 2nd FEZ Bit, went straight to display app, same issue.

Created a version of BLINKY on VS2019 for FEZ Portal, build and deploy successful, screen went blank and now the same issue.

  • Reflashed all three firmware, and tried Blinky again on all three boards, same situation.

Here is the code: for FEZ Bit, only used BLINKY on FEZ Portal

using System.Collections;
using System.Diagnostics;
using System.Text;
using System.Threading;
using System.Drawing;
using System.Drawing.Imaging;

using GHIElectronics.TinyCLR.Devices.Gpio;
using GHIElectronics.TinyCLR.Pins;
using GHIElectronics.TinyCLR.Drivers.Sitronix.ST7735;
using GHIElectronics.TinyCLR.Devices.Display;
using GHIElectronics.TinyCLR.Devices.I2c;
using GHIElectronics.TinyCLR.Devices.Spi;
using GHIElectronics.TinyCLR.Native;
using GHIElectronics.TinyCLR;



namespace TinyCLRApplication2
{
    internal class Program
    {
        
        static void Main()
        {
            //Use "SC20100.GpioPin.PE11" on SC20100S Dev Board.
            //Use "SC20260.GpioPin.PB0" on SCM20260D Dev Board.
            var LED = GpioController.GetDefault().OpenPin(SC20100.GpioPin.PB0);
            LED.SetDriveMode(GpioPinDriveMode.Output);

            var displayController = DisplayController.GetDefault();

            // Enter the proper display configurations
            displayController.SetConfiguration(new ParallelDisplayControllerSettings
            {
                Width = 480,
                Height = 272,
                DataFormat = DisplayDataFormat.Rgb565,
                Orientation = DisplayOrientation.Degrees0, //Rotate display.
                PixelClockRate = 10000000,
                PixelPolarity = false,
                DataEnablePolarity = false,
                DataEnableIsFixed = false,
                HorizontalFrontPorch = 2,
                HorizontalBackPorch = 2,
                HorizontalSyncPulseWidth = 41,
                HorizontalSyncPolarity = false,
                VerticalFrontPorch = 2,
                VerticalBackPorch = 2,
                VerticalSyncPulseWidth = 10,
                VerticalSyncPolarity = false,
            });
            displayController.Enable(); //This line turns on the display I/O and starts
                                        //  refreshing the display. Native displays are
                                        //  continually refreshed automatically after this
                                        //  command is executed.

            var screen = Graphics.FromHdc(displayController.Hdc);
            var image = Resource1.GetBitmap(Resource1.BitmapResources.Synapse_Logo);
            var font = Resource1.GetFont(Resource1.FontResources.arial);
            screen.FillEllipse(new SolidBrush(System.Drawing.Color.FromArgb(255, 255, 0, 0)), 0, 0, 80, 64);

          
            screen.Clear();
            screen.DrawString("Hello world!", font, new SolidBrush(Color.Blue), 210, 255);

            screen.Flush();


            while (true)
            {
                
                LED.Write(GpioPinValue.High);
                Thread.Sleep(100);

                LED.Write(GpioPinValue.Low);
                Thread.Sleep(100);
            }
        }
    }
}

Build started…
========== Build: 0 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========

Assembly: TinyCLRApplication2019 (1.0.0.0) Resolving.

The debugging target runtime is loading the application assemblies and starting execution.
Ready.

‘GHIElectronics.TinyCLR.VisualStudio.ProjectSystem.dll’ (Managed): Loaded ‘GHIElectronics.TinyCLR.Native’
‘GHIElectronics.TinyCLR.VisualStudio.ProjectSystem.dll’ (Managed): Loaded ‘GHIElectronics.TinyCLR.Devices.Gpio’
‘GHIElectronics.TinyCLR.VisualStudio.ProjectSystem.dll’ (Managed): Loaded ‘TinyCLRApplication2019’
The thread ‘’ (0x2) has exited with code 0 (0x0).
The program ‘[8] TinyCLR application: Managed’ has exited with code 0 (0x0).

Just built the Demo Apps for the FEZ Portal on VS2019 to see if those will load and execute with UI. Again, BUILD, DEPLOY successful, blank white screen - either debug, or release.

Build:
Build started…
1>------ Build started: Project: Demos, Configuration: Release Any CPU ------
1>C:\Users\msver\OneDrive\AppDev\00.1-AppProjects\TinyCLR-Samples-master\Official Demos\FEZ Portal\Windows\Usb.cs(46,42,46,59): warning CS0169: The field ‘UsbWindow.usbHostController’ is never used
1>C:\Users\msver\OneDrive\AppDev\00.1-AppProjects\TinyCLR-Samples-master\Official Demos\FEZ Portal\Windows\BasicTestWindow.cs(50,22,50,37): warning CS0414: The field ‘BasicTestWindow.ethernetConnect’ is assigned but its value is never used
1> Demos → C:\Users\msver\OneDrive\AppDev\00.1-AppProjects\TinyCLR-Samples-master\Official Demos\FEZ Portal\bin\Release\Demos.exe
2>------ Deploy started: Project: Demos, Configuration: Release Any CPU ------
2>------ Deploy started: Project: Demos, Configuration: Release Any CPU ------
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 1 succeeded, 0 failed, 0 skipped ==========

TinyCLR Device Deployment:
Looking for a device on transport ‘USB’.
Found device port ‘USB’ with ID ‘2300a9c8-6556-41a3-9f0f-05ca6df212ff’ for transport ‘Usb’.
Starting device deployment.
Attempting to connect to device ‘USB:SC20260’: iteration 0.
Opening port ‘\?\usb#vid_1b9f&pid_5010#5&38e97a59&0&1#{c13bcfe9-5e84-4187-9baa-45597ffcbb6f}’.
Attaching debugger engine.
Debugger engine attached.
Generating device specific assemblies.
- Demos v1.0.0.0 with size 125,864 bytes at ‘C:\Users\msver\OneDrive\AppDev\00.1-AppProjects\TinyCLR-Samples-master\Official Demos\FEZ Portal\bin\Release\pe\Demos.pe’.
- mscorlib v2.2.0.4000 with size 72,428 bytes at ‘C:\Users\msver\OneDrive\AppDev\00.1-AppProjects\TinyCLR-Samples-master\Official Demos\FEZ Portal\bin\Release\pe\mscorlib.pe’.
- GHIElectronics.TinyCLR.Cryptography v2.2.0.4000 with size 7,980 bytes at ‘C:\Users\msver\OneDrive\AppDev\00.1-AppProjects\TinyCLR-Samples-master\Official Demos\FEZ Portal\bin\Release\pe\GHIElectronics.TinyCLR.Cryptography.pe’.
- GHIElectronics.TinyCLR.Devices.Adc v2.2.0.4000 with size 2,612 bytes at ‘C:\Users\msver\OneDrive\AppDev\00.1-AppProjects\TinyCLR-Samples-master\Official Demos\FEZ Portal\bin\Release\pe\GHIElectronics.TinyCLR.Devices.Adc.pe’.
- GHIElectronics.TinyCLR.Devices.Can v2.2.0.4000 with size 8,864 bytes at ‘C:\Users\msver\OneDrive\AppDev\00.1-AppProjects\TinyCLR-Samples-master\Official Demos\FEZ Portal\bin\Release\pe\GHIElectronics.TinyCLR.Devices.Can.pe’.
- GHIElectronics.TinyCLR.Devices.Dac v2.2.0.4000 with size 2,228 bytes at ‘C:\Users\msver\OneDrive\AppDev\00.1-AppProjects\TinyCLR-Samples-master\Official Demos\FEZ Portal\bin\Release\pe\GHIElectronics.TinyCLR.Devices.Dac.pe’.
- GHIElectronics.TinyCLR.Devices.Display v2.2.0.4000 with size 4,972 bytes at ‘C:\Users\msver\OneDrive\AppDev\00.1-AppProjects\TinyCLR-Samples-master\Official Demos\FEZ Portal\bin\Release\pe\GHIElectronics.TinyCLR.Devices.Display.pe’.
- GHIElectronics.TinyCLR.Devices.Gpio v2.2.0.4000 with size 4,828 bytes at ‘C:\Users\msver\OneDrive\AppDev\00.1-AppProjects\TinyCLR-Samples-master\Official Demos\FEZ Portal\bin\Release\pe\GHIElectronics.TinyCLR.Devices.Gpio.pe’.
- GHIElectronics.TinyCLR.Devices.I2c v2.2.0.4000 with size 5,644 bytes at ‘C:\Users\msver\OneDrive\AppDev\00.1-AppProjects\TinyCLR-Samples-master\Official Demos\FEZ Portal\bin\Release\pe\GHIElectronics.TinyCLR.Devices.I2c.pe’.
- GHIElectronics.TinyCLR.Devices.Network v2.2.0.4000 with size 19,076 bytes at ‘C:\Users\msver\OneDrive\AppDev\00.1-AppProjects\TinyCLR-Samples-master\Official Demos\FEZ Portal\bin\Release\pe\GHIElectronics.TinyCLR.Devices.Network.pe’.
- GHIElectronics.TinyCLR.Devices.Pwm v2.2.0.4000 with size 3,012 bytes at ‘C:\Users\msver\OneDrive\AppDev\00.1-AppProjects\TinyCLR-Samples-master\Official Demos\FEZ Portal\bin\Release\pe\GHIElectronics.TinyCLR.Devices.Pwm.pe’.
- GHIElectronics.TinyCLR.Devices.Rtc v2.2.0.4000 with size 3,316 bytes at ‘C:\Users\msver\OneDrive\AppDev\00.1-AppProjects\TinyCLR-Samples-master\Official Demos\FEZ Portal\bin\Release\pe\GHIElectronics.TinyCLR.Devices.Rtc.pe’.
- GHIElectronics.TinyCLR.Devices.Spi v2.2.0.4000 with size 6,284 bytes at ‘C:\Users\msver\OneDrive\AppDev\00.1-AppProjects\TinyCLR-Samples-master\Official Demos\FEZ Portal\bin\Release\pe\GHIElectronics.TinyCLR.Devices.Spi.pe’.
- GHIElectronics.TinyCLR.Devices.Storage v2.2.0.4000 with size 3,432 bytes at ‘C:\Users\msver\OneDrive\AppDev\00.1-AppProjects\TinyCLR-Samples-master\Official Demos\FEZ Portal\bin\Release\pe\GHIElectronics.TinyCLR.Devices.Storage.pe’.
- GHIElectronics.TinyCLR.Devices.Uart v2.2.0.4000 with size 8,012 bytes at ‘C:\Users\msver\OneDrive\AppDev\00.1-AppProjects\TinyCLR-Samples-master\Official Demos\FEZ Portal\bin\Release\pe\GHIElectronics.TinyCLR.Devices.Uart.pe’.
- GHIElectronics.TinyCLR.Devices.Usb v2.2.0.4000 with size 1,156 bytes at ‘C:\Users\msver\OneDrive\AppDev\00.1-AppProjects\TinyCLR-Samples-master\Official Demos\FEZ Portal\bin\Release\pe\GHIElectronics.TinyCLR.Devices.Usb.pe’.
- GHIElectronics.TinyCLR.Devices.UsbHost v2.2.0.4000 with size 21,400 bytes at ‘C:\Users\msver\OneDrive\AppDev\00.1-AppProjects\TinyCLR-Samples-master\Official Demos\FEZ Portal\bin\Release\pe\GHIElectronics.TinyCLR.Devices.UsbHost.pe’.
- GHIElectronics.TinyCLR.Drawing v2.2.0.4000 with size 17,776 bytes at ‘C:\Users\msver\OneDrive\AppDev\00.1-AppProjects\TinyCLR-Samples-master\Official Demos\FEZ Portal\bin\Release\pe\GHIElectronics.TinyCLR.Drawing.pe’.
- GHIElectronics.TinyCLR.Drivers.FocalTech.FT5xx6 v2.2.0.4000 with size 3,720 bytes at ‘C:\Users\msver\OneDrive\AppDev\00.1-AppProjects\TinyCLR-Samples-master\Official Demos\FEZ Portal\bin\Release\pe\GHIElectronics.TinyCLR.Drivers.FocalTech.FT5xx6.pe’.
- GHIElectronics.TinyCLR.Drivers.Microchip.Winc15x0 v2.2.0.4000 with size 1,732 bytes at ‘C:\Users\msver\OneDrive\AppDev\00.1-AppProjects\TinyCLR-Samples-master\Official Demos\FEZ Portal\bin\Release\pe\GHIElectronics.TinyCLR.Drivers.Microchip.Winc15x0.pe’.
- GHIElectronics.TinyCLR.IO v2.2.0.4000 with size 21,052 bytes at ‘C:\Users\msver\OneDrive\AppDev\00.1-AppProjects\TinyCLR-Samples-master\Official Demos\FEZ Portal\bin\Release\pe\GHIElectronics.TinyCLR.IO.pe’.
- GHIElectronics.TinyCLR.Native v2.2.0.4000 with size 6,156 bytes at ‘C:\Users\msver\OneDrive\AppDev\00.1-AppProjects\TinyCLR-Samples-master\Official Demos\FEZ Portal\bin\Release\pe\GHIElectronics.TinyCLR.Native.pe’.
- GHIElectronics.TinyCLR.Networking v2.2.0.4000 with size 12,600 bytes at ‘C:\Users\msver\OneDrive\AppDev\00.1-AppProjects\TinyCLR-Samples-master\Official Demos\FEZ Portal\bin\Release\pe\GHIElectronics.TinyCLR.Networking.pe’.
- GHIElectronics.TinyCLR.UI v2.2.0.4000 with size 166,232 bytes at ‘C:\Users\msver\OneDrive\AppDev\00.1-AppProjects\TinyCLR-Samples-master\Official Demos\FEZ Portal\bin\Release\pe\GHIElectronics.TinyCLR.UI.pe’.
Total deployment size is 530,376 bytes.
Incrementally deploying assemblies to the device:
Allocating assemblies:
- Address: 0x08140000 => GHIElectronics.TinyCLR.UI
- Address: 0x08168958 => Demos
- Address: 0x08187500 => mscorlib
- Address: 0x08198FEC => GHIElectronics.TinyCLR.Devices.UsbHost
- Address: 0x0819E384 => GHIElectronics.TinyCLR.IO
- Address: 0x081A35C0 => GHIElectronics.TinyCLR.Devices.Network
- Address: 0x081A8044 => GHIElectronics.TinyCLR.Drawing
- Address: 0x081AC5B4 => GHIElectronics.TinyCLR.Networking
- Address: 0x081AF6EC => GHIElectronics.TinyCLR.Devices.Can
- Address: 0x081B198C => GHIElectronics.TinyCLR.Devices.Uart
- Address: 0x081B38D8 => GHIElectronics.TinyCLR.Cryptography
- Address: 0x081B5804 => GHIElectronics.TinyCLR.Devices.Spi
- Address: 0x081B7090 => GHIElectronics.TinyCLR.Native
- Address: 0x081B889C => GHIElectronics.TinyCLR.Devices.I2c
- Address: 0x081B9EA8 => GHIElectronics.TinyCLR.Devices.Display
- Address: 0x081BB214 => GHIElectronics.TinyCLR.Devices.Gpio
- Address: 0x081BC4F0 => GHIElectronics.TinyCLR.Drivers.FocalTech.FT5xx6
- Address: 0x081BD378 => GHIElectronics.TinyCLR.Devices.Storage
- Address: 0x081BE0E0 => GHIElectronics.TinyCLR.Devices.Rtc
- Address: 0x081BEDD4 => GHIElectronics.TinyCLR.Devices.Pwm
- Address: 0x081C0000 => GHIElectronics.TinyCLR.Devices.Adc
- Address: 0x081C0A34 => GHIElectronics.TinyCLR.Devices.Dac
- Address: 0x081C12E8 => GHIElectronics.TinyCLR.Drivers.Microchip.Winc15x0
- Address: 0x081BF998 => GHIElectronics.TinyCLR.Devices.Usb
Deploying assemblies:
All assemblies on the device are up to date. No deployment was necessary.
Restarting interpreter.
Attaching to device.
Waiting for device to initialize.

Hi,

Zip this and send to us please!

We will check when back to office tomorrow.

Thank you!

And I don’t think it build succeeded.

Send me your simple project. I tried your code, look work fine to me. So I need your project to see the configuration.

This is yours I just ran, and use VS2022

Demo App on Portal also work well on VS2019 and VS2022. Just tested, no screen to check but deploy and debug setp in code just fine.

I am not sure how it worked before on FEZBit. The code you show is 480x272 and Fezbit is N18 which is different display.

More clear questions, easier to help.

The ebook on this page should be a great way to get started SITCore Experiment – GHI Electronics it covers FEZ Bit.

1 Like

Thank you Dat_Tran and Gus_Issa. Started from scratch in VS2022, separate Clean, Build and Deploy - everything works now across all three devices. RESOLVED!

2 Likes