Documentation ¶
Overview ¶
Package sdp provide helpers for implementing the Serial Download Protocol (SDP), used on NXP i.MX System-on-Chip (SoC) application processors.
Index ¶
- Constants
- func BuildDCDWriteReport(dcd []byte, addr uint32) (r1 []byte, r2 []byte)
- func BuildFileWriteReport(imx []byte, addr uint32) (r1 []byte, r2 [][]byte)
- func BuildJumpAddressReport(addr uint32) (r1 []byte)
- func BuildReadRegisterReport(addr uint32, size uint32) (r1 []byte)
- func ParseDCD(imx []byte, ivt *IVT) (dcd []byte, err error)
- type DCDHeader
- type IVT
- type SDP
Constants ¶
const ( TagIVT = 0xd1 TagDCD = 0xd2 )
Program image tags (p309, 8.7 Program image, IMX6ULLRM).
const ( // write command tag WriteData = 0xcc // DCD pointer offset within IVT DCDOffset = 12 // maximum DCD size DCDSize = 1768 )
DCD constants (p312, 8.7.2 Device Configuration Data (DCD), IMX6ULLRM).
const ( ReadRegister = 0x0101 WriteFile = 0x0404 DCDWrite = 0x0a0a JumpAddress = 0x0b0b SkipDCDHeader = 0x0c0c )
SDP command types (p322, 8.9.3 Serial Download Protocol (SDP), IMX6ULLRM).
const HIDReportSize = 1024
Variables ¶
This section is empty.
Functions ¶
func BuildDCDWriteReport ¶
BuildDCDWriteReport generates USB HID reports (IDs 1 and 2) that implement the SDP DCD_WRITE command sequence, used to load a DCD binary payload (p327, 8.9.3.1.5 DCD_WRITE, IMX6ULLRM).
func BuildFileWriteReport ¶
BuildFileWriteReport generates USB HID reports (IDs1 and 2) that implement the SDP FILE_WRITE command sequence, used to load an imx binary payload (p325, 8.9.3.1.3 FILE_WRITE, IMX6ULLRM).
func BuildJumpAddressReport ¶
BuildJumpAddressReport generates the USB HID report (ID 1) that implements the SDP JUMP_ADDRESS command, used to execute an imx binary payload (p328, 8.9.3.1.7 JUMP_ADDRESS, IMX6ULLRM).
func BuildReadRegisterReport ¶
BuildReadRegisterReport generates USB HID reports (ID 1) that implement the SDP READ_REGISTER command for reading a single 32-bit device register value (p323, 8.9.3.1.1 READ_REGISTER, IMX6ULLRM).
Types ¶
type DCDHeader ¶
DCDHeader represents a DCD header (p312, 8.7.2 Device Configuration Data (DCD), IMX6ULLRM).
type IVT ¶
type IVT struct { Tag uint8 Length uint16 Version uint8 Entry uint32 DCD uint32 BootData uint32 Self uint32 CSF uint32 // contains filtered or unexported fields }
IVT represents an IVT entry (p311, 8.7.1.1 Image vector table structure, IMX6ULLRM).