{"id":20383068,"url":"https://github.com/headblockhead/dc32-badge","last_synced_at":"2025-10-05T04:47:34.153Z","repository":{"id":253143797,"uuid":"842599906","full_name":"headblockhead/dc32-badge","owner":"headblockhead","description":"ultra-simple new firmware for the DEF CON 32 badge, built with Nix","archived":false,"fork":false,"pushed_at":"2024-08-15T17:45:58.000Z","size":17,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-04T22:43:34.371Z","etag":null,"topics":["badge","defcon","defcon32"],"latest_commit_sha":null,"homepage":"","language":"Nix","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/headblockhead.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":"2024-08-14T17:18:05.000Z","updated_at":"2025-02-24T00:51:51.000Z","dependencies_parsed_at":"2025-01-15T07:18:47.235Z","dependency_job_id":"d2405deb-d1dd-4831-90ae-0980faeac038","html_url":"https://github.com/headblockhead/dc32-badge","commit_stats":null,"previous_names":["headblockhead/dc32-badge"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/headblockhead/dc32-badge","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/headblockhead%2Fdc32-badge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/headblockhead%2Fdc32-badge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/headblockhead%2Fdc32-badge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/headblockhead%2Fdc32-badge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/headblockhead","download_url":"https://codeload.github.com/headblockhead/dc32-badge/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/headblockhead%2Fdc32-badge/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267278789,"owners_count":24063265,"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","status":"online","status_checked_at":"2025-07-26T02:00:08.937Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["badge","defcon","defcon32"],"created_at":"2024-11-15T02:20:10.905Z","updated_at":"2025-10-05T04:47:29.092Z","avatar_url":"https://github.com/headblockhead.png","language":"Nix","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dc32_badge custom firmware\nCustom firmware built from scratch for the Defcon 32 badge. Work-in-progress.\n\n## References\n\n### Pinout\n\n```c\n#define PIN_RAM_NCS\t\t0\n#define PIN_TOUCHINT\t1\n#define PIN_SDA\t\t\t2\n#define PIN_SCL\t\t\t3\n#define PIN_WS2812\t\t4\n\n#define PIN_LCD_DnC\t\t5\n#define PIN_LCD_DO\t\t6\n#define PIN_LCD_SCK\t\t8\n#define PIN_LCD_CS\t\t9\n#define PIN_LCD_BL\t\t10\n\n#define PIN_SELF_PWR\t11\n\n#define PIN_SD_MISO\t\t12\n#define PIN_SD_NCS\t\t13\n#define PIN_SD_SCK\t\t14\n#define PIN_SD_MOSI\t\t15\n\n#define PIN_BTN_R\t\t16\n#define PIN_BTN_D\t\t17\n#define PIN_BTN_U\t\t18\n#define PIN_BTN_L\t\t19\n#define PIN_BTN_B\t\t20\n#define PIN_BTN_A\t\t21\n#define PIN_BTN_START\t22\n#define PIN_BTN_SEL\t\t23\n#define PIN_BTN_CENTER\t24\n\n#define PIN_IRDA_OUT\t26\t\t// 26 is the built in IR. 28 is for super-power-IR attachment\n#define PIN_IRDA_IN\t\t27\n#define PIN_IRDA_SD\t\t7\n\n#define PIN_SPQR\t\t25\n\n// PWM use\n#define BACKLITE_PWM_INDEX\t\t\t5\n\n// DMA USE\n#define DISP_DMA_FIRST\t\t\t\t0\t// uses 2\n#define SD_DMA_FIRST\t\t\t\t2\t// uses 2\n#define WS2812_DMA\t\t\t\t\t4\t// uses 1\n#define I2C_DMA_FIRST\t\t\t\t5\t// uses 2\n\n// PIO use:\n#define DISP_PIO_IDX\t\t\t\t0\n#define DISP_PIO_SM\t\t\t\t\t0\t// of 4\n#define DISP_PIO_FIRST_USED_PC\t\t0\t// uses 2 instrs\n\n#define I2C_PIO_IDX\t\t\t\t\t1\n#define I2C_PIO_SM\t\t\t\t\t0\t// of 4\n#define I2C_PIO_INT_IRQ_IDX\t\t\t0\t// of 8\n#define I2C_PIO_EXT_IRQ_IDX\t\t\t0\t// of 2\n#define I2C_PIO_FIRST_USED_PC\t\t0\t// uses 22 instrs\n\n#define SIR_PIO_IDX\t\t\t\t\t1\n#define SIR_PIO_SM\t\t\t\t\t1\t// of 4\n#define SIR_PIO_EXT_IRQ_IDX\t\t\t1\t// of 2\n#define SIR_PIO_FIRST_USED_PC\t\t22\t// uses 9 instrs\n\n#define WS2812_PIO_IDX\t\t\t\t1\n#define WS2812_PIO_SM\t\t\t\t2\t// of 4\n#define WS2812_PIO_FIRST_USED_PC\t31\t// uses 1 instr\n```\n\n## Tasks\n\n### Upload-Release\nDirectory: ./build\nRequires: build-release\n\nBuilds, then copies the firmware with speed optimisations to the RP2350.\n\n```bash\nexport PICO_DIR=`findmnt -S LABEL=RP2350 -o TARGET -fn`\ncp ./dc32_badge.uf2 $PICO_DIR\n```\n\n### Upload-Debug\nDirectory: ./build\nRequires: build-debug\n\nBuilds, then copies the firmware with debug optimisations to the RP2350.\n\n```bash\nexport PICO_DIR=`findmnt -S LABEL=RP2350 -o TARGET -fn`\ncp ./dc32_badge.uf2 $PICO_DIR\n```\n\n### Build-Release\nDirectory: ./build\n\nBuilds the firmware optimized for size.\n\n```bash\ncmake -DCMAKE_BUILD_TYPE=Release -DPICO_PLATFORM=rp2350 ..\nmake -j4 dc32_badge\n```\n\n### Build-Debug\nDirectory: ./build\n\nBuilds the keyboard firmware with development outputs.\n\n```bash\ncmake -DCMAKE_BUILD_TYPE=Debug -DPICO_PLATFORM=rp2350 .. \nmake -j4 dc32_badge\ncp compile_commands.json ../ # Copies the autocomplete information for ccls.\n```\n\n### Clean-Development\n\nResets development files for a clean build.\n\n```bash\nrm -rf ./build\nmkdir build\n```\n\n### Initialize-Development\n\nFetches submodules and creates the build folder.\n\n```bash\ngit submodule update --init --recursive\nmkdir -p build\n```\n\n### Update-Submodules\n\nUpdates the submodules to the latest commit.\n\n```bash\ngit submodule update --remote\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheadblockhead%2Fdc32-badge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fheadblockhead%2Fdc32-badge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheadblockhead%2Fdc32-badge/lists"}