Srex is a library for parsing SRec files.
use std::{fs, str::FromStr};
use srex::srecord::SRecordFile;
let srecord_str = fs::read_to_string("path/to/file.s37").unwrap();
let srecord_file = SRecordFile::from_str(&srecord_str).unwrap();
// Get data at address 0x123
let x: u8 = srecord_file[0x123];
println!("Data at address 0x123: {x}");