{"id":51126766,"url":"https://github.com/abitofhelp/teensy_strawman_rust","last_synced_at":"2026-06-25T08:32:17.452Z","repository":{"id":367204514,"uuid":"1279736483","full_name":"abitofhelp/teensy_strawman_rust","owner":"abitofhelp","description":"A project to demonstrate using Rust with Embassy on a bare-metal Teensy v4.1 board.","archived":false,"fork":false,"pushed_at":"2026-06-25T01:24:22.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-25T03:11:19.630Z","etag":null,"topics":["hex","rust","strawman","teensy"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abitofhelp.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,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-25T01:17:53.000Z","updated_at":"2026-06-25T01:24:26.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/abitofhelp/teensy_strawman_rust","commit_stats":null,"previous_names":["abitofhelp/teensy_strawman_rust"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/abitofhelp/teensy_strawman_rust","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abitofhelp%2Fteensy_strawman_rust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abitofhelp%2Fteensy_strawman_rust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abitofhelp%2Fteensy_strawman_rust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abitofhelp%2Fteensy_strawman_rust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abitofhelp","download_url":"https://codeload.github.com/abitofhelp/teensy_strawman_rust/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abitofhelp%2Fteensy_strawman_rust/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34767543,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-25T02:00:05.521Z","response_time":101,"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":["hex","rust","strawman","teensy"],"created_at":"2026-06-25T08:32:14.934Z","updated_at":"2026-06-25T08:32:17.443Z","avatar_url":"https://github.com/abitofhelp.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# teensy_strawman_rust\n\nA bare-metal **Rust** project that establishes a working build, boot, and runtime\nconfiguration for the **Teensy 4.1** development board (NXP i.MX RT1062,\nARM Cortex-M7). There are two crates: 1) A minimal LED blinking application; and 2) A LED blinking application based on **RTIC `async` tasking**. These crates prove the toolchain, boot image, and flash chain end-to-end on real hardware.\n\n\u003e This is the Rust counterpart of the Ada strawman (`teensy_strawman` /\n\u003e `teensy_strawman_ada`). The two mirror each other to compare the toolchains on\n\u003e identical hardware.\n\n## Status\n\n| Stage | State |\n|-------|-------|\n| Simple LED blink (`blink/src/main.rs`) | ✅ **Proven on hardware** |\n| RTIC `async` tasking blink (`tasking/src/main.rs`) | ✅ **Proven on hardware** — an async task on a SysTick monotonic timer |\n\nBoth binaries blink at a rapid **~0.2 s** period, deliberately distinct from the\n**1 s** factory app and the Ada strawman's **~0.5 s**, so the three are easy to\ntell apart at a glance.\n\n## Hardware\n\n- **Board:** PJRC Teensy 4.1\n- **MCU:** NXP i.MX RT1062 — ARM Cortex-M7, double-precision FPU\n- **Boot flash:** Winbond W25Q64JV-DTR (8 MB QSPI NOR), loaded via FlexSPI\n- **LED:** onboard, Arduino pin 13 → pad `GPIO_B0_03` → `GPIO2` bit 3\n\n## Requirements\n\n- [rustup](https://rustup.rs) with the bare-metal target:\n  `rustup target add thumbv7em-none-eabihf`\n- [`teensy_loader_cli`](https://github.com/PaulStoffregen/teensy_loader_cli)\n  (`brew install teensy_loader_cli` on macOS) — for flashing\n- An `objcopy` for ELF → Intel HEX. The `Makefile` prefers the Rust-native\n  `rust-objcopy` (`rustup component add llvm-tools \u0026\u0026 cargo install cargo-binutils`)\n  and falls back to a GNU `arm-eabi-objcopy` if one is on `PATH`.\n\n## Build \u0026 flash\n\nThe `Makefile` wraps the common steps (mirrors the Ada strawman):\n\n```sh\nmake                # build the simple blink (default)\nmake burn-blink     # build + HEX + flash the simple blink\nmake burn-tasking   # build + HEX + flash the RTIC tasking blink\nmake size / make clean / make help\n```\n\nOr run the steps directly:\n\n```sh\n# Build a workspace member (release is the embedded default).\ncargo build --release -p blink        # simple blink   -\u003e .../release/blink\ncargo build --release -p tasking      # RTIC tasking   -\u003e .../release/tasking\n\n# ELF -\u003e HEX (rust-objcopy; a GNU arm-eabi-objcopy also works).\nrust-objcopy -O ihex \\\n  target/thumbv7em-none-eabihf/release/tasking bin/tasking.hex\n\n# Flash, then press the Teensy's onboard button when prompted.\nteensy_loader_cli --mcu=TEENSY41 -w -v bin/tasking.hex\n```\n\n## Project layout\n\n```\nteensy_strawman_rust/            Cargo workspace root\n├── Cargo.toml                   [workspace] members + shared deps + release profile\n├── .cargo/config.toml           target (thumbv7em-none-eabihf) + linker arg (t4link.x)\n├── Makefile                     build / hex / burn / size / clean / help\n├── blink/\n│   ├── Cargo.toml               package \"blink\"\n│   └── src/main.rs              simple loop blink\n└── tasking/\n    ├── Cargo.toml               package \"tasking\"\n    └── src/main.rs              RTIC async tasking blink (SysTick monotonic)\n```\n\n## How it works (briefly)\n\nThe `teensy4-bsp` crate's `rt` feature pulls in `imxrt-rt`, which generates the\ni.MX RT **boot image** (FlexSPI Configuration Block + Image Vector Table), the\n**memory map**, and the **linker script** (`t4link.x`). At startup the runtime\ncopies code into **ITCM** and data into **DTCM**, and places the **vector table\nin DTCM** (RAM) — so the application source is just the blink itself.\n\nThat ITCM-code / DTCM-vectors layout is the standard, hardware-proven model for\nthis chip and is a useful reference point when bringing up other runtimes on the\nsame board.\n\n## Debugging\n\nThe Teensy has **no on-board debugger and no SWD header** — the i.MX RT's SWD pins\nare small underside test pads. For interactive `gdb`, wire a **Raspberry Pi Debug\nProbe** (or any CMSIS-DAP / J-Link probe) to those pads and bridge it with\n`openocd`; the same probe also exposes a **UART** for a serial console. For quick\nlogging without a probe, a 3.3 V USB-to-serial adapter on `Serial1` (pin 1 = TX)\nworks too.\n\n## Roadmap\n\n1. ✅ Simple blink — de-risk the toolchain / boot / flash chain (done).\n2. ✅ RTIC `async` tasking blink — a scheduled task on a SysTick monotonic (done).\n3. Graft the hybrid (DDD/Clean/Hex) architecture to seed `hybrid_teensy_app_rust`.\n\n## Attribution\n\nBuilt on the **teensy4-rs** and **imxrt-rs** crate ecosystems and the **RTIC**\nframework. See **[NOTICE](NOTICE)** for the components and their licenses.\nNXP/ARM reference documents are not redistributed.\n\n## License\n\nBSD 3-Clause — see **[LICENSE](LICENSE)**. Third-party crates retain their own\n(permissive) licenses as described in **[NOTICE](NOTICE)**.\n\n## AI Assistance \u0026 Authorship\n\nThis project was developed by **Michael Gardner (A Bit of Help, Inc.)** with the\nassistance of AI coding tools (Anthropic's Claude, via Claude Code). All\nengineering decisions, reviews, and the final implementation are the author's\nresponsibility; AI was used as a tool for research, drafting, and verification.\nHardware facts were cross-checked against vendor documentation, and the result\nwas validated on physical hardware.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabitofhelp%2Fteensy_strawman_rust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabitofhelp%2Fteensy_strawman_rust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabitofhelp%2Fteensy_strawman_rust/lists"}