{"id":24739476,"url":"https://github.com/bang-olufsen/dfusepp","last_synced_at":"2025-03-22T18:46:56.711Z","repository":{"id":53971850,"uuid":"346075721","full_name":"bang-olufsen/dfusepp","owner":"bang-olufsen","description":"A C++11 header-only library for validating DfuSe files on embedded devices","archived":false,"fork":false,"pushed_at":"2021-11-25T09:19:49.000Z","size":39,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-01-27T22:58:30.347Z","etag":null,"topics":["cpp","cpp11","dfu","dfuse","embedded","header-only"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bang-olufsen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-09T16:44:34.000Z","updated_at":"2021-11-24T15:04:32.000Z","dependencies_parsed_at":"2022-08-13T05:21:04.679Z","dependency_job_id":null,"html_url":"https://github.com/bang-olufsen/dfusepp","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bang-olufsen%2Fdfusepp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bang-olufsen%2Fdfusepp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bang-olufsen%2Fdfusepp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bang-olufsen%2Fdfusepp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bang-olufsen","download_url":"https://codeload.github.com/bang-olufsen/dfusepp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245007167,"owners_count":20546142,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","cpp11","dfu","dfuse","embedded","header-only"],"created_at":"2025-01-27T22:58:46.516Z","updated_at":"2025-03-22T18:46:56.403Z","avatar_url":"https://github.com/bang-olufsen.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dfusepp\n\n[![build](https://github.com/bang-olufsen/dfusepp/actions/workflows/build.yml/badge.svg)](https://github.com/bang-olufsen/dfusepp/actions/workflows/build.yml)\n[![coverage](https://coveralls.io/repos/github/bang-olufsen/dfusepp/badge.svg?branch=main)](https://coveralls.io/github/bang-olufsen/dfusepp?branch=main)\n[![lgtm](https://img.shields.io/lgtm/alerts/g/bang-olufsen/dfusepp.svg?logo=lgtm\u0026logoWidth=18)](https://lgtm.com/projects/g/bang-olufsen/dfusepp/alerts/)\n[![codefactor](https://www.codefactor.io/repository/github/bang-olufsen/dfusepp/badge)](https://www.codefactor.io/repository/github/bang-olufsen/dfusepp)\n[![license](https://img.shields.io/badge/license-MIT_License-blue.svg?style=flat)](LICENSE)\n\nA C++11 header-only library for validating [DfuSe](http://rc.fdr.hu/UM0391.pdf) files on embedded devices.\n\nThis library is made for validating DfuSe files without having to save the complete image in RAM. Instead only the offsets to the images are saved for easier extract and copy to e.g. Flash. DfuSe images can be generated using [dfuse-tool](https://github.com/bang-olufsen/dfuse-tool).\n\nBy defining `DFUSEPP_IMAGE_ELEMENT_VERSION` it is possible to attach a 4 byte version header (1 byte major, 1 byte minor and 2 bytes patch version) to the image elements. This can be useful if several images are to be included and you want to be able to readout the version and save the additional overhead of the 274 bytes Target Prefix per image. The [dfuse-tool](https://github.com/bang-olufsen/dfuse-tool) also only works with a single DFU image with multiple image elements.\n\n## Usage\n\nData is added to Dfusepp using the `addData` function. This function can be called multiple times e.g. when reading a file to limit the amount of RAM required. For more usage examples please see the [unit tests](https://github.com/bang-olufsen/dfusepp/blob/main/test/src/TestDfusepp.cpp).\n\n```cpp\n#include \u003carray\u003e\n#include \u003cvector\u003e\n#include \u003cDfusepp.h\u003e\n\nint main()\n{\n    Dfusepp::Dfusepp dfusepp;\n    std::array\u003cuint8_t, 1024\u003e dfuImage { ... };\n\n    dfusepp.addData(dfuImage.data(), 0, dfuImage.size());\n    if (dfusepp.valid()) {\n        std::vector\u003cDfusepp::ImageElement\u003e images = dfusepp.images();\n        ...\n    }\n}\n```\n\n## Limitations\n\n* Only support a single image with multiple image elements\n* Only support little endian targets due to current unions used\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbang-olufsen%2Fdfusepp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbang-olufsen%2Fdfusepp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbang-olufsen%2Fdfusepp/lists"}