Crate sdrr_fw_parser

Crate sdrr_fw_parser 

Source
Expand description

sdrr-fw-parser

Parses Software Defined Retro ROM (SDRR) firmware.

This is a no_std compatible library, which can be used in both std and no_std environments and can read and extract information from SDRR firmware - either from

  • a binary file
  • an ELF file
  • raw bytes, e.g. from bytes read directly from a device’s flash or RAM

This is used directly within the SDRR repository, by:

  • sdrr-info - PC based tool to analyse SDRR firmware source code

It can also be used by external tools.

Typically used like this:

use sdrr_fw_parser::SdrrInfo;
let sdrr_info = SdrrInfo::from_firmware_bytes(
    SdrrFileType::Elf,
    &sdrr_info, // Reference to sdrr_info_t from firmware file
    &full_fw,   // Reference to full firmware data
    file_size   // Size of the full firmware file in bytes
);

Re-exports§

pub use info::Sdrr;
pub use info::SdrrExtraInfo;
pub use info::SdrrInfo;
pub use info::SdrrPins;
pub use info::SdrrRomInfo;
pub use info::SdrrRomSet;
pub use info::SdrrRuntimeInfo;
pub use lab::LabFlash;
pub use lab::LabParser;
pub use lab::LabRam;
pub use lab::OneRomLab;
pub use types::McuLine;
pub use types::McuStorage;
pub use types::SdrrAddress;
pub use types::SdrrCsSet;
pub use types::SdrrCsState;
pub use types::SdrrLogicalAddress;
pub use types::SdrrMcuPort;
pub use types::SdrrRomType;
pub use types::SdrrServe;
pub use types::Source;

Modules§

info
sdrr-fw-parser
lab
sdrr-fw-parser - One ROM Lab object handling
readers
sdrr-fw-parser
types
sdrr-fw-parser

Structs§

ParseError
Error information for non-fatal parsing failures.
Parser
Parser for Software Defined Retro ROM (SDRR) firmware images.

Constants§

MAX_VERSION_MAJOR
Maximum SDRR firmware versions supported by this version ofsdrr-fw-parser
MAX_VERSION_MINOR
MAX_VERSION_PATCH
SDRR_INFO_FW_OFFSET
Offset from start of the firmware where the SDRR info header is located.
SDRR_RUNTIME_INFO_FW_OFFSET
Offset from the start of RAM where the SDRR runtime info header is located.