Documentation ¶
Index ¶
- Constants
- func CloseUSB()
- func InitUsb() error
- func SetLogger(loggerInstance *logrus.Logger)
- type Buffer
- type Endian
- type MemoryBlockSize
- type RttDataCb
- type StLink
- func (h *StLink) Close()
- func (h *StLink) ConfigTrace(enabled bool, tpiuProtocol TpuiPinProtocolType, portSize uint32, ...) error
- func (h *StLink) GetIdCode() (uint32, error)
- func (h *StLink) GetTargetVoltage() (float32, error)
- func (h *StLink) InitializeRtt(rttSearchRanges [][2]uint64) error
- func (h *StLink) PollTrace(buffer []byte, size *uint32) error
- func (h *StLink) ReadMem(addr uint32, bitLength MemoryBlockSize, count uint32, buffer *bytes.Buffer) error
- func (h *StLink) ReadRttChannels(callback RttDataCb) error
- func (h *StLink) Reset()
- func (h *StLink) SetSpeed(khz uint32, query bool) (uint32, error)
- func (h *StLink) UpdateRttChannels(readChannelNames bool) error
- func (h *StLink) WriteMem(address uint32, bitLength MemoryBlockSize, count uint32, buffer []byte) error
- type StLinkInterfaceConfig
- type StLinkMode
- type StmCpuInfo
- type TpuiPinProtocolType
- type TraceConfigType
Constants ¶
View Source
const ( StLinkModeUnknown StLinkMode = 0 StLinkModeDfu = 1 StLinkModeMass = 2 StLinkModeDebugJtag = 3 StLinkModeDebugSwd = 4 StLinkModeDebugSwim = 5 )
View Source
const ( Memory8BitBlock MemoryBlockSize = 1 Memory16BitBlock = 2 Memory32BitBlock = 4 )
View Source
const ( SeggerRttModeNoBlockSkip seggerRttMode = 0 SeggerRttModeNoBlockTrim = 1 SeggerRttModeBlockIfFifoFull = 2 )
View Source
const ( TraceConfigTypeDisabled TraceConfigType = 0 // tracing is disabled TraceConfigTypeExternal = 1 // trace output is captured externally TraceConfigTypeInternal = 2 // trace output is handled by OpenOCD adapter driver )
View Source
const ( TpuiPinProtocolSync TpuiPinProtocolType = 0 // synchronous trace output TpuiPinProtocolAsynManchester = 1 // asynchronous output with Manchester coding TpuiPinProtocolAsyncUart = 2 // asynchronous output with NRZ coding )
View Source
const AllSupportedPIds = 0xFFFF
View Source
const AllSupportedVIds = 0xFFFF
View Source
const (
DefaultRamStart = 0x20000000
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Buffer ¶
func (*Buffer) ReadUint16BE ¶
func (*Buffer) ReadUint16LE ¶
func (*Buffer) ReadUint32BE ¶
func (*Buffer) ReadUint32LE ¶
func (*Buffer) WriteUint16LE ¶
func (*Buffer) WriteUint32LE ¶
type MemoryBlockSize ¶
type MemoryBlockSize int // block size for read and write operations
type StLink ¶
type StLink struct {
// contains filtered or unexported fields
}
*
func NewStLink ¶
func NewStLink(config *StLinkInterfaceConfig) (*StLink, error)
func (*StLink) ConfigTrace ¶
func (*StLink) GetTargetVoltage ¶
func (*StLink) InitializeRtt ¶
func (*StLink) ReadRttChannels ¶
func (*StLink) UpdateRttChannels ¶
type StLinkInterfaceConfig ¶
type StLinkInterfaceConfig struct {
// contains filtered or unexported fields
}
func NewStLinkConfig ¶
func NewStLinkConfig(vid gousb.ID, pid gousb.ID, mode StLinkMode, serial string, initialSpeed uint32, connectUnderReset bool) *StLinkInterfaceConfig
type StLinkMode ¶
type StLinkMode uint8 // stlink debug modes
type StmCpuInfo ¶
func GetCpuInformation ¶
func GetCpuInformation(cpuId string) *StmCpuInfo
type TpuiPinProtocolType ¶
type TpuiPinProtocolType int
type TraceConfigType ¶
type TraceConfigType int
Source Files ¶
Click to show internal directories.
Click to hide internal directories.