{"id":28588472,"url":"https://github.com/thealbertdev/example-nor-memory-flash-mockup","last_synced_at":"2025-06-11T07:11:06.329Z","repository":{"id":297182497,"uuid":"994926633","full_name":"TheAlbertDev/example-nor-memory-flash-mockup","owner":"TheAlbertDev","description":null,"archived":false,"fork":false,"pushed_at":"2025-06-04T08:07:01.000Z","size":63,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-04T14:06:09.488Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/TheAlbertDev.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,"zenodo":null}},"created_at":"2025-06-02T17:41:24.000Z","updated_at":"2025-06-04T08:07:03.000Z","dependencies_parsed_at":"2025-06-04T14:17:31.892Z","dependency_job_id":null,"html_url":"https://github.com/TheAlbertDev/example-nor-memory-flash-mockup","commit_stats":null,"previous_names":["thealbertdev/example-nor-memory-flash-mockup"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheAlbertDev%2Fexample-nor-memory-flash-mockup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheAlbertDev%2Fexample-nor-memory-flash-mockup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheAlbertDev%2Fexample-nor-memory-flash-mockup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheAlbertDev%2Fexample-nor-memory-flash-mockup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TheAlbertDev","download_url":"https://codeload.github.com/TheAlbertDev/example-nor-memory-flash-mockup/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheAlbertDev%2Fexample-nor-memory-flash-mockup/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259219730,"owners_count":22823579,"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":[],"created_at":"2025-06-11T07:11:04.074Z","updated_at":"2025-06-11T07:11:06.316Z","avatar_url":"https://github.com/TheAlbertDev.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NOR Memory Flash Mockup Example\n\nThis repository demonstrates how to create test fixtures for embedded systems, specifically for interacting with a GD25Q16C NOR flash memory chip. It provides a comprehensive example of implementing and testing a file system interface using the LittleFS filesystem on NOR flash memory.\n\nThe project implements a simple file system interface that operates on top of NOR flash memory. For testing purposes, it includes a fake implementation that simulates the behavior of the physical memory, allowing for thorough testing without actual hardware.\n\n## Getting Started\n\n### Running Tests\n\nTo verify the implementation, run the included tests:\n\n```shell\ncd test\nmake\n```\n\n\n## Project Structure\n\nThe project is organized as follows:\n\n- **`src/`**: Contains the production code\n  - `file_system.c/h`: File system interface implementation\n  - `memory_io.h`: Hardware abstraction layer for memory operations\n  - `lfs/`: LittleFS library integration (v2.11.0)\n\n- **`test/`**: Contains test code and fixtures\n  - `fake_memory_io.c/h`: Fake implementation of the memory I/O interface\n  - `file_system.test.cpp`: CppUTest test cases for the file system\n  - `makefile`: Build instructions for the test suite\n\n## Devcontainer\n\nThis project includes a Visual Studio Code Devcontainer configuration that provides a ready-to-use development environment with all necessary tools preinstalled:\n\n- Ubuntu 24.04 LTS base image\n- GCC, G++, Make, and CMake\n- CppUTest framework preinstalled at `/opt/cpputest`\n- Code formatting and static analysis tools (clang-format)\n\nTo use it:\n1. Open the project in Visual Studio Code\n2. Install the \"Remote - Containers\" extension\n3. Use the command palette (F1) and select \"Remote-Containers: Reopen in Container\"\n\n## Software Bill of Materials (SBOM)\n\n| Library   | Tag/Version           | Remote Repository                                                                 |\n|-----------|-----------------------|----------------------------------------------------------------------------------|\n| LittleFS  | v2.11.0               | [LittleFS v2.11.0](https://github.com/littlefs-project/littlefs/tree/v2.11.0)    |\n| CppUTest  | latest-passing-build  | [CppUTest latest-passing-build](https://github.com/cpputest/cpputest/tree/004af40710d24c5dd075b0b84c82598e6d4f852b) |\n\n## Dummy image generation\n\nThe project uses the `littlefs-python` package to generate test images stored in the `test/generated_images` folder. Each binary image (`.bin` file) corresponds to a folder with the same name that contains the files and directories to be included in the image.\n\nTo create a new LittleFS image:\n\n```shell\nlittlefs-python create img01 img01.bin --fs-size=2mb --block-size=4096\n```\n\nThis command creates a 2MB image file `img01.bin` with 4KB blocks from the contents of the `img01` directory.\n\nThe project already includes sample images in `test/generated_images/` that are used by the test fixtures. The folder structure (e.g., `img01/tmp/test_folder/test_file.bin`) is mirrored in the corresponding binary image.\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthealbertdev%2Fexample-nor-memory-flash-mockup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthealbertdev%2Fexample-nor-memory-flash-mockup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthealbertdev%2Fexample-nor-memory-flash-mockup/lists"}