{"id":20246955,"url":"https://github.com/prdktntwcklr/atmega-tdd-example","last_synced_at":"2026-05-05T16:03:11.990Z","repository":{"id":59830199,"uuid":"538015811","full_name":"prdktntwcklr/atmega-tdd-example","owner":"prdktntwcklr","description":"Test-driven development (TDD) and CI/CD example for the ATmega.","archived":false,"fork":false,"pushed_at":"2024-08-15T07:57:22.000Z","size":1210,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-14T02:12:55.338Z","etag":null,"topics":["atmega","avr","c","cicd","cmake","embedded","fff","tdd","unity"],"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/prdktntwcklr.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-18T05:58:22.000Z","updated_at":"2024-08-15T07:57:23.000Z","dependencies_parsed_at":"2023-02-12T15:02:16.790Z","dependency_job_id":"65eb8815-b23c-404a-9ee7-9bee8a92e530","html_url":"https://github.com/prdktntwcklr/atmega-tdd-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prdktntwcklr%2Fatmega-tdd-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prdktntwcklr%2Fatmega-tdd-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prdktntwcklr%2Fatmega-tdd-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prdktntwcklr%2Fatmega-tdd-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prdktntwcklr","download_url":"https://codeload.github.com/prdktntwcklr/atmega-tdd-example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241692787,"owners_count":20004299,"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":["atmega","avr","c","cicd","cmake","embedded","fff","tdd","unity"],"created_at":"2024-11-14T09:34:23.270Z","updated_at":"2026-05-05T16:03:11.983Z","avatar_url":"https://github.com/prdktntwcklr.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ATmega TDD Example\r\n\r\n![Build](https://github.com/prdktntwcklr/atmega-tdd-example/workflows/build/badge.svg)\r\n\r\nThis project demonstrates the use of unit testing and test-driven development\r\n(TDD) when writing bare-metal code for an ATmega series microcontroller. This\r\nproject uses the [ThrowTheSwitch/Unity](https://github.com/ThrowTheSwitch/Unity)\r\nunit testing framework together with [meekrosoft/fff](https://github.com/meekrosoft/fff)\r\nfor mocking support in order to minimize the reliance on external dependencies\r\nsuch as `Ruby`.\r\n\r\nIn this example, the unit tests are run exclusively on the developer's machine\r\n(the \"host\") instead of on the microcontroller itself (the \"target\"). To\r\nstreamline this process among developers, the project uses a Docker environment\r\ndescribed below (see [running unit tests](#running-unit-tests)).\r\n\r\n## Required Hardware\r\n\r\n1. Breadboard\r\n2. Microcontroller (ATmega168A, 28-PDIP Package)\r\n3. LED\r\n4. Current-limiting resistor\r\n5. Programmer (e.g. [Pololu USB AVR Programmer v2.1](https://www.pololu.com/product/3172))\r\n6. Some jumper wires\r\n\r\nDetails on how to connect these components can be found in\r\n```Docs/schematic.pdf```.\r\n\r\n## Running unit tests\r\n\r\nThis project uses a Dockerized environment from within which the unit tests can\r\nbe executed. This saves developers from having to set up the development\r\nenvironment themselves on their local workstations.\r\n\r\nFirst, make sure that you have [Docker](https://www.docker.com/get-started/)\r\ninstalled and running on your machine. Next, install and activate the\r\n[Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)\r\nextension for [Visual Studio Code](https://code.visualstudio.com/).\r\n\r\nOpening the workspace in Visual Studio Code should then prompt you with a\r\ntextbox that allows you to reopen the project in a Docker container with all\r\nrequired packages already installed. To invoke all unit tests, simply run:\r\n\r\n```bash\r\n./unit-tests.sh\r\n```\r\n\r\nThis should show that all tests passing:\r\n\r\n![All unit tests ran successfully.](Docs/img/run-unit-tests.jpg)\r\n\r\n## Further reading\r\n\r\n- Grenning, J. W. (2011): *Test-Driven Development for Embedded C.* Raleigh, NC:\r\nPragmatic Programmers.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprdktntwcklr%2Fatmega-tdd-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprdktntwcklr%2Fatmega-tdd-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprdktntwcklr%2Fatmega-tdd-example/lists"}