Skip to content

Running E4thCom on Windows 10

sbridger edited this page Sep 13, 2018 · 13 revisions

Win10-64bit has built-in Linux subsystem (WSL).

Currently does not work as 64bit version of e4thcom is required (not released yet). 32 bit version reports "cannot execute binary file: Exec format error". to see info about the binary: file e4thcom-0.6.3

  • Install Windows System for Linux (WSL) from control panel->programs->features.
  • Install a linux distribution from the windows store. (WSL does not actually include linux). I have used Debian for this.
  • you can download E4thcom in windows or directly in linux (see below
  • win+R bash to start bash
  • tar -zxvf /mnt/c/users/????/????/e4thcom-0.6.3.tar.gz
  • cd e4thcom-0.6.3
  • ./e4thcom-0.6.3
  • Port has same com number in linux as windows.
  • Your windows drive is /mnt/c/ (lowercase)

start from windows with a shortcut "wsl ?????

  #update Debian after first install from windows store
    sudo apt-get update
    #sudo apt-get dist-upgrade

  # Install directly from the internet 64 bit binary needed.
   wget --no-check-certificate https://wiki.forth-ev.de/lib/exe/fetch.php/projects:e4thcom:e4thcom-0.6.3.tar.gz
   mv projects\:e4thcom\:e4thcom-0.6.3.tar.gz e4thcom-0.6.3.tgz
   tar -xzf e4thcom-0.6.3.tgz
  #Installing from file downloaded to windows.
   tar -zxvf /mnt/c/users/????/????/e4thcom-0.6.3.tar.gz

   cd e4thcom-0.6.3
   file e4thcom-0.6.3  #check that you have 64 bit version installed
   
   sudo ./e4thcom-0.6.3 -t stm8ef -d ttyS5 -b B9600   #comport number is the same as windows
   
   sudo chmod 666 /dev/ttyS5    #give permissions to port so don't have to sudo
   ./e4thcom-0.6.3 -t stm8ef -d ttyS5 -b B9600

To test the serial interface in Windows use Realterm. Recent versions will show info about usb serial ports when they are plugged in.

In linux the comport will have the same number as in windows. COM5 will be /dev/ttyS5. About WSL Serial Ports

To test that the serial port is working in Linux, install PICOCOM. To exit picocom ctrl+a x

   sudo apt-get install picocom
   sudo picocom /dev/ttyS5


Trying to make 32bit version work

Currently does not work as 64bit version of e4thcom is required. reports "cannot execute binary file: Exec format error". to see info about the binary: file e4thcom-0.6.3

WSL Serial Ports

    1  sudo apt-get update
    2  sudo apt-get upgrade
    3  sudo apt-get install qemu-user-static
  33  sudo update-binfmts --install i386 /usr/bin/qemu-i386-static --magic '\x7fELF\x01\x01\x01\x03\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00\x03\x00\x01\x00\x00\x00' --mask '\xff\xff\xff\xff\xff\xff\xff\xfc\xff\xff\xff\xff\xff\xff\xff\xff\xf8\xff\xff\xff\xff\xff\xff\xff'
    4  sudo service binfmt-support start
    5  sudo dpkg --add-architecture i386
    6  sudo apt-get update
 
  42  sudo apt-get install gcc:i386
   26  sudo apt-get install file
   16  wget --no-check-certificate https://wiki.forth-ev.de/lib/exe/fetch.php/projects:e4thcom:e4thcom-0.6.3.tar.gz
   19  mv projects\:e4thcom\:e4thcom-0.6.3.tar.gz e4thcom-0.6.3.tgz
   20  tar -xzf e4thcom-0.6.3.tgz
   22  cd e4thcom-0.6.3
   27  file e4thcom-0.6.3
   48  sudo ./e4thcom-0.6.3 -t stm8ef -d ttyS5

So far so good - e4thcom works but the Serial interface (COM5 doesn't): To exit picocom ctrl+a x

   sudo apt-get install picocom
   picocom
   picocom /dev/ttyS5

A suggested work around for running 32bit (i386) Linux binaries is described here).

sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get dist-upgrade

sudo apt-get install g++-multilib
sudo apt-get install libncurses5:i386
sudo apt-get install libc6:i386 libgcc1:i386 gcc-4.8-base:i386 libstdc++5:i386 libstdc++6:i386
sudo apt-get install lib32z1 lib32ncurses5 lib32ncursesw5 lib32ncursesw5-dev 

To use it I had to install Debian. Sadly didn't work - still reports "cannot execute binary file: Exec format error".

Oddly maybe it is running su:

  sudo ./e4thcom-0.6.3
  ./e4thcom-0.6.3: 1: ./e4thcom-0.6.3: Syntax error: word unexpected (expecting ")")
Clone this wiki locally