The intel-hex Reference Manual

This is the intel-hex Reference Manual, version 0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 08 18:25:32 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 intel-hex

A library to handle Intel HEX format.

Author

Masayuki Takagi

License

MIT

Version

0.1

Source

intel-hex.asd.

Child Component

src (module).


3 Modules

Modules are listed depth-first from the system components tree.


3.1 intel-hex/src

Source

intel-hex.asd.

Parent Component

intel-hex (system).

Child Components

4 Files

Files are sorted by type and then listed depth-first from the systems components trees.


4.1 Lisp


4.1.1 intel-hex/intel-hex.asd

Source

intel-hex.asd.

Parent Component

intel-hex (system).

ASDF Systems

intel-hex.

Packages

intel-hex-asd.


4.1.2 intel-hex/src/package.lisp

Source

intel-hex.asd.

Parent Component

src (module).

Packages

intel-hex.


4.1.3 intel-hex/src/write.lisp

Dependency

package.lisp (file).

Source

intel-hex.asd.

Parent Component

src (module).

Public Interface
Internals

4.1.4 intel-hex/src/read.lisp

Dependency

package.lisp (file).

Source

intel-hex.asd.

Parent Component

src (module).

Public Interface
Internals

5 Packages

Packages are listed by definition order.


5.1 intel-hex-asd

Source

intel-hex.asd.

Use List
  • asdf/interface.
  • common-lisp.

5.2 intel-hex

Source

package.lisp.

Use List

common-lisp.

Public Interface
Internals

6 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


6.1 Public Interface


6.1.1 Special variables

Special Variable: *default-chunk-size*

How many octets should go to one hex line.

Package

intel-hex.

Source

write.lisp.


6.1.2 Ordinary functions

Function: read-hex (size &optional stream)
Package

intel-hex.

Source

read.lisp.

Function: read-hex-from-file (size filename)
Package

intel-hex.

Source

read.lisp.

Function: read-hex-from-string (size string)
Package

intel-hex.

Source

read.lisp.

Function: write-hex (offset-and-data &key stream chunk-size vector-size)

OFFSET-AND-DATA is a list of alternating initial addresses and vectors
to be put at the address; as special case, a single vector (assumed to
start at address 0) can be also used.

Example: (0 #(... code ...) #x2007 #(... config ...) #x2100 #(... rom ...))

OPS may contain additional parameters; currently:
- :chunk-size is supported to change size of individual lines,
- :vector-size can be used to store more than one octet data (e.g., Microchip tools use 16bit for their midrange processors, so use 2 here).
Start addresses are multiplied by the factor as well (is this correct behaviour?).

Package

intel-hex.

Source

write.lisp.

Function: write-hex-to-file (offset-and-data file &key chunk-size vector-size if-exists)

Print intel hex representation of one or multiple vectors to FILE.

Parameters are analogous to WRITE-HEX; in addition, IF-EXISTS is passed to OPEN call.

Package

intel-hex.

Source

write.lisp.

Function: write-hex-to-string (offset-and-data &key chunk-size vector-size)

Print intel hex representation of one or multiple vectors to a string.

Parameters are analogous to WRITE-HEX.

Package

intel-hex.

Source

write.lisp.


6.2 Internals


6.2.1 Special variables

Special Variable: *check-sum*
Package

intel-hex.

Source

read.lisp.


6.2.2 Macros

Macro: update-checksum (place octet)

Update value of checksum by a new octet.

Package

intel-hex.

Source

write.lisp.


6.2.3 Ordinary functions

Function: code-to-octets (byte-size-in-octets data)

Convert 16bit or 32 bit vector DATA to twice or four times as long vector of octets.

Package

intel-hex.

Source

write.lisp.

Function: read-newline (stream)
Package

intel-hex.

Source

read.lisp.

Function: read-start-code (stream)
Package

intel-hex.

Source

read.lisp.

Function: read-word16 (stream &optional check-sum-p)
Package

intel-hex.

Source

read.lisp.

Function: read-word8 (stream &optional check-sum-p)
Package

intel-hex.

Source

read.lisp.

Function: verify-check-sum (stream)
Package

intel-hex.

Source

read.lisp.

Function: write-hex-line (out data start type length &optional offset)

Print one line of data in hex format to a stream.

For type 00, LENGTH bytes starting at address START of vector DATA is written as data at address START+OFFSET.

Type 01 is end of file record. The byte count is 00 and the data field
is empty.

Package

intel-hex.

Source

write.lisp.

Function: write-hex-single-vector (data &optional stream offset chunk-size)

Print vector of octets DATA to the output stream STREAM as lines, each having up to CHUNK-SIZE octets. The address in the hex files differs from position in DATA by OFFSET.

Do not print the end-of-file line.

Package

intel-hex.

Source

write.lisp.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   C   F   M   R   U   V   W  
Index Entry  Section

C
code-to-octets: Private ordinary functions

F
Function, code-to-octets: Private ordinary functions
Function, read-hex: Public ordinary functions
Function, read-hex-from-file: Public ordinary functions
Function, read-hex-from-string: Public ordinary functions
Function, read-newline: Private ordinary functions
Function, read-start-code: Private ordinary functions
Function, read-word16: Private ordinary functions
Function, read-word8: Private ordinary functions
Function, verify-check-sum: Private ordinary functions
Function, write-hex: Public ordinary functions
Function, write-hex-line: Private ordinary functions
Function, write-hex-single-vector: Private ordinary functions
Function, write-hex-to-file: Public ordinary functions
Function, write-hex-to-string: Public ordinary functions

M
Macro, update-checksum: Private macros

R
read-hex: Public ordinary functions
read-hex-from-file: Public ordinary functions
read-hex-from-string: Public ordinary functions
read-newline: Private ordinary functions
read-start-code: Private ordinary functions
read-word16: Private ordinary functions
read-word8: Private ordinary functions

U
update-checksum: Private macros

V
verify-check-sum: Private ordinary functions

W
write-hex: Public ordinary functions
write-hex-line: Private ordinary functions
write-hex-single-vector: Private ordinary functions
write-hex-to-file: Public ordinary functions
write-hex-to-string: Public ordinary functions