semihosting

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2020 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package semihosting implements parts of the ARM semihosting specification, for communicating over a debug connection.

If you want to use it in OpenOCD, you have to enable it first with the following command:

arm semihosting enable

Index

Constants

This section is empty.

Variables

View Source
var (
	Stdin  = File{/* contains filtered or unexported fields */}
	Stdout = File{/* contains filtered or unexported fields */}
	Stderr = File{/* contains filtered or unexported fields */}
)

These three file descriptors are connected to the host stdin/stdout/stderr, and can be used for logging.

Functions

func Write

func Write(fd uintptr, data []byte) error

Write writes the given data to the given file descriptor. It returns an *IOError if the write was not successful.

Types

type File

type File struct {
	// contains filtered or unexported fields
}

File represents a semihosting file descriptor.

func (*File) Write

func (f *File) Write(buf []byte) error

Write writes the given data buffer to the file descriptor, returning an error if the write could not complete successfully.

type IOError

type IOError struct {
	BytesWritten int
}

IOError is returned by I/O operations when they fail.

func (*IOError) Error

func (e *IOError) Error() string

Jump to

Keyboard shortcuts

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