{"id":28995062,"url":"https://github.com/daleonpz/zix","last_synced_at":"2026-05-15T22:03:20.542Z","repository":{"id":299084305,"uuid":"934144983","full_name":"daleonpz/zix","owner":"daleonpz","description":"This project is designed to be built and run using Nix, providing a reproducible development environment for Zephyr RTOS. ","archived":false,"fork":false,"pushed_at":"2025-06-14T14:59:51.000Z","size":137,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-25T04:06:14.419Z","etag":null,"topics":["embedded-systems","iot","nix","nix-flake","stm32","zephyr","zephyr-rtos"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/daleonpz.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-02-17T10:52:54.000Z","updated_at":"2025-06-14T14:58:49.000Z","dependencies_parsed_at":"2025-06-14T15:44:00.354Z","dependency_job_id":"2a6b6377-cf0c-497f-a9c1-3f5501886e8f","html_url":"https://github.com/daleonpz/zix","commit_stats":null,"previous_names":["daleonpz/zix"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/daleonpz/zix","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daleonpz%2Fzix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daleonpz%2Fzix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daleonpz%2Fzix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daleonpz%2Fzix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daleonpz","download_url":"https://codeload.github.com/daleonpz/zix/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daleonpz%2Fzix/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279011465,"owners_count":26084947,"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-10-12T02:00:06.719Z","response_time":53,"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":["embedded-systems","iot","nix","nix-flake","stm32","zephyr","zephyr-rtos"],"created_at":"2025-06-25T04:06:09.577Z","updated_at":"2025-10-12T13:24:21.623Z","avatar_url":"https://github.com/daleonpz.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nix-Based Zephyr Development Environment (Zix)\n\nThis project is designed to be built and run using Nix, providing a reproducible development environment for Zephyr RTOS. It includes scripts for building the application and MCUboot bootloader.\n\n## Table of Contents\n\n- [About the Project](#about-the-project)\n- [Project Status](#project-status)\n- [Getting Started](#getting-started)\n    - [Requirements](#requirements)\n    - [Working with Zix](#working-with-zix)\n    - [Troubleshooting](#troubleshooting)\n- [Contributing](#contributing)\n- [Authors](#authors)\n- [License](#license)\n- [Extras](#extras)\n    - [BLE Sniffer](#ble-sniffer)\n\n## About the Project\n\nThis project is ideal for developers working with Zephyr RTOS, especially those focusing on embedded systems and IoT applications. It simplifies the setup process and ensures that all dependencies are managed consistently across different development environments. It includes:\n\n- A Nix-based development environment for reproducibility.\n- Scripts for building Zephyr applications and MCUboot.\n- BLE sniffer support for monitoring Bluetooth Low Energy communications.\n- STM32CubeProgrammer integration for flashing STM32 devices.\n- JLink support for debugging and programming.\n\n**[Back to top](#table-of-contents)**\n\n## Project Status\n\nThe project is functional. It has been tested on the `nucleo_wb55rg` board and is ready for use in developing Zephyr applications with MCUboot support. The project is actively maintained, and contributions are welcome.\n\n**[Back to top](#table-of-contents)**\n\n## Getting Started\n\n### Requirements\n\nTo build and run this project, you need:\n\n- STM32CubeProgrammer: Download and place the zip file in `scripts/`.\n\n- Nix: A package manager for reproducible builds.\n\n  ```bash\n  sh \u003c(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install) --daemon\n  ```\n\n- git-lfs: For handling binary files.\n\n  - On Linux: `sudo apt install git-lfs`\n  - On macOS: `brew install git-lfs`\n\n- pre-commit: For code quality checks.\n\n  ```bash\n  pip install pre-commit\n  pre-commit install\n  ```\n\n- Zephyr SDK and west (included via Nix environment).\n\n### Working with Zix\n\n1. Fork the repository on GitHub. `app` directory is where you will develop your application.\n\n2. Start Nix shell:\n\n   ```bash\n   nix develop .\n   ```\n\n3. A `Makefile` is provided in the root directory to build and flash your application and bootloader (MCUBoot).\n\n   ```bash\n   make app              # Build otau_example application\n   make bootloader       # Build mcuboot bootloader\n   make all              # Build both together (default)\n   make app-codechecker  # Build application with codechecker\n   make flash-app        # Flash application\n   make flash-bootloader # Flash bootloader\n   make flash            # Flash all (bootloader + application)\n   ```\nThere are several options you can pass to the `make` command:\n\n   ```bash\n   make all VERBOSE=1 BOARD=your_board_name APP_DIR=your_app_dir\n   make flash APP_DIR=your_app_dir\n   ```\n\n   - `VERBOSE`: Show verbose output (0 or 1, default 0).\n   - `BOARD`: Target board (default: `nucleo_wb55rg`).\n   - `APP_DIR`: Application directory (default: `app`).\n\n4. If you modify `flake.nix` you need to update the Nix flake and restart the Nix shell:\n\n   ```bash\n   nix flake update\n   git add flake.lock\n   git commit -m \"Update flake.lock\"\n   git push\n\n   nix develop .\n   ```\n\n**[Back to top](#table-of-contents)**\n\n### Troubleshooting\n\n* If you encounter issues with the Nix environment, try running:\n\n   ```bash\n   nix-collect-garbage\n   ```\n\n* If you cannot access the serial port from Nix, add your user to the device's group (e.g., `uucp`):\n\n   ```bash\n   ls -l /dev/ttyACM0  # Check group (e.g., uucp)\n   sudo usermod -a -G uucp $USER\n   sudo reboot\n   ```\n\n* If you are using ST-Link v2.1, you need to copy the udev rules file to your system:\n\n   ```bash\n   sudo cp scripts/99-stlinkv2_1.rules /etc/udev/rules.d/\n   sudo udevadm control --reload-rules\n   sudo udevadm trigger\n   ```\n\n* `nrfutil` searchs for JLinkArm library in /opt/SEGGER/JLink, so you need to create a symlink to the JLink directory:\n\n   ```bash\n   sudo mkdir -p /opt/SEGGER/JLink\n   sudo ln -s /full-path/to/JLink/* /opt/SEGGER/JLink/\n   ```\n\n**[Back to top](#table-of-contents)**\n\n## Contributing\n\nContributions are welcome! Please create a pull request on GitHub. Use `pre-commit` to ensure code quality before submitting.\n\n**[Back to top](#table-of-contents)**\n\n## Authors\n\n-  Daniel Paredes (daleonpz)\n\n**[Back to top](#table-of-contents)**\n\n## License\n\nLicensed under the Apache License 2.0. See the LICENSE file for details.\n\nCopyright (c) 2025 Daniel Paredes (daleonpz)\n\n**[Back to top](#table-of-contents)**\n\n## Extras\n### BLE Sniffer\nThis project uses BLE as a communication protocol for the wearable device. The [nRF52840 Dongle](https://www.nordicsemi.com/Products/Development-hardware/nRF52840-Dongle) can be configured as a BLE sniffer to capture and analyze Bluetooth Low Energy packets.\n\n1. Start the power profiler:\n\n   ```bash\n   sh scripts/run_power_profiler.sh\n   ```\n\n2. Open the Programmer app, select the device (`Open DFU bootloader`).\n\n3. Flash the sniffer firmware:\n\n   ```bash\n   # Select: nrftools/nrfutil_tools/hex/sniffer_nrf51dongle_nrf51422_4.1.1.hex\n   # Click \"write\" to flash\n   ```\n\n4. Verify the device appears as `nRF Sniffer for Bluetooth`.\n\n**[Back to top](#table-of-contents)**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaleonpz%2Fzix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaleonpz%2Fzix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaleonpz%2Fzix/lists"}