{"id":18924507,"url":"https://github.com/sharpcoder/teensycore","last_synced_at":"2025-08-21T10:31:27.538Z","repository":{"id":54363826,"uuid":"447448021","full_name":"SharpCoder/teensycore","owner":"SharpCoder","description":"A rust kernel for the Teensy 4.0","archived":false,"fork":false,"pushed_at":"2023-12-04T03:32:25.000Z","size":229,"stargazers_count":71,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-08T08:21:15.449Z","etag":null,"topics":["baremetal","kernel","rust","teensy4"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/teensycore","language":"Rust","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/SharpCoder.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}},"created_at":"2022-01-13T03:17:11.000Z","updated_at":"2025-02-20T01:40:02.000Z","dependencies_parsed_at":"2023-11-25T00:20:44.814Z","dependency_job_id":"94e7157b-6a99-4b97-b92a-62cd7644516f","html_url":"https://github.com/SharpCoder/teensycore","commit_stats":{"total_commits":101,"total_committers":1,"mean_commits":101.0,"dds":0.0,"last_synced_commit":"a9bc82bbb79830a9a41b3b705ac8dbb6ffe67076"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/SharpCoder/teensycore","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SharpCoder%2Fteensycore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SharpCoder%2Fteensycore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SharpCoder%2Fteensycore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SharpCoder%2Fteensycore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SharpCoder","download_url":"https://codeload.github.com/SharpCoder/teensycore/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SharpCoder%2Fteensycore/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271462878,"owners_count":24764059,"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-08-21T02:00:08.990Z","response_time":74,"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":["baremetal","kernel","rust","teensy4"],"created_at":"2024-11-08T11:07:02.066Z","updated_at":"2025-08-21T10:31:27.275Z","avatar_url":"https://github.com/SharpCoder.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Teensycore\n\nTeensycore is a kernel written in rust for the [Teensy-4.0 microcontroller](https://www.pjrc.com/store/teensy40.html).\n\n## Installation\n\nTo properly build teensycore and any subsequent project, you'll need the following:\n\n```bash\n# Install build tools\nsudo apt-get install build-essential gcc-arm-none-eabi jq\n\n# Configure rust\nrustup default nightly\nrustup target add thumbv7em-none-eabihf\n```\n\n## Usage\n\nYou must first configure your project as a library. Your Cargo.toml should look something like this:\n\n```\n[package]\nname = \"my_project\"\nversion = \"0.1.0\"\nedition = \"2021\"\n\n[lib]\ncrate-type = [\"staticlib\"]\npath = \"src/lib.rs\"\n\n[dependencies]\nteensycore = \"^0.1.0\"\n```\n\nTeensycore exports a convenient macro that helps to configure the entrypoint of your application. It takes care of the default panic handler, initializing system clocks, setting up irq, enabling debug UART, and much more. In this way, you can just focus on what your project needs to get going. Replace your `src/lib.rs` with something like this:\n\n```rust\n#![feature(lang_items)]\n#![crate_type = \"staticlib\"]\n#![no_std]\n\nuse teensycore::prelude::*;\n\nteensycore::main!({\n    /* Application code here */\n});\n```\n\nYou are now ready to start writing some baremetal rust!\n\n## Building\n\nIn order for your project to build correctly, you'll need the following:\n\n- Configure your project as a library\n- Put your entrypoint code in src/lib.rs\n- Download the build template [bash script](https://raw.githubusercontent.com/SharpCoder/teensycore/main/build-template.sh)\n- Execute `build-template.sh` in lieu of `cargo build`.\n\nThe build script will generate a `.hex` file and place it in a folder called `out`. This hex file is compatible with the teensy 4.0 and can be flashed with the teensy-loader utility.\n\n**CAUTION**: Do not build this in release mode. It optimizes a lot of stuff away, and can cause problems.\n\n## Example\n\nHere is a very basic blinky example. To see more examples, check out the `/examples` folder.\n\n```rust\n#![feature(lang_items)]\n#![crate_type = \"staticlib\"]\n#![no_std]\n\nuse teensycore::prelude::*;\n\nmain!({\n    pin_mode(13, Mode::Output);\n\n    loop {\n        pin_out(13, Power::High);\n        wait_ns(1 * S_TO_NANO);\n        pin_out(13, Power::Low);\n        wait_ns(1 * S_TO_NANO);\n    }\n});\n```\n\n## Contributing\n\nThis project is a work-in-progress and will be undergoing significant development over the coming months and years as I make it suitable for my own needs. Contributions are welcome. Please open an issue if you'd like to discuss anything specific.\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharpcoder%2Fteensycore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsharpcoder%2Fteensycore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharpcoder%2Fteensycore/lists"}