{"id":16960185,"url":"https://github.com/dflemstr/canbus-sensor-board","last_synced_at":"2025-07-28T19:39:28.387Z","repository":{"id":238193062,"uuid":"796063956","full_name":"dflemstr/canbus-sensor-board","owner":"dflemstr","description":null,"archived":false,"fork":false,"pushed_at":"2024-06-28T13:31:50.000Z","size":4803,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-20T17:50:14.256Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dflemstr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-05-04T20:34:59.000Z","updated_at":"2024-06-28T13:31:54.000Z","dependencies_parsed_at":"2024-05-15T14:00:58.181Z","dependency_job_id":"8c11175a-c023-463a-be2f-88d43a5bf9b3","html_url":"https://github.com/dflemstr/canbus-sensor-board","commit_stats":null,"previous_names":["dflemstr/canbus-sensor-board"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dflemstr/canbus-sensor-board","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dflemstr%2Fcanbus-sensor-board","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dflemstr%2Fcanbus-sensor-board/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dflemstr%2Fcanbus-sensor-board/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dflemstr%2Fcanbus-sensor-board/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dflemstr","download_url":"https://codeload.github.com/dflemstr/canbus-sensor-board/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dflemstr%2Fcanbus-sensor-board/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267576434,"owners_count":24110315,"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-07-28T02:00:09.689Z","response_time":68,"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":[],"created_at":"2024-10-13T22:47:30.046Z","updated_at":"2025-07-28T19:39:28.358Z","avatar_url":"https://github.com/dflemstr.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# canbus sensor board\n\nA simple board optimized for handling I²C-connected sensors and communicate the status over CAN bus.\n\n![PCB render](./render.png)\n\nThis repo contains both the PCB design files, and Rust-based firmware.\n\nTo flash and run the firmware:\n\n  * Install Rust.  Using [rustup](https://rustup.rs/) is very strongly encouraged as it automates\n    installation of cross compilation files and such.\n  * Install `probe-rs`, a CLI for connecting to debug probes, with `cargo install probe-rs`.\n  * Install `flip-link`, a meta-linker that puts the stack at the end of embedded memory, using\n    `cargo install flip-link`.\n  * Optionally update the `DEFAULT_CAN_ID` variable in `src/config.rs` if you want to change the CAN\n    bus ID of the board without having to send it a command later.\n\nFlash using a debug probe (easiest):\n\n  * Connect the PCB to your computer using a SWD-based debug probe, for example a ST-Link v2 clone\n    can be found super cheaply online, usually around $3 USD.  You can either solder wires to the\n    provided pads (see PCB design files for pin assignments) or else use a TagConnect TC2030-NL\n    cable, which has pogo pins matching the pads on the board, and can be bought with adapter wires\n    that are compatible with an ST-Link module.\n  * Run `cargo flash --release --chip STM32F103C8 --connect-under-reset` to flash to the board **or**\n    run `cargo run` to flash the firmware using a debug build, start it, and stream debug logs to the\n    terminal using the defmt RTT protocol. (You can of course also do any combination, e.g.\n    `cargo run --release` etc)\n\nFlash using CAN bus (more tricky perhaps):\n\n  * Install [`can-prog`](https://github.com/marcinbor85/can-Prog), see the link for additional\n    details.\n  * Connect the PCB to a CAN bus.\n  * Using some wires, first short the 3.3V and BOOT pads, and while still shorting the pads, also\n    short the ~RST and GND pads.  This should put the board in DFU mode.\n  * Build the firmware in release mode with `cargo build --release`\n  * Convert the generated ELF file to a raw `.bin` file with:\n    ```\n    arm-none-eabi-objcopy -O binary target/thumbv7m-none-eabi/release/canbus-sensor-board image.bin\n    ```\n\n  * Run the command `canprog -f bin stm32 write image.bin -a 0x08000000` or similar. You might need\n    to run `canprog stm32 erase` and such depending on the state of the firmware.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdflemstr%2Fcanbus-sensor-board","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdflemstr%2Fcanbus-sensor-board","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdflemstr%2Fcanbus-sensor-board/lists"}