-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Started
github-actions[bot] edited this page May 14, 2026
·
1 revision
| Requirement | Version |
|---|---|
| Node.js | ≥ 22 |
| Renode | any recent version (tested on 1.16.1) |
| .NET SDK | 8 — only needed to re-extract peripherals from a new Renode build |
npm install @typenode/core @typenode/peripherals @typenode/cli @typenode/runtimeOr as a dev dependency if you only use TypeNode for tests:
npm install --save-dev @typenode/core @typenode/peripherals @typenode/cli @typenode/runtime @typenode/vitestTypeNode needs to find the renode binary. It checks in order:
-
TYPENODE_RENODEenvironment variable PATH
If Renode is not on your PATH, set the env var:
export TYPENODE_RENODE=/opt/renode/renodeOr in your shell profile / .env.
Create machine.ts:
import { defineMachine } from "@typenode/core";
import { Peripherals } from "@typenode/peripherals";
export default defineMachine({
name: "my-board",
peripherals: {
cpu: Peripherals.CPU.cortexM({ cpuType: "cortex-m4", nvic: "nvic" }),
nvic: Peripherals.IRQControllers.NVIC({
$at: 0xe000e000,
priorityMask: 0xf0,
systickFrequency: 72_000_000,
connections: [{ from: "IRQ", to: "cpu@0" }],
}),
flash: Peripherals.Memory.mappedMemory({ $at: 0x08000000, size: 0x80000 }),
sram: Peripherals.Memory.mappedMemory({ $at: 0x20000000, size: 0x10000 }),
},
});Generate and launch:
npx typenode generate machine.ts # writes .typenode/my-board.repl + .resc
npx typenode run machine.ts # generate + open RenodeOutput files land in .typenode/ by default. Pass --out <dir> to change this.
export default defineMachine({
name: "my-board",
binaries: [{ path: "build/firmware.elf" }],
peripherals: { /* ... */ },
});The path is resolved relative to the machine file.
-
Defining Machines — full
defineMachine()reference - Peripherals — browse the 700+ typed peripherals
- Testing — write hardware-in-the-loop tests with Vitest