{"id":23087353,"url":"https://github.com/skasselbard/embeddedrust","last_synced_at":"2025-04-03T16:44:36.193Z","repository":{"id":131822431,"uuid":"168361153","full_name":"Skasselbard/embeddedRust","owner":"Skasselbard","description":"Async runtime for embedded rust and access to resources that are based on the embedded-hal crate","archived":false,"fork":false,"pushed_at":"2021-09-29T07:05:17.000Z","size":293,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-09T05:26:43.718Z","etag":null,"topics":["async-await","embedded-hal","executor","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Skasselbard.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":"2019-01-30T14:59:06.000Z","updated_at":"2021-11-26T17:03:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"fc2989d4-bde7-4402-8119-0a3777915a30","html_url":"https://github.com/Skasselbard/embeddedRust","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/Skasselbard%2FembeddedRust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Skasselbard%2FembeddedRust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Skasselbard%2FembeddedRust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Skasselbard%2FembeddedRust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Skasselbard","download_url":"https://codeload.github.com/Skasselbard/embeddedRust/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247042944,"owners_count":20874082,"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":["async-await","embedded-hal","executor","rust"],"created_at":"2024-12-16T19:56:04.880Z","updated_at":"2025-04-03T16:44:36.186Z","avatar_url":"https://github.com/Skasselbard.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Rust on ARM](https://github.com/Skasselbard/embeddedRust/workflows/Rust%20on%20ARM/badge.svg)\n# Embedded Rust\nGetting rust to work an the Blue Pill stm32 board\n\n# Links\n- [The embedded rust book](https://rust-embedded.github.io/book/intro/index.html)\n- [blue pill wiki page](https://wiki.stm32duino.com/index.php?title=Blue_Pill)\n- [rust core basics](https://os.phil-opp.com/freestanding-rust-binary/)\n- [embedded rust project and link collection](https://github.com/rust-embedded/awesome-embedded-rust)\n- [gdb commands](https://darkdust.net/files/GDB%20Cheat%20Sheet.pdf)\n- [ARM instruction set](http://www.peter-cockerell.net/aalp/html/ch-3.html)\n- [rust blue pill setup instructions and helpful pages](https://github.com/lupyuen/stm32-blue-pill-rust)\n- [(want to read)](http://blog.japaric.io/brave-new-io/)\n- [openocd docu](http://openocd.org/doc-release/pdf/openocd.pdf)\n- https://medium.com/@ly.lee/hosting-embedded-rust-apps-on-apache-mynewt-with-stm32-blue-pill-c86b119fe5f\n- [rust os how to](https://os.phil-opp.com/)\n\n# crates\n- blue pill peripherals crate https://crates.io/crates/stm32f103xx\n- stm32f1 crate https://github.com/stm32-rs/stm32-rs\n- blue pill hal crate https://crates.io/crates/stm32f1xx-hal\n\n# Board specs\n- [data sheet](https://www.st.com/resource/en/datasheet/stm32f103c8.pdf)\n- [reference manual](https://www.st.com/content/ccc/resource/technical/document/reference_manual/59/b9/ba/7f/11/af/43/d5/CD00171190.pdf/files/CD00171190.pdf/jcr:content/translations/en.CD00171190.pdf)\n- [flash programming manual](https://www.st.com/content/ccc/resource/technical/document/programming_manual/10/98/e8/d4/2b/51/4b/f5/CD00283419.pdf/files/CD00283419.pdf/jcr:content/translations/en.CD00283419.pdf)\n- [bootloader notes](https://www.st.com/content/ccc/resource/technical/document/application_note/b9/9b/16/3a/12/1e/40/0c/CD00167594.pdf/files/CD00167594.pdf/jcr:content/translations/en.CD00167594.pdf)\n- start of flash 0x0800_0000\n- start of sram 0x2000_0000\n\n# Steps Done\n# Install bootloader with Stlink (probably incomplete)\n```\n  sudo apt install \\\n  gdb-multiarch \\\n  openocd \\\n  qemu-system-arm\n```\n\nCreate file ``/etc/udev/rules.d/70-st-link.rules`` for permissions with this content:\n```\n# STM32F3DISCOVERY rev A/B - ST-LINK/V2\\\nATTRS{idVendor}==\"0483\", ATTRS{idProduct}==\"3748\", TAG+=\"uaccess\"\\\n\\\n# STM32F3DISCOVERY rev C+ - ST-LINK/V2-1\\\nATTRS{idVendor}==\"0483\", ATTRS{idProduct}==\"374b\", TAG+=\"uaccess\"\\\n```\n\nUpdate:\n```\nsudo udevadm control --reload-rules\n```\n\n## Debug with ST-Link\n- connect both Boot Jumper to 0\n\n## setup rust\nInstall toolchain\n```\nrustup target add thumbv7m-none-eabi\n```\nInstall cargo-binutils\n```\ncargo install cargo-binutils\nrustup component add llvm-tools-preview\n```\nSetup Cargo \n```\ncargo init --bin --edition 2018\n```\n\nget the cortex m quick-start files like described in the embedded rust book  \nhttps://github.com/rust-embedded/cortex-m-quickstart/blob/master/\n  \nBuild binary\n```\ncargo build --target thumbv7m-none-eabi\n```\n\nTest build\n```\ncargo readobj --bin embeddedRust --target thumbv7m-none-eabi -- -file-headers\n```\n\nSize of linker sections\n```\ncargo size --bin embeddedRust --target thumbv7m-none-eabi --release -- -A\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskasselbard%2Fembeddedrust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskasselbard%2Fembeddedrust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskasselbard%2Fembeddedrust/lists"}