build: replace argument dispatch and retain source-bound verification
Replace argument recovery with direct build targets. Run host, target, board, coverage, Miri and selected Kani checks while retaining source identities, logs and artifacts, including failed attempts. Keep the PID proof diagnostic exception explicit and match its exact identity alongside passing contract assertions and covers. Validation: final-source verification matrix, assembled workflow tests and documentation build.
This commit is contained in:
1 parent
4953f0a974
commit
62b18d5b2e
26 files changed
+2177
-1052
No files matched your search
@@ -5,6 +5,7 @@ Usage:
|
||||
scripts/analyze-fw.py <firmware.elf> <memory.x>
|
||||
"""
|
||||
|
||||
import argparse
|
||||
import json
|
||||
import re
|
||||
from collections import namedtuple
|
||||
@@ -33,7 +34,6 @@ def number(text):
|
||||
|
||||
|
||||
def run(command):
|
||||
"""Run a tool and return stdout."""
|
||||
return subprocess.run(command, check=True, text=True, capture_output=True).stdout
|
||||
|
||||
|
||||
@@ -128,9 +128,8 @@ def merged_span_size(spans):
|
||||
def region_usage(name, layout, section_list, load_segments):
|
||||
"""Return runtime or load-image bytes occupying one linker region.
|
||||
|
||||
Allocated-section VMAs account for runtime RAM, while PT_LOAD physical file
|
||||
spans account for initializers stored in flash (notably a future `.data`).
|
||||
Taking their union avoids counting ordinary flash sections twice.
|
||||
Section VMAs count runtime RAM. PT_LOAD physical spans count flash storage,
|
||||
including RAM initializers. Their union avoids counting flash sections twice.
|
||||
"""
|
||||
spans = [
|
||||
(section.address, section.address + section.size)
|
||||
@@ -260,11 +259,11 @@ def sram_control_flow_errors(section, disassembly):
|
||||
|
||||
|
||||
def main():
|
||||
if len(sys.argv) != 3:
|
||||
raise ValueError(f"usage: {sys.argv[0]} <firmware.elf> <memory.x>")
|
||||
|
||||
elf = Path(sys.argv[1])
|
||||
memory_x = Path(sys.argv[2])
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument("elf", type=Path)
|
||||
parser.add_argument("memory_x", type=Path)
|
||||
args = parser.parse_args()
|
||||
elf, memory_x = args.elf, args.memory_x
|
||||
if not elf.is_file():
|
||||
raise ValueError(f"ELF does not exist: {elf}")
|
||||
if not memory_x.is_file():
|
||||
|
||||
Reference in new issue
Block a user