Skip to content

Node simulation

bigt92 edited this page Oct 28, 2026 · 1 revision

English · Italiano

Node simulation

With node simulation you write the behaviour of one or more ECUs in C/C++ (handlers: when a message arrives, when a key is pressed, every n milliseconds, ...). BUSMASTER-NG compiles them into a DLL and runs them on the bus, also with the Simulation driver.

CAN → Simulation Windows → Node Simulation (the same for J1939 and LIN).

This page applies to BUSMASTER-NG 3.4.0 and later: the 3.3.0 package lacked the files needed to build nodes.

What you need: MinGW (GCC for Windows, 32 bit)

BUSMASTER-NG uses the free GCC compiler of MinGW to build nodes. It is not included, because it is large.

  • Tested version: WinLibs GCC 16.2.0, 32 bit, MSVCRT, file winlibs-i686-posix-dwarf-gcc-16.2.0-mingw-w64msvcrt-14.0.0-r2.zip (about 270 MB).
  • It must be the 32-bit version (i686): BUSMASTER-NG is a 32-bit program and cannot load 64-bit DLLs.

Install it (no setup program)

  1. Download the zip above.
  2. Extract it. It contains a folder mingw32.
  3. Move that folder next to BUSMASTER.exe and rename it MinGW, so that you have ...\BUSMASTER-NG\MinGW\bin\g++.exe.

BUSMASTER-NG finds it there by itself. Alternatively you can put MinGW anywhere and add its bin folder to the PATH of Windows.

Build and run a node

  1. Open Node Simulation, add a node and create a new .cpp file (or open an existing one).
  2. Write the handlers in the function editor.
  3. Build (or Build and Load). The output window shows the result of the compiler.
  4. Connect: the node runs.

Nodes written for older BUSMASTER versions are converted when you open them. Nodes built with another compiler must be built again with MinGW 32 bit.

When something is missing

The output window says what is missing before calling the compiler:

Message What to do
MinGW (the GCC compiler for Windows, 32 bit) was not found Install MinGW as above
Node simulation files of BUSMASTER-NG are missing in ... The BUSMASTER-NG folder is incomplete: extract the zip again
Compiler errors (error: ...) They refer to your code: the line is in the message

Report problems with a node in an issue, with the version of MinGW (g++ --version) and, if you can, a small node that shows the problem.

Clone this wiki locally