Skip to content

yathxyz/ob-riscv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ob-riscv

Org Babel back-end for evaluating RISC-V assembly blocks from Org documents. The library assembles each block with a configurable cross toolchain and runs the result under Spike (optionally via the proxy kernel).

NB

GPT-5-Codex made all of this. Don't know what to feel about it. Quick org-babel setup for working with risc-v assembly for educational purposes.

Quick start

  • Place ob-riscv.el on your load-path and (require 'ob-riscv) in your init.
  • Ensure riscv64-unknown-elf-gcc, spike, and pk are available (customizable via the OB_RISCV_* env vars).
  • In Org buffers, use blocks like:
#+begin_src riscv :results output
  .section .text
  .globl _start
_start:
  li a0, 42
  li a7, 93   ; exit
  ecall
#+end_src

If you use Nix, run nix develop to enter the bundled dev shell with the required toolchain preconfigured. Preferably, just place use flake github:yathxyz/ob-riscv into .envrc if you use direnv.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors