{"id":25950107,"url":"https://github.com/rustsbi/bouffaloader","last_synced_at":"2025-04-05T11:05:07.383Z","repository":{"id":260735627,"uuid":"871104626","full_name":"rustsbi/bouffaloader","owner":"rustsbi","description":"Bouffaloader is a baremetal bootloader for Bouffalo IoT chips.","archived":false,"fork":false,"pushed_at":"2025-03-10T08:25:13.000Z","size":35,"stargazers_count":79,"open_issues_count":0,"forks_count":80,"subscribers_count":73,"default_branch":"main","last_synced_at":"2025-03-29T10:04:50.756Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rustsbi.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":"2024-10-11T09:26:01.000Z","updated_at":"2025-03-10T08:25:17.000Z","dependencies_parsed_at":"2024-11-02T07:26:00.196Z","dependency_job_id":"9126d544-a722-4044-b197-436164564529","html_url":"https://github.com/rustsbi/bouffaloader","commit_stats":null,"previous_names":["rustsbi/bouffaloader"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustsbi%2Fbouffaloader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustsbi%2Fbouffaloader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustsbi%2Fbouffaloader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustsbi%2Fbouffaloader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rustsbi","download_url":"https://codeload.github.com/rustsbi/bouffaloader/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247325693,"owners_count":20920714,"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":[],"created_at":"2025-03-04T12:52:42.863Z","updated_at":"2025-04-05T11:05:07.377Z","avatar_url":"https://github.com/rustsbi.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bouffaloader demo\n\n## Usage with Cargo\n\n### Compile\n\n```\ncargo build --target riscv64imac-unknown-none-elf --release\n```\n\n### Convert ELF file to binary file\n\n```\ncargo blri elf2bin ./target/riscv64imac-unknown-none-elf/release/bouffaloader\n```\n\n### Fix the image header (CRC and other fields)\n\n```\ncargo blri patch ./target/riscv64imac-unknown-none-elf/release/bouffaloader.bin\n```\n\n### Flash to the development board\n\n```\ncargo blri flash ./target/riscv64imac-unknown-none-elf/release/bouffaloader.bin\n```\n\n## Usage with Bouffalo Lab Dev Cube\n\n### Build\n\n```\nrustup target install riscv64imac-unknown-none-elf\ncargo build --target riscv64imac-unknown-none-elf --release\n```\n\n### Convert the elf file to a binary file\n\n```\ncargo install cargo-binutils\nrustup component add llvm-tools-preview\nrust-objcopy .\\target\\riscv64imac-unknown-none-elf\\release\\bouffaloader -O binary .\\target\\riscv64imac-unknown-none-elf\\release\\bouffaloader.bin\n```\n\n### Flash the binary file to the board with [Bouffalo Lab Dev Cube](https://dev.bouffalolab.com/download) on Windows\n\n1. Connect the board to the computer via UART (Here takes M1s Dock as an example):\n    - Normally, you can see 2 new serial ports. If not, visit [Burn onboard bl702](https://wiki.sipeed.com/hardware/en/maix/m1s/other/start.html#Burn-onboard-bl702) for help.\n\n2. Run the `BLDevCube.exe`, choose `BL808`, and click `Finish`.\n\n3. In MCU page, browse `target\\riscv64imac-unknown-none-elf\\release\\bouffaloader.bin` as the target of `D0 Group`. Choose the bigger number serial port, and set uart rate 2000000.\n\n4. Press BOOT and RST on the board, then release RST first and BOOT after to be into UART burning mode.\n\n5. Click `Create \u0026 Download`, wait for flash the binary file to success.\n\n## Interact\n\nAfter flashing, repower the board and open the serial port monitor to see the output and interact with the CLI:\n\n- `help`: print out all commands.\n\n- `hello`: print out 'Hello world!'.\n\n- `led [\u003cnone\u003e|on|off|switch]`: operate on LED.\n\n- `reload`: reload from sdcard.\n\n- `read \u003caddr\u003e`: fetch data from address.\n\n- `write \u003caddr\u003e \u003cval\u003e`: write value to address.\n\n- `boot`: boot M-mode firmware.\n\n- `bootargs get|set \u003cval\u003e`: print or set the bootargs in memory.\n\n- `print`: print the configs.bootargs.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frustsbi%2Fbouffaloader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frustsbi%2Fbouffaloader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frustsbi%2Fbouffaloader/lists"}