Skip to main content

Getting Started with TinyCLR

Install the dev tools, flash firmware to a SITCore board, and deploy your first blinking-LED program over USB. About 15 minutes start to finish.

What is TinyCLR?

TinyCLR is a .NET runtime for embedded products from GHI Electronics. You write C# in Visual Studio or Visual Studio Code (VS Code), deploy and debug over USB, and the same code runs across every SITCore hardware form factor — chipsets, modules, single-board computers, and dev boards. No JTAG, no external programmer, no separate toolchain.

Out of the box: modern C# (generics, async/await, top-level statements), step debugging in your IDE, full peripheral coverage (GPIO, SPI, I²C, UART, networking, displays, file system), security (TLS, secure boot, IP protection, encrypted firmware updates), and cloud SDKs for Azure and AWS. Browse the full features list for the deep dive.

TinyCLR is royalty-free for SITCore customers.

What you'll need

  • A SITCore boardchipset, module, SBC, or Dev Board. New to TinyCLR? The FEZ Flea is the cheapest entry at $14.95 — plug it into USB and you're running. For a structured hands-on path, the Experimenter Kit bundles a FEZ Bit with sensors, a robot, and a companion eBook.
  • A Windows PC with one of:
    • Visual Studio 2026 — any edition works, including the free Community Edition
    • VS Code with the TinyCLR extension
  • A USB cable
note

TinyCLR development requires Windows. Both the Visual Studio and VS Code workflows depend on Windows-only deployment tooling — macOS and Linux aren't supported.

No JTAG probe, no external programmer, no separate toolchain.

How a SITCore board starts up

A SITCore device runs three firmware components in order:

  1. GHI Electronics Bootloader — initializes the chip and hands off to TinyCLR. Hardcoded into the device — can't be changed and never needs to be updated.
  2. TinyCLR firmware — executes your managed code.
  3. Your managed application — the C# program you write.

The LDR pin controls which component runs. Holding LDR low at startup stops the device at the bootloader — that's how you load or update firmware. With LDR high (the default), the device boots into TinyCLR and runs your application.

Two other pins matter at startup:

  • APP — stops the managed application from running.
  • MOD — selects USB or UART for communication with your PC (USB by default).

After startup, all three pins return to default GPIO state and are available as normal GPIO (or peripheral pins) in your application. See Special Pins for the full reference, including which pins to expose on custom PCB designs.

Install or update firmware

Before TinyCLR can run your code, your SITCore device needs the TinyCLR firmware loaded. The firmware includes the Common Language Runtime — it interprets compiled C# IL on the device, manages execution, and lets your IDE deploy and debug over USB.

The firmware update procedure is the same for every SITCore product:

  1. Activate the bootloader — hold the LDR signal low while resetting the board. (Each board's pinout shows the LDR pin location.)
  2. Open the TinyCLR Config tool.
  3. Connect to the device — select the correct COM port and click Connect. If the device doesn't appear, it isn't in loader mode — recheck the LDR pin and reset.
  4. Download the firmware from the Downloads page. Select the file in TinyCLR Config and click Update Firmware.

For manual firmware updates without TinyCLR Config, see the GHI Electronics Bootloader page.

Build your first project

Let's get your IDE set up and the starter running. Pick the IDE you'd rather use — the steps switch to match. After the starter verifies, both IDEs work the same for everything that follows.

Set up and run the starter

  1. Install Visual Studio 2026. Any edition works, including the free Community Edition. During install, check the .NET desktop development workload.

  2. Install the TinyCLR Project System extension. In Visual Studio, go to ExtensionsManage Extensions.... Search for tinyclr, and install TinyCLR OS Project. Restart Visual Studio to finish installation.

  3. Open Visual Studio and select Create a new project.

  4. In the Create a new project window, pick TinyCLROS from the Platforms dropdown.

  5. Pick the TinyCLR Application template, then click Next.

  6. Give the project a name and select a location, then click Create.

  7. Plug your board into USB and hit Start (or press F5). Visual Studio compiles, finds your device, and deploys. (Need to pick the device manually? Use ProjectProperties.) The template's starter code prints an incrementing counter to the Output window — confirming that your dev machine and the SITCore board are talking. Stop the program when you're satisfied.

The steps below work the same in either IDE.

  1. Install the GHIElectronics.TinyCLR.Devices.Gpio and GHIElectronics.TinyCLR.Pins NuGet packages.

  2. Replace Program.cs with:

    using GHIElectronics.TinyCLR.Devices.Gpio;
    using GHIElectronics.TinyCLR.Pins;
    using System.Threading;

    // Adjust the pin for your board. For example:
    // SCM13048Q Dev Board: SC13048.GpioPin.PA8
    // SC20100S Dev Board: SC20100.GpioPin.PE11
    // SCM20260D Dev Board: SC20260.GpioPin.PB0
    var led = GpioController.GetDefault().OpenPin(FEZFlea.GpioPin.Led);
    led.SetDriveMode(GpioPinDriveMode.Output);

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

    led.Write(GpioPinValue.Low);
    Thread.Sleep(100);
    }
  3. Press F5 again. The on-board LED starts blinking.

What's next

You've shipped your first TinyCLR program. From here:

  • Browse features — debugging, security, networking, displays, file system, multithreading, and a lot more.
  • Find your board's pinout and specs in the SITCore Hardware section.
  • Set up firmware updates and device options with TinyCLR Config.