{"id":25026113,"url":"https://github.com/nicolasbauw/bin2source","last_synced_at":"2025-08-08T21:05:39.229Z","repository":{"id":110284821,"uuid":"297689583","full_name":"nicolasbauw/bin2source","owner":"nicolasbauw","description":"Command line utility to create a C const array from a file.","archived":false,"fork":false,"pushed_at":"2021-06-03T12:43:43.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-30T15:47:33.605Z","etag":null,"topics":["amiga","binary","byte-array","c","const-array","incbin","source"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nicolasbauw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-22T15:20:07.000Z","updated_at":"2021-06-03T12:43:46.000Z","dependencies_parsed_at":"2023-03-16T04:00:28.948Z","dependency_job_id":null,"html_url":"https://github.com/nicolasbauw/bin2source","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/nicolasbauw/bin2source","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicolasbauw%2Fbin2source","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicolasbauw%2Fbin2source/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicolasbauw%2Fbin2source/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicolasbauw%2Fbin2source/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nicolasbauw","download_url":"https://codeload.github.com/nicolasbauw/bin2source/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicolasbauw%2Fbin2source/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259846071,"owners_count":22920855,"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":["amiga","binary","byte-array","c","const-array","incbin","source"],"created_at":"2025-02-05T17:19:07.302Z","updated_at":"2025-06-14T16:35:22.070Z","avatar_url":"https://github.com/nicolasbauw.png","language":"C","readme":"# bin2source\n\nCreates a C bytes array from a file.\n\nUsage:\nbin2source inputfile outputfile arrayname\n\nExample:\n```\necho \"abcd\" \u003e test.txt\nbin2source test.txt test.c TESTARRAY\ncat test.c\ntypedef unsigned char UINT8;\nconst UINT8 TESTARRAY[5] = {\n        97,\n        98,\n        99,\n        100,\n        10,\n};\n```\nYou can change the typedef or array type to whatever you want, of course.\n\nWith the --amiga commutator (I use it with VBCC for instance), the output will be like:\n```\n#include \u003cexec/types.h\u003e\nconst UBYTE TESTARRAY[5] = {\n...\n```\nI use that in place of the AsmPro INCBIN macro. To use this data in your source, you can make an 'extern' declaration:\n```\nextern const UBYTE test[5];\n```\n\nTo compile the bin2source utility, just clone and type ```make```.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicolasbauw%2Fbin2source","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnicolasbauw%2Fbin2source","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicolasbauw%2Fbin2source/lists"}