Skip to main content
Firmware Stable

Changes between SWTools 3.x and 4.0

SWTools 4.0 is multiplatform: it runs on Windows 10 and newer, macOS 13 and newer, and Linux (glibc 2.35 or newer, e.g. Ubuntu 22.04).

Most of the changes concern configuration and installation. The main applications keep their names and usage.

warning

SWTools 3.x and 4.0 are not meant to be installed side by side. The 4.0 installer removes all previous versions, including the SWTools 3.x USB driver (LibUSB/WinUSB, installed by SWTools 3.x). Nothing is migrated from the SWTools 3.x settings, set up the connection again after the upgrade. See Upgrade and downgrade.

Who has to act​

You have to check your setup before upgrading if you:

  • run your own scripts or batch files (renamed tools, removed wrappers, changed return codes, term script behaviour),
  • use a production line or a test bench built on SWTools 3.x,
  • use the emGUI HTTP REST API (removed, replaced by the SXAPI WebSocket),
  • use the Python plugins siliTune, siliSpin or siliWatch (deprecated and Windows only),
  • call srm, or use interface umsg, fwd or dmsg by name.

In brief​

Platforms and installation​

  • Platforms. Windows, macOS and Linux. The supported interfaces differ per platform, see Interface libraries. On Linux ARM only the lite version (command line applications, no GUI) is available now. midip is Windows only.

  • Installation structure is full changed, and response usage on each supported system. All application executables are in one folder (./swtools/bin/ on Windows and Linux, and ./SWTools.app/Contents/MacOS/ on macOS). All searching for others tools, libraries and configuration files is relative to the installation folder, so the system path is not needed.

  • Version numbers. SWTools 4 uses three numbers, x.y.z (for example 4.0.0). The fourth number of SWTools 3.x (3.3.2.25) is gone. Always quote the full version number when reporting a problem.

  • USB driver. On Windows, SWTools 4.0 uses the Microsoft WinUSB driver with its own driver package, which is different from, and cannot be combined with, the SWTools 3.x driver. See USB.

Settings and tools​

  • No Windows Registry. SWTools 3.x used the Windows Registry and environment variables; SWTools 4.0 uses configuration files and environment variables, together with command line parameters. See Configuration.

  • Settings are not migrated. The configuration is completely different. Set the connection again in launchpad (Options).

  • Working folder. CLI applications use the current folder. GUI applications use ~/Documents/silixcon by default (SWTools 3.x: C:\silixcon). See Working folder.

  • Wrappers and helper scripts are removed. The scripts storeconn, loadconn, resetconn and the wrappers such as term.cmd no longer exist. The tools are started directly. Use swtset, the configuration file or command line parameters instead.

  • Common command line parameters. All main tools use the same parameters to set up communication with devices, and a tool launched from another tool inherits its configuration. Applications support long options; short options are kept for compatibility.

  • Some interface names are changed, interface name is libraries file name without the extension. Some interface names are changed, for example umsg to serial, fwd to msg_fwd. Usually only the name is needed to select one; a full path is also accepted, but needed only for advanced use. See Interfaces.

  • Protocol configuration file. The format and location have changed.

Applications​

  • srm is renamed to bl_srm. This is the CLI application for firmware updates.

  • launchpad is reworked, and the new GUI application SRM Device Updater updates device firmware.

  • term: term SCRIPT and term --script=SCRIPT now behave differently. The first runs SCRIPT and then continues in interactive mode; the second runs SCRIPT and then exits. Scripts are edited with Shift+Fn; the previous Alt+Fn keys are dropped.

  • yosctl: some parameters have changed slightly. Most notably, a dash (-) replaces the file name to use stdin or stdout.

  • emGUI menus. Interface and Options/Authentication are moved under Connection. The new "AI assistants" (MCP server) and "Web apps" (SXAPI WebSocket) menu sets. The diagnostic report is available also from the device menu, and Open docs opens the documentation of the selected variable. See emGUI.

  • HTTP REST API of emGUI is removed. It is replaced by the SXAPI WebSocket. Applications that use the REST API must be ported.

  • Python plugins (siliTune, siliSpin, siliWatch) are deprecated, work on Windows only and are not developed further. The web application siliDash replaces them.

Scripts and automation​

  • Return values. CLI applications return zero on success and a small positive number on error. Negative return values are no longer used, which matters for scripts.

  • UTF-8. File names and paths are handled internally as UTF-8, all chars and spaces are allowed in paths and file names.

Upgrade and downgrade​

  • The SWTools 4.0 installer uninstalls all previous versions and always removes the old siliXcon USB driver of SWTools 3.x from the Windows driver store (see USB). The SWTools 4.0 uninstaller asks whether to remove the siliXcon USB driver of SWTools 4.0 too.

  • Installing SWTools 3.x and 4.0 together is not advised. The USB drivers are in direct conflict, simultaneous access of both versions to one device cannot be controlled, and the PATH setting may cause problems.

  • To go back to SWTools 3.x, uninstall SWTools 4.0 first and then install SWTools 3.x. The SWTools 3.x installer always installs its own USB driver, even if the SWTools 4.0 USB driver was kept at the uninstall. No settings are transferred.

  • Do not upgrade a production line or a test bench without preparation.

Added​

  • New SXAPI WebSocket protocol in emGUI, used mainly by the interactive documentation.
  • An AI agent interface (MCP server) in emGUI, include emgui-mcp tool. AI agents can read device states, search the documentation and follow playbooks.
  • Service token authentication as an alternative way to log in to a device.
  • cliscope, a CLI version of the scope application, for logging real-time process data.

Configuration​

SWTools is configured with configuration files, environment variables and command line parameters. The configuration file has the lowest priority and command line parameters have the highest. A tool started from another tool starts with the same configuration as its parent.

The configuration file is searched for in the following folders, and only the first file found is used:

  1. the current folder,
  2. the user's configuration folder in the home folder,
  3. the SWTools installation folder.

Set the debug level to 5 or higher to display the searched paths.

A different configuration file can be selected with --config-file. The value is either a path (absolute or relative) or just a file name, which is then searched for in the same folders as the default configuration file.

The configuration file can be created and edited in launchpad, in the "Options..." dialog; click "Advanced" for more options. To edit the file by hand, start from the distributed one, which documents every setting.

Working folder​

CLI applications always use the current folder as the working folder.

GUI applications aim to behave like CLI applications launched from a terminal, but system and platform differences apply. Unless options say otherwise, a GUI application chooses its working folder as follows:

  • If the current folder contains a configuration file, or a configuration file is given with a path (--config-file with_path), the current folder is used.

  • On POSIX systems only: if the application is launched from a terminal (stderr is a tty), the current folder is used.

  • Otherwise, the gui/work_dir setting from the default user or system configuration file is used.

  • If gui/work_dir is not set, the silixcon folder in the user's documents folder is used.

Notes for CLI applications​

CLI applications look for the configuration file in the current folder first, so you can keep a separate folder, with its own configuration file, for each project.

To change the configuration temporarily for the current session, use swtset. It sets and displays environment variables for the current session. On Windows, swtset is a CMD script, so only CMD is supported. On other platforms, it is a POSIX shell alias created by calling swtools_setup_shell.sh, usually from .profile.

For a fully configured terminal, use the "Command prompt"/"Terminal" button in launchpad. It opens a terminal emulator (Command Prompt on Windows) with the same configuration as launchpad, and with PATH and the SWTools environment variables set.

Interface libraries​

Interface libraries are platform-specific libraries for communication with devices. The supported interfaces on each platform are:

  • Windows: bt, kvaser, msg_dmsg, msg_fwd, pcan, serial, udp, usb.
  • macOS: serial, usb, pcan3, kvaser3.
  • Linux: serial, sckcan, usb.

USB​

The USB interface uses the libusb-1.0 library.

On Windows, the siliXcon USB device uses the Microsoft WinUSB driver, which is part of Windows. The SWTools installer adds a signed driver package (INF and CAT files) that binds the device to WinUSB. No driver is needed on macOS and Linux.

warning

The USB driver in SWTools 4.0 differs from, and is incompatible with, the USB driver in SWTools 3.x. SWTools 3.x installed a LibUSB/WinUSB driver for the same device. The SWTools 4.0 installer always removes every driver package for the siliXcon USB device (VID_16D0&PID_0A37) from the Windows driver store before it installs its own, including a driver installed by hand (for example with Zadig).

Examples​

Show the configuration in use​

To show every configuration parameter the applications actually use, without connecting to a device, run:

$ yosctl -z5 if info

Select the interface and target address​

There are several ways to make term use the USB interface library and target address 1:

  • Configuration file, for permanent settings. Edit swtools.ini, the default configuration file, in the current folder. The minimal content is:

    [general]
    if_name = "usb"

    [if.usb]
    target_address = "1"

    Then run term without parameters; it uses the configuration file in the current folder:

    $ term
  • Environment variables, for temporary settings in the current session:

    $ swtset --interface-name usb --target-address 1
    $ # term without parameters uses the environment variables.
    $ term
  • Long options, for a single run and for scripts. Long options are clearer than short ones, which makes them the better choice for scripts:

    $ term --interface-name usb --target-address 1
  • Short options, the same as above but shorter to type:

    $ term -i usb -a 1