Conversation
AI work (opencode, model big-pickle): - tools/elf-mcp/: JSON-RPC stdio MCP server exposing 9 analysis tools (list_elf_files, binary_size, section_breakdown, memory_map, largest_symbols, per_object_map, verify_no_heap, disassemble, addr2line) over arm-none-eabi binutils and GNU ld .map parsing. - toolchain resolver, pure-text parsers, tool handlers + CLI entry. - 31 pytest host tests (fake runner; no ARM toolchain required). - Registered server in opencode.json; validated against the real M7 demo ELF (flash 0xe0f4 / ram 0x37b20 matches arm-none-eabi-size). - Ran on-host llvm/clang workflows (21/21 tests each) and the cortex-m4/m7 cross workflows; all green. Human work: - .gitignore: ignore transient TODO/PLAN/HANDOFF working files. - CMakePresets.json: drop local DISTCC_DIR env var. - external/CMakeLists.txt: pip install list (mcp-cmake, etc.).
AI work (opencode, big-pickle): removed mcp-cmake, which has no PyPI distribution and broke the CI configure step (pip 'No matching distribution found'). Human work: none for this commit.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #62
What
New
tools/elf-mcp/MCP server (JSON-RPC 2.0 over stdio, mirroring pylink-square-mcp) that turns the ARM GNU binutils and GNU ld link-maps into structured-JSON tools for firmware flash/RAM analysis:list_elf_files— discover firmware ELF/map artifacts under build/binary_size— exact flash/RAM totals with per-section classificationsection_breakdown— verbose readelf -S listing (debug sections too)memory_map— fill % of each linker MEMORY regionlargest_symbols— top-N symbols by size (bloat hunting)per_object_map— per-object flash/RAM from the .map (function-sections + classic formats, discarded-section stripping)verify_no_heap— scan for malloc / operator new / _cxa* / unwinddisassemble— function or address range disassemblyaddr2line— PC -> function + source (pairs with pylink-square-mcp backtraces)Structure
tools/elf-mcp/:mcp_server.py— stdio server; wired intoopencode.jsontools.py— 9 tool handlers + CLI + TOOLS registryparsers.py— pure-text parsers (no subprocesses)toolchain.py— arm-none-eabi binutils resolvertests/— 31 pytest cases, host-runnable without an ARM toolchainValidation
binary_sizeon the M7 demo ELF matchesarm-none-eabi-sizeexactly (flash 0xe0f4 / ram 0x37b20).verify_no_heappasses clean on the demo image.Checks
AI work (opencode, big-pickle): elf-mcp server/parsers/tests, opencode.json registration, all preset runs + validation.
Human work: .gitignore transient-file rules, CMakePresets.json DISTCC_DIR removal, external/CMakeLists.txt pip package list.
on-host-native-llvmworkflow (21/21 tests)on-host-native-clangworkflow (21/21 tests)on-target-cortex-m4-gcc-arm-none-eabiworkflowon-target-cortex-m7-gcc-arm-none-eabiworkflow