| @@ -1,12 +1,13 @@ |
| 1 | 1 | | # bench51 — an 8051 assembler, simulator & debugger |
| 2 | 2 | | |
| 3 | 3 | | [](https://github.com/krolyxon/bench51/actions/workflows/ci.yml) |
| 4 | | − | [](Cargo.toml) |
| 4 | + | [](https://github.com/krolyxon/bench51/releases/latest) |
| 5 | + | [](https://github.com/krolyxon/bench51/releases) |
| 5 | 6 | | [](https://github.com/krolyxon/bench51) |
| 6 | 7 | | [](crates) |
| 7 | 8 | | [](Cargo.toml) |
| 8 | 9 | | [](LICENSE) |
| 9 | | − | [](#usage) |
| 10 | + | [](#install) |
| 10 | 11 | | [](https://en.wikipedia.org/wiki/Intel_8051) |
| 11 | 12 | | [](https://github.com/emilk/egui) |
| 12 | 13 | | [](https://ratatui.rs) |
| @@ -88,32 +89,57 @@ Linux, in a window or right in the terminal. |
| 88 | 89 | | - **Dark and light themes** in a monochrome, dot-matrix design (Space |
| 89 | 90 | | Grotesk, Space Mono and Doto, bundled). |
| 90 | 91 | | |
| 91 | | − | ## Usage |
| 92 | + | ## Install |
| 93 | + | |
| 94 | + | Linux and macOS: |
| 92 | 95 | | |
| 93 | 96 | | ```bash |
| 94 | | − | cargo install --path crates/bench51-gui # installs `bench51-gui` |
| 97 | + | curl -fsSL https://raw.githubusercontent.com/krolyxon/bench51/master/install.sh | sh |
| 98 | + | ``` |
| 99 | + | |
| 100 | + | Windows (PowerShell): |
| 95 | 101 | | |
| 96 | | − | cargo run --release -p bench51-gui # welcome screen |
| 97 | | − | cargo run --release -p bench51-gui -- examples/*.asm # open several files |
| 98 | | − | cargo run --release -p bench51-gui -- firmware.hex # disassemble & debug a HEX file |
| 99 | | − | cargo run --release -p bench51-gui -- --theme light |
| 102 | + | ```powershell |
| 103 | + | irm https://raw.githubusercontent.com/krolyxon/bench51/master/install.ps1 | iex |
| 100 | 104 | | ``` |
| 101 | 105 | | |
| 102 | | − | `--theme system|dark|light` overrides the theme chosen in View → Theme, and |
| 103 | | − | `--clock <MHz>` the Xtal set in Project → Options for Target (default |
| 104 | | − | 11.0592), which is used for the elapsed-time display. |
| 106 | + | Both install `bench51-gui` and `bench51` from the |
| 107 | + | [latest release](https://github.com/krolyxon/bench51/releases/latest) and |
| 108 | + | verify the download against its SHA-256 checksum: |
| 105 | 109 | | |
| 106 | | − | On Linux it runs on Wayland and X11 and uses the XDG desktop portal for file |
| 107 | | − | dialogs. To add it to your application launcher: |
| 110 | + | - **Linux and macOS:** the binaries go into `~/.local/bin`, and on Linux the |
| 111 | + | app is added to your application menu. Options go after `sh -s --`: |
| 112 | + | `--version v0.2.0` pins a release, `--dir /usr/local/bin` picks another |
| 113 | + | directory, `--archive <file>` installs a downloaded archive offline |
| 114 | + | (handy on lab PCs), and `--uninstall` removes it. |
| 115 | + | - **Windows:** it installs to `%LOCALAPPDATA%\Programs\bench51`, adds that to |
| 116 | + | your PATH and adds a Start menu entry. `-Uninstall` removes it. |
| 117 | + | |
| 118 | + | Prebuilt binaries cover Linux (x86_64, aarch64), Windows (x86_64) and macOS |
| 119 | + | (Apple silicon, Intel). To build from source instead, with a Rust toolchain: |
| 108 | 120 | | |
| 109 | 121 | | ```bash |
| 110 | | − | install -Dm644 crates/bench51-gui/assets/bench51-gui.desktop ~/.local/share/applications/bench51-gui.desktop |
| 111 | | − | install -Dm644 crates/bench51-gui/assets/bench51-gui.svg ~/.local/share/icons/hicolor/scalable/apps/bench51-gui.svg |
| 122 | + | cargo install --locked --git https://github.com/krolyxon/bench51 bench51-gui # the desktop app |
| 123 | + | cargo install --locked --git https://github.com/krolyxon/bench51 bench51 # the terminal app |
| 112 | 124 | | ``` |
| 113 | 125 | | |
| 114 | | − | It also builds for Windows and macOS. On Debian or Ubuntu, first install the |
| 115 | | − | packages egui needs: `libxcb-render0-dev libxcb-shape0-dev |
| 116 | | − | libxcb-xfixes0-dev libxkbcommon-dev libssl-dev`. |
| 126 | + | ## Usage |
| 127 | + | |
| 128 | + | ```bash |
| 129 | + | bench51-gui # welcome screen |
| 130 | + | bench51-gui examples/*.asm # open several files |
| 131 | + | bench51-gui firmware.hex # disassemble & debug a HEX file |
| 132 | + | bench51-gui --theme light |
| 133 | + | ``` |
| 134 | + | |
| 135 | + | `--theme system|dark|light` overrides the theme chosen in View → Theme, and |
| 136 | + | `--clock <MHz>` the Xtal set in Project → Options for Target (default |
| 137 | + | 11.0592), which is used for the elapsed-time display. |
| 138 | + | |
| 139 | + | On Linux it runs on Wayland and X11 and uses the XDG desktop portal for file |
| 140 | + | dialogs. Building it from source on Debian or Ubuntu needs the packages egui |
| 141 | + | links against: `libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev |
| 142 | + | libxkbcommon-dev libssl-dev`. |
| 117 | 143 | | |
| 118 | 144 | | ## Keys |
| 119 | 145 | | |
| @@ -168,15 +194,13 @@ Makefiles. |
| 168 | 194 | | </table> |
| 169 | 195 | | |
| 170 | 196 | | ```bash |
| 171 | | − | cargo install --path . # installs the `bench51` binary |
| 172 | | − | |
| 173 | | − | cargo run --release -- examples/serial_hello.asm # open in the TUI |
| 174 | | − | cargo run --release # start with a template |
| 175 | | − | cargo run --release -- firmware.hex # disassemble & debug a HEX file |
| 197 | + | bench51 examples/serial_hello.asm # open in the TUI |
| 198 | + | bench51 # start with a template |
| 199 | + | bench51 firmware.hex # disassemble & debug a HEX file |
| 176 | 200 | | |
| 177 | 201 | | # Headless assembly: writes prog.hex and prog.lst |
| 178 | | − | cargo run --release -- --assemble prog.asm |
| 179 | | − | cargo run --release -- --assemble prog.asm -o out.hex --lst out.lst |
| 202 | + | bench51 --assemble prog.asm |
| 203 | + | bench51 --assemble prog.asm -o out.hex --lst out.lst |
| 180 | 204 | | ``` |
| 181 | 205 | | |
| 182 | 206 | | `--clock <MHz>` sets the oscillator frequency used for the elapsed-time display |
| @@ -235,10 +259,24 @@ Letter shortcuts work too, for terminals that swallow function keys: |
| 235 | 259 | | ## Development |
| 236 | 260 | | |
| 237 | 261 | | ```bash |
| 238 | | − | cargo test --workspace # assembler, CPU, peripheral, session and example-program tests |
| 262 | + | cargo run --release -p bench51-gui # the desktop app |
| 263 | + | cargo run --release -p bench51 # the terminal app |
| 264 | + | cargo test --workspace # assembler, CPU, peripheral, session and example-program tests |
| 239 | 265 | | cargo clippy --workspace --all-targets |
| 240 | 266 | | ``` |
| 241 | 267 | | |
| 268 | + | Releasing: bump `version` in `Cargo.toml`, add a section to |
| 269 | + | [CHANGELOG.md](CHANGELOG.md), merge, then tag and push: |
| 270 | + | |
| 271 | + | ```bash |
| 272 | + | git tag v0.3.0 && git push origin v0.3.0 |
| 273 | + | ``` |
| 274 | + | |
| 275 | + | The release workflow checks that the tag matches `Cargo.toml` and builds |
| 276 | + | every target. It publishes the archives and `SHA256SUMS` with that |
| 277 | + | changelog section as the release notes, then installs the result with the |
| 278 | + | one-liners on Linux, macOS and Windows. |
| 279 | + | |
| 242 | 280 | | Code layout: |
| 243 | 281 | | |
| 244 | 282 | | - `crates/bench51-gui/` is the `bench51-gui` desktop app (egui). |