Description
Ethos is a VSCode extension that provides Ethos firmware simulation.
Features
- Start Ethos
- Stop Ethos
- Open display
- Open telemetry
- Open controls
- Redirect logs to a file
- Simulator's persistent directory isolation
- Status Bar to set or add a new simulator
- Status Bar shows the current simulator
- Optional Quick Pick menu to launch tasks or commands
Installing
This extension is available for free in the Visual Studio Code Marketplace
On first run in a new project, or if the status bar does not appear, run from the command palette Ethos: Set Simulator to select a simulator or add a new one.
Breaking changes
ethos.root, ethos.firmware and ethos.version are not used anymore.
ethos.simulatorsFolder is by default simulators and is the workspace folder where all simulators are stored.
- all persistent data for a simulator is stored in its own folder under
ethos.simulatorsFolder. The folder is named ${board}_${protocol}@${release} and is not configurable to ensure isolation.
ethos.board,ethos.protocol and ethos.release are the three required fields to define a simulator. Ethos: Set Simulator will set them for you when you click on the status bar.
Status Bar customization
Like for all Status Bar in VSCode, you can hide it using a right click.
You can customize the text shown in the status bar by setting ethos.statusBarText, default is $(radio-tower) ${board}_${protocol}${releaseTag}
You can use the following variables in the status bar text: board, protocol, release and releaseTag (releaseTag is shorter as it skips @nightly26). You can also use any VSCode icon using the syntax $(icon-name), e.g. $(radio-tower), emoji are also supported.
The main customization is to show a quick pick menu when clicking on the status bar, which is defined in .vscode/ethos-menu.json (see below).
Create .vscode/ethos-menu.json to define a custom quick pick shown when clicking the status bar. The placeholder shows the currently active simulator.
Each item supports the following fields:
| Field |
Type |
Description |
label |
string |
Display text (supports VS Code icon syntax, e.g. $(debug-start)) |
description |
string |
Optional secondary text shown next to the label |
command |
string \| string[] |
VS Code command ID(s) to execute sequentially |
task |
string |
VS Code task label to run (single task only) |
separator |
boolean |
If true, renders a separator line |
[
{
"label": "▶️ Start SIM",
"command": "ethos.start"
},
{
"label": "🛑 Stop SIM",
"command": "ethos.stop"
},
{
"label": "🆑 Clear Logfile",
"command": ["ethos.clearLogfile", "ethos.showMenu"]
},
{ "label": "", "separator": true },
{
"label": "🎛️ Open Controls",
"command": "ethos.openControls"
},
{
"label": "📡 Open Telemetry",
"command": "ethos.openTelemetry"
},
{
"label": "🖥️ Open Display",
"command": "ethos.openDisplay"
},
{ "label": "", "separator": true },
{
"label": "⚙️ Change SIM",
"command": ["ethos.setSimulator", "ethos.showMenu"]
}
]
[!NOTE]
If you want to use a task defined in tasks.json, use this format with the task field instead of command.
[
{
"label": "$(debug-start)Deploy & Launch SIM",
"task": "Deploy & Launch [SIM]"
}
]