Repository navigation
Node simulation
English · Italiano
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.
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.
- Download the zip above.
- Extract it. It contains a folder
mingw32. - Move that folder next to
BUSMASTER.exeand rename itMinGW, 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.
- Open Node Simulation, add a node and create a new
.cppfile (or open an existing one). - Write the handlers in the function editor.
- Build (or Build and Load). The output window shows the result of the compiler.
- 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.
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.
BUSMASTER-NG · community fork of BUSMASTER (ETAS / Bosch), LGPL v3 · not affiliated with ETAS GmbH or Robert Bosch GmbH · Something wrong or out of date on this page? / Qualcosa di sbagliato o non aggiornato? Open an issue