Title: Add option/parameters to strip padding from the end of binary data. by fpagliughi · Pull Request #64 · python-intelhex/intelhex · GitHub
Open Graph Title: Add option/parameters to strip padding from the end of binary data. by fpagliughi · Pull Request #64 · python-intelhex/intelhex
X Title: Add option/parameters to strip padding from the end of binary data. by fpagliughi · Pull Request #64 · python-intelhex/intelhex
Description: Sometimes when converting iHex -> binary and you specify a range, it is not because you want to fill that range, but rather because you want to limit the output to (at most) that range. For example, a PIC18F might have 32kB of Flash, but has a few bytes of config memory that loads at address 3M. So when you create a .bin file for it, the 32kB part winds up with a 3MB binary! And, if you're loading the binary through a bootloader, you don't need the config memory anyway. So, you might limit the range to 0x800:0x7FFF (above the bootloader to the end of Flash). But if the app is only 4kB, then >80% of the binary is padding, and sending it to the bootloader taks considerably longer than necessary. This PR adds a strip option to the functions that output to binary, that can tell them to strip off any padding at the end of the binary array. It also adds a --strip option to the hex2bin.py script to pass that option along. This probably isn't an optimal solution, and I assume there's other ways to accomplish the same goal, but this update fit our needs.
Open Graph Description: Sometimes when converting iHex -> binary and you specify a range, it is not because you want to fill that range, but rather because you want to limit the output to (at most) that range. For exam...
X Description: Sometimes when converting iHex -> binary and you specify a range, it is not because you want to fill that range, but rather because you want to limit the output to (at most) that range. For ...
Opengraph URL: https://github.com/python-intelhex/intelhex/pull/64
X: @github
Domain: patch-diff.githubusercontent.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:9b0a6aea-9635-620f-ad44-bad47b022a96 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | ECB2:C1464:3D287:500F1:698E5795 |
| html-safe-nonce | eb1b7451e8a63e1f294a581fbe3d2ec7b3293b9bef9d703a93130ced9196999a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQ0IyOkMxNDY0OjNEMjg3OjUwMEYxOjY5OEU1Nzk1IiwidmlzaXRvcl9pZCI6IjE5Mzc1Mjk0OTA2NzU0ODg2NjEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 17adb264fb27024fa160586264c3299d09d3f8494603b7bce592725f892e1064 |
| hovercard-subject-tag | pull_request:1636804662 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python-intelhex/intelhex/pull/64/files |
| twitter:image | https://avatars.githubusercontent.com/u/4303121?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/4303121?s=400&v=4 |
| og:image:alt | Sometimes when converting iHex -> binary and you specify a range, it is not because you want to fill that range, but rather because you want to limit the output to (at most) that range. For exam... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 0e08b85f0035d49bc4c22868f70a4d30fb8c2a777936895c37e78df095242ddc |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/python-intelhex/intelhex git https://github.com/python-intelhex/intelhex.git |
| octolytics-dimension-user_id | 55888006 |
| octolytics-dimension-user_login | python-intelhex |
| octolytics-dimension-repository_id | 33128473 |
| octolytics-dimension-repository_nwo | python-intelhex/intelhex |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 33128473 |
| octolytics-dimension-repository_network_root_nwo | python-intelhex/intelhex |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9416d07f3607b074b276ccc81546278f89608a08 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width