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/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:ea2af807-cd66-f103-a60b-788ce25b5dac |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | BF12:3A4A86:33A1E1:463EF4:698E1EA0 |
| html-safe-nonce | d33cc4dcfa628d073a27492d6f2943ab72ad15062da3150805ba6cc4c14d29e4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRjEyOjNBNEE4NjozM0ExRTE6NDYzRUY0OjY5OEUxRUEwIiwidmlzaXRvcl9pZCI6Ijc4MjI0NDk5NDgyOTc2NjYyMDgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 27fe8d183c4362106798cb71631b0cc557a2ea5180fb79a5632eab7c22cd5775 |
| hovercard-subject-tag | pull_request:1636804662 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,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/checks |
| 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 | 7d71262819a4a68a7786924c05495bfd40a7561e4258dd129ba36f53d667639a |
| turbo-cache-control | no-preview |
| 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 full-width-p-0 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 1d904ac995eb43f93014fbdbcc9ae5878653c932 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width