flash

package
v1.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2026 License: Apache-2.0 Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FlashDevice

func FlashDevice(device Device, envMap map[string]string, port string, verbose bool) error

FlashDevice flashes firmware to a device based on the device configuration

func GetPort

func GetPort(portFlag string, usbInterfaces []string) (string, error)

From tinygo/main.go getDefaultPort GetPort returns the default serial port depending on the operating system and USB interfaces.

Types

type Device

type Device struct {
	Serial     string   // Serial communication settings
	SerialPort []string // Available serial ports
	Flash      Flash    // Flash configuration for device programming
	MSD        MSD      // Mass Storage Device configuration
	OpenOCD    OpenOCD  // OpenOCD configuration for debugging/flashing
}

Device contains all flashing/debugging configuration for a device

type Flash

type Flash struct {
	Method            string // Flash method: "command", "openocd", "msd", "bmp"
	Command           string // Flash command template
	Flash1200BpsReset bool   // Whether to use 1200bps reset
}

Flash contains configuration for device flashing

type MSD

type MSD struct {
	VolumeName   []string // Names of the volumes
	FirmwareName string   // Firmware file name pattern
}

MSD contains configuration for Mass Storage Device flashing

type OpenOCD

type OpenOCD struct {
	Interface string // Interface configuration (e.g., "stlink")
	Transport string // Transport protocol (e.g., "swd", "jtag")
	Target    string // Target configuration (e.g., "stm32f4x")
}

OpenOCD contains configuration for OpenOCD debugging/flashing

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL