{"id":18163720,"url":"https://github.com/chuckb/riscv-helloworld-c","last_synced_at":"2025-10-20T09:40:57.771Z","repository":{"id":249400069,"uuid":"829466641","full_name":"chuckb/riscv-helloworld-c","owner":"chuckb","description":"A bare metal hello world in C for Risc-V using QEMU to test","archived":false,"fork":false,"pushed_at":"2024-07-21T13:31:12.000Z","size":6,"stargazers_count":12,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-09T10:33:44.942Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","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/chuckb.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-07-16T13:37:23.000Z","updated_at":"2025-04-08T14:09:35.000Z","dependencies_parsed_at":"2024-12-20T17:48:09.466Z","dependency_job_id":"e840c695-b7b1-41a0-9f3f-bc2b59a68b45","html_url":"https://github.com/chuckb/riscv-helloworld-c","commit_stats":null,"previous_names":["chuckb/riscv-helloworld-c"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/chuckb/riscv-helloworld-c","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chuckb%2Friscv-helloworld-c","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chuckb%2Friscv-helloworld-c/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chuckb%2Friscv-helloworld-c/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chuckb%2Friscv-helloworld-c/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chuckb","download_url":"https://codeload.github.com/chuckb/riscv-helloworld-c/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chuckb%2Friscv-helloworld-c/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271681566,"owners_count":24802077,"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-22T02:00:08.480Z","response_time":65,"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-11-02T11:06:01.722Z","updated_at":"2025-10-20T09:40:52.737Z","avatar_url":"https://github.com/chuckb.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RISC-V Bare-Metal Hello World In C\nAs simple as I could make it bare metal C application writing Hello World! to the serial port of the QEMU virt machine, including debug setup for GDB and VSCode.\n \nThis repo is accompanied by two youtube videos:\n- RISC-V Bare-Metal Hello World In C: https://youtu.be/HC7b1SVXoKM\n- RISC-V Debugging With QEMU, GDB, and VSCode: https://youtu.be/NbZDowmXzZs\n- Tags in the repo are named by video if you want to have code versioned as such.\n\n## Prerequisites\nThis example and accompanying video were done on OSX. The tools were installed via homebrew. If the toolchain is installed on other OSes, then in theory it should also work, but I have not tested it.\n- Compiler: https://github.com/riscv-software-src/homebrew-riscv\n- Make\n- QEMU: https://formulae.brew.sh/formula/qemu\n- VSCode\n- GDB or Debugger from Risc-V Toolchain if available on your platform (was not bottled in homebrew)\n\n## References:\n- RISC-V From Scratch blog post: https://twilco.github.io/riscv-from-scratch/2019/04/27/riscv-from-scratch-2.html\n- Everythng You Want to Know About Linker Scripts: https://mcyoung.xyz/2021/06/01/linker-script/#fn:not-main\n- 16550 UART Documentation: https://www.ti.com/lit/ds/symlink/tl16c550d.pdf\n- QEMU virt machine description: https://www.qemu.org/docs/master/system/riscv/virt.html\n- QEMU GDB usage: https://www.qemu.org/docs/master/system/gdb.html\n- QEMU full boot process: https://popovicu.com/posts/risc-v-sbi-and-full-boot-process/\n- FreeRTOS debug example: https://github.com/FreeRTOS/FreeRTOS/tree/main/FreeRTOS/Demo/CORTEX_MPS2_QEMU_IAR_GCC\n\n## Running:\n`make debug` for GDB client\nor\nrun `Debug RISC-V` from VSCode debug menu","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchuckb%2Friscv-helloworld-c","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchuckb%2Friscv-helloworld-c","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchuckb%2Friscv-helloworld-c/lists"}