5
3
Fork
You've already forked bmputil
2

Feature: Intel HEX loader #70

Merged
esden merged 10 commits from feature/ihex-loader into main 2025年12月20日 03:11:53 +01:00

In this PR we address the Intel HEX support that has till now just been a stub that bombs the tool out. This completes the trifecta of formats the tool understands (raw .bin, ELF, ihex) and can use as a data source for the firmware.

This is mostly just for completeness sake as the build system is capable of producing a .hex of the firmware. The preference is still for users to have the tool work with ELF files as they're the most information-complete and robust mechanism available.

In this PR we address the Intel HEX support that has till now just been a stub that bombs the tool out. This completes the trifecta of formats the tool understands (raw .bin, ELF, ihex) and can use as a data source for the firmware. This is mostly just for completeness sake as the build system is capable of producing a .hex of the firmware. The preference is still for users to have the tool work with ELF files as they're the most information-complete and robust mechanism available.
semanticdiff-com[bot] commented 2025年12月18日 06:22:27 +01:00 (Migrated from github.com)
Copy link

Review changes with SemanticDiff

Changed Files
File Status
src/firmware_type.rs 95% smaller
src/firmware_file/mod.rs 81% smaller
src/firmware_file/elf.rs 81% smaller
src/firmware_file/ihex.rs 2% smaller
Review changes with &nbsp;<a href="https://app.semanticdiff.com/gh/blackmagic-debug/bmputil/pull/70/changes"><picture><source media="(prefers-color-scheme: dark)" srcset="https://app.semanticdiff.com/images/github_button.svg?theme=dark&smaller=17"><source media="(prefers-color-scheme: light)" srcset="https://app.semanticdiff.com/images/github_button.svg?theme=light&smaller=17"><img src="https://app.semanticdiff.com/images/github_button.svg?theme=light&smaller=17" align="center" alt="SemanticDiff"></picture></a> <details> <summary>Changed Files</summary> <br/> | File | Status | | :--- | :--- | | [<img src="https://app.semanticdiff.com/static/file-icons/rust.svg" width="20" height="20" align="center">](https://app.semanticdiff.com/gh/blackmagic-debug/bmputil/pull/70/changes#src/firmware_type.rs)&nbsp;&nbsp;[src/firmware\_type\.rs](https://app.semanticdiff.com/gh/blackmagic-debug/bmputil/pull/70/changes#src/firmware_type.rs) | [<img src="https://app.semanticdiff.com/images/progressbar.svg?progress=95">](https://app.semanticdiff.com/gh/blackmagic-debug/bmputil/pull/70/changes#src/firmware_type.rs) &nbsp;95% smaller | | [<img src="https://app.semanticdiff.com/static/file-icons/rust.svg" width="20" height="20" align="center">](https://app.semanticdiff.com/gh/blackmagic-debug/bmputil/pull/70/changes#src/firmware_file/mod.rs)&nbsp;&nbsp;[src/firmware\_file/mod\.rs](https://app.semanticdiff.com/gh/blackmagic-debug/bmputil/pull/70/changes#src/firmware_file/mod.rs) | [<img src="https://app.semanticdiff.com/images/progressbar.svg?progress=81">](https://app.semanticdiff.com/gh/blackmagic-debug/bmputil/pull/70/changes#src/firmware_file/mod.rs) &nbsp;81% smaller | | [<img src="https://app.semanticdiff.com/static/file-icons/rust.svg" width="20" height="20" align="center">](https://app.semanticdiff.com/gh/blackmagic-debug/bmputil/pull/70/changes#src/firmware_file/elf.rs)&nbsp;&nbsp;[src/firmware\_file/elf\.rs](https://app.semanticdiff.com/gh/blackmagic-debug/bmputil/pull/70/changes#src/firmware_file/elf.rs) | [<img src="https://app.semanticdiff.com/images/progressbar.svg?progress=81">](https://app.semanticdiff.com/gh/blackmagic-debug/bmputil/pull/70/changes#src/firmware_file/elf.rs) &nbsp;81% smaller | | [<img src="https://app.semanticdiff.com/static/file-icons/rust.svg" width="20" height="20" align="center">](https://app.semanticdiff.com/gh/blackmagic-debug/bmputil/pull/70/changes#src/firmware_file/ihex.rs)&nbsp;&nbsp;[src/firmware\_file/ihex\.rs](https://app.semanticdiff.com/gh/blackmagic-debug/bmputil/pull/70/changes#src/firmware_file/ihex.rs) | [<img src="https://app.semanticdiff.com/images/progressbar.svg?progress=2">](https://app.semanticdiff.com/gh/blackmagic-debug/bmputil/pull/70/changes#src/firmware_file/ihex.rs) &nbsp;2% smaller | </details>
codecov[bot] commented 2025年12月18日 06:24:59 +01:00 (Migrated from github.com)
Copy link

Codecov Report

Patch coverage is 0% with 181 lines in your changes missing coverage. Please review.
Project coverage is 5.84%. Comparing base (a952aba) to head (46ea365).
⚠️ Report is 10 commits behind head on main.

Files with missing lines Patch % Lines
src/firmware_file/ihex.rs 0.00% 161 Missing ⚠️
src/firmware_file/elf.rs 0.00% 13 Missing ⚠️
src/firmware_type.rs 0.00% 6 Missing ⚠️
src/firmware_file/mod.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@ Coverage Diff @@
## main #70 +/- ##
========================================
- Coverage 6.11% 5.84% -0.28% 
========================================
 Files 29 29 
 Lines 3237 3390 +153 
 Branches 3237 3390 +153 
========================================
 Hits 198 198 
- Misses 3019 3172 +153 
 Partials 20 20 

View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
## [Codecov](https://app.codecov.io/gh/blackmagic-debug/bmputil/pull/70?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=blackmagic-debug) Report :x: Patch coverage is `0%` with `181 lines` in your changes missing coverage. Please review. :white_check_mark: Project coverage is 5.84%. Comparing base ([`a952aba`](https://app.codecov.io/gh/blackmagic-debug/bmputil/commit/a952aba134a512b7cbbeb1bb911251cb71c7e58c?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=blackmagic-debug)) to head ([`46ea365`](https://app.codecov.io/gh/blackmagic-debug/bmputil/commit/46ea3657f0c3d9af14e8e85b2f89055462fd2368?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=blackmagic-debug)). :warning: Report is 10 commits behind head on main. | [Files with missing lines](https://app.codecov.io/gh/blackmagic-debug/bmputil/pull/70?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=blackmagic-debug) | Patch % | Lines | |---|---|---| | [src/firmware\_file/ihex.rs](https://app.codecov.io/gh/blackmagic-debug/bmputil/pull/70?src=pr&el=tree&filepath=src%2Ffirmware_file%2Fihex.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=blackmagic-debug#diff-c3JjL2Zpcm13YXJlX2ZpbGUvaWhleC5ycw==) | 0.00% | [161 Missing :warning: ](https://app.codecov.io/gh/blackmagic-debug/bmputil/pull/70?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=blackmagic-debug) | | [src/firmware\_file/elf.rs](https://app.codecov.io/gh/blackmagic-debug/bmputil/pull/70?src=pr&el=tree&filepath=src%2Ffirmware_file%2Felf.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=blackmagic-debug#diff-c3JjL2Zpcm13YXJlX2ZpbGUvZWxmLnJz) | 0.00% | [13 Missing :warning: ](https://app.codecov.io/gh/blackmagic-debug/bmputil/pull/70?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=blackmagic-debug) | | [src/firmware\_type.rs](https://app.codecov.io/gh/blackmagic-debug/bmputil/pull/70?src=pr&el=tree&filepath=src%2Ffirmware_type.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=blackmagic-debug#diff-c3JjL2Zpcm13YXJlX3R5cGUucnM=) | 0.00% | [6 Missing :warning: ](https://app.codecov.io/gh/blackmagic-debug/bmputil/pull/70?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=blackmagic-debug) | | [src/firmware\_file/mod.rs](https://app.codecov.io/gh/blackmagic-debug/bmputil/pull/70?src=pr&el=tree&filepath=src%2Ffirmware_file%2Fmod.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=blackmagic-debug#diff-c3JjL2Zpcm13YXJlX2ZpbGUvbW9kLnJz) | 0.00% | [1 Missing :warning: ](https://app.codecov.io/gh/blackmagic-debug/bmputil/pull/70?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=blackmagic-debug) | <details><summary>Additional details and impacted files</summary> ```diff @@ Coverage Diff @@ ## main #70 +/- ## ======================================== - Coverage 6.11% 5.84% -0.28% ======================================== Files 29 29 Lines 3237 3390 +153 Branches 3237 3390 +153 ======================================== Hits 198 198 - Misses 3019 3172 +153 Partials 20 20 ``` </details> [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/blackmagic-debug/bmputil/pull/70?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=blackmagic-debug). :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=blackmagic-debug). <details><summary> :rocket: New features to boost your workflow: </summary> - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems. </details>
esden (Migrated from github.com) approved these changes 2025年12月20日 03:11:29 +01:00
esden (Migrated from github.com) left a comment
Copy link

LGTM, merging

As a sidenote, even though we prefer if users use the elf files to update the firmware we will need the support for these formats down the road for other things, so it is definitely not a wasted effort. :D

LGTM, merging As a sidenote, even though we prefer if users use the elf files to update the firmware we will need the support for these formats down the road for other things, so it is definitely not a wasted effort. :D
Author
Owner
Copy link

Agreed, especially with what's planned for the tool's future wrt becoming a more capable BMP-specific replacement for BMDA!

Agreed, especially with what's planned for the tool's future wrt becoming a more capable BMP-specific replacement for BMDA!
Sign in to join this conversation.
No reviewers
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
blackmagic-debug/bmputil!70
Reference in a new issue
blackmagic-debug/bmputil
No description provided.
Delete branch "feature/ihex-loader"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?