{"id":13599876,"url":"https://github.com/Alignof/carron","last_synced_at":"2025-04-10T17:32:50.526Z","repository":{"id":36956617,"uuid":"337465050","full_name":"Alignof/carron","owner":"Alignof","description":"rv32/64imac emulator","archived":false,"fork":false,"pushed_at":"2024-08-26T13:09:00.000Z","size":2510,"stargazers_count":31,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-07T01:39:36.789Z","etag":null,"topics":["emulator","risc-v","rust"],"latest_commit_sha":null,"homepage":"","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/Alignof.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":"2021-02-09T16:25:09.000Z","updated_at":"2024-09-21T20:27:15.000Z","dependencies_parsed_at":"2024-01-14T04:44:50.606Z","dependency_job_id":"e612de96-89c7-4a12-b3a3-c4e40cf3b1a7","html_url":"https://github.com/Alignof/carron","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alignof%2Fcarron","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alignof%2Fcarron/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alignof%2Fcarron/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alignof%2Fcarron/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Alignof","download_url":"https://codeload.github.com/Alignof/carron/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248261995,"owners_count":21074229,"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":["emulator","risc-v","rust"],"created_at":"2024-08-01T17:01:15.110Z","updated_at":"2025-04-10T17:32:50.229Z","avatar_url":"https://github.com/Alignof.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# carron\n[![Rust](https://github.com/Alignof/carron/actions/workflows/rust.yml/badge.svg)](https://github.com/Alignof/Carron/actions/workflows/rust.yml) \n[![riscv\\_tests](https://github.com/Alignof/carron/actions/workflows/riscv_tests.yml/badge.svg)](https://github.com/Alignof/carron/actions/workflows/riscv_tests.yml)  \nRV64IMAC emulator in rust\n\n## Feature\nCarron can run **Linux** and **self-hosted binaries of [cc_sakura](https://github.com/Alignof/cc_sakura) my handmade C compiler**.  \nThis emulator parses an ELF file that supports rv32imac/rv64imac and emulate execution environment of it.    \n\nThe emulator passed riscv-tests shown below.\n\n- [x] rv32mi-p\n- [x] rv32si-p\n- [x] rv32ui-p\n- [x] rv32ui-v\n- [x] rv32um-p\n- [x] rv32um-v\n- [x] rv32ua-p\n- [x] rv32ua-v\n- [x] rv32uc-p\n- [x] rv32uc-v\n- [x] rv64mi-p\n- [x] rv64si-p\n- [x] rv64ui-p\n- [x] rv64ui-v\n- [x] rv64um-p\n- [x] rv64um-v\n- [x] rv64ua-p\n- [x] rv64ua-v\n- [x] rv64uc-p\n- [x] rv64uc-v\n\n## Install\n```zsh\ngit clone https://github.com/Alignof/carron.git\ncd carron\ncargo build --release\n```\n\n## Usage\n```zsh\n$ ./carron --help\ncarron 1.1.1\nn.takana \u003cAlignof@outlook.com\u003e\nRV64IMAC emulator\n\nUSAGE:\n    carron [OPTIONS] \u003cfilename\u003e [main_args]...\n\nARGS:\n    \u003cfilename\u003e        ELF file path\n    \u003cmain_args\u003e...\n\nOPTIONS:\n    -e, --elfhead                         Show ELF header\n    -p, --program                         Show all segments\n    -s, --section                         Show all sections\n    -d, --disasem                         Disassemble ELF\n    -a, --all                             Show all ELF data\n        --pk \u003cproxy_kernel\u003e               Run with proxy kernel\n        --pc \u003cinit_pc\u003e                    Set entry address as hex\n        --break_point \u003caddress\u003e           Set break point as hex\n        --result_reg \u003cregister_number\u003e    Set result register\n        --loglv \u003clog_level\u003e               Set log level\n    -h, --help                            Print help information\n    -V, --version                         Print version information\n```\n\n\n### Hello World\n```zsh\n$ ./carron --pk $RISCV/riscv32-unknown-elf/bin/pk ./HelloWorld\n\nIn file HelloWorld\nelfcheck: OK\n\nbbl loader\nhello world!\n```\n\n### boot Linux\n```\n$ git clone https://github.com/buildroot/buildroot\n$ cd buildroot\n$ git checkout 9b911c8\n$ make spike_riscv64_defconfig\n$ make menuconfig # disable F extension\n$ make -j $(nproc)\n$ ./carron --release -- --kernel /path/to/Image --initrd /path/to/rootfs.cpio /path/to/fw_jump.elf\nIn file /home/takana/riscv-toolchain/buildroot/output/images/fw_jump.elf\nelfcheck: OK\n\n\nOpenSBI v1.2\n   ____                    _____ ____ _____\n  / __ \\                  / ____|  _ \\_   _|\n | |  | |_ __   ___ _ __ | (___ | |_) || |\n | |  | | '_ \\ / _ \\ '_ \\ \\___ \\|  _ \u003c | |\n | |__| | |_) |  __/ | | |____) | |_) || |_\n  \\____/| .__/ \\___|_| |_|_____/|____/_____|\n        | |\n        |_|\n\n......\n\n[    0.091080] Freeing unused kernel image (initmem) memory: 2144K\n[    0.097300] Run /init as init process\nStarting syslogd: OK\nStarting klogd: OK\nRunning sysctl: OK\nSaving 256 bits of non-creditable seed for next boot\nStarting network: OK\n\nWelcome to Buildroot\nbuildroot login:\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAlignof%2Fcarron","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAlignof%2Fcarron","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAlignof%2Fcarron/lists"}