View unanswered posts | View active topics It is currently Wed Jun 26, 2019 3:43 pm



Reply to topic  [ 5 posts ] 
Unofficial FreeEMS support applications build manifesto 
Author Message
LQFP144 - On Top Of The Game
User avatar

Joined: Tue Jan 03, 2012 8:37 pm
Posts: 463
Location: Manhattan, KS. USA
This is my "Unofficial FreeEMS support applications build manifesto" post. Don't use this any of this to compile your own. Refer to the precompiled binaries already available.

Some of these aren't even in use anymore, don't function properly once built, and/or don't interact with the current firmware properly.

This temporarily exists so I can dump all of my notes in one out-of-the-way place that can be easily edited while also being visible for review and generating issues.



EMSTune/EMStudio (ECU tuner)

  • Linux: (Ubuntu 14.04, 64-bit)
    • Open a terminal window
      • sudo apt-get update
      • sudo apt-get install git build-essential libqt4-dev libqt4-opengl-dev qt4-qmake libqwt-dev libqt4-declarative libqjson-dev freeglut3-dev
      • sudo apt-get clean
      • mkdir $HOME/dev
      • cd $HOME/dev/
      • git clone https://github.com/malcom2073/emstune
      • cd emstune/
        • git checkout origin/dev
        • qmake
        • make
        • sudo make install
    • To run, type emstudio at a terminal prompt and hit enter


  • Windows: (32-bit build on Windows 7 SP1, 64-bit) - This was done some months ago and needs to be reviewed, but should still work.
    • Install Git and enable unix utilities on the command line
    • Install the 2013.10.26 build of MinGW and choose everything except ADA & Fortran
    • Install 32-bit Qt, version 4.8.6
    • Install CMake 2.8.12 and choose to "Add CMake to the system PATH for all users"
    • Download QJSON from GitHub.
      • NOTE: For both QJSON and QWT, their exact destination path is in each project's .pro files. Library and header include paths can be found in emstudio\core\core.pro and emstudio\plugin\freeems\freeems.pro files.
    • To compile QJSON, open the “Qt Command Prompt”, go to the top level directory for QJSON’s sources and type:
      • mkdir build
      • cd build
      • "C:\Program Files (x86)\CMake 2.8\bin\cmake" -G "MinGW Makefiles" ..
      • mingw32-make
      • mingw32-make install
      • copy build\src\libqjson.dll* C:\libs\qjson\lib\
      • copy build\src\*.h c:\libs\qjson\include\qjson\
    • To compile QWT, download version 6.x via SVN:
    • Add the MSYS Git bin dir to your PATH:
      • set PATH=%PATH%;C:\Program Files (x86)\Git\bin
    • Download the latest development code from mikesshop.net/EMStudio/ and place in a location where there are NO spaces in the path (ie. C:\emstudio). At the top level, type:
      • qmake -r
      • make release (never use qmake -P or qmake -p; for debug mode, just type "make")
    • The compile should complete successfully (if not, download "Dependency Walker" and inspect as necessary). To manually create an executable environment, create a folder called "EMStudio" and copy/add the following contents:
        EMStudio\dashboards < C:\emstudio\core\src\gauges.qml
        EMStudio\definitions < C:\emstudio\core\decodersettings.json
        EMStudio\definitions < C:\emstudio\core\freeems.config.json
        EMStudio < C:\emstudio\core\plugins
        EMStudio < C:\emstudio\core\wizards
        EMStudio < C:\emstudio\core\debug\emstudio.exe
        EMStudio < C:\Qt\4.8.6\bin\libgcc_s_dw2-1.dll(* - Replaces older QT4 release: libgcc_s_sjlj-1.dll)
        EMStudio < C:\Qt\4.8.6\bin\libstdc++-6.dll
        EMStudio < C:\Qt\4.8.6\bin\libwinpthread-1.dll
        EMStudio < C:\libs\qjson\lib\qjson\libqjson.dll(* - Linux generated build uses "qjson.dll" name)
        EMStudio < C:\Qt\4.8.6\bin\QtCore4.dll
        EMStudio < C:\Qt\4.8.6\bin\QtDeclarative4.dll
        EMStudio < C:\Qt\4.8.6\bin\QtGui4.dll
        EMStudio < C:\Qt\4.8.6\bin\QtNetwork4.dll
        EMStudio < C:\Qt\4.8.6\bin\QtOpenGL4.dll
        EMStudio < C:\Qt\4.8.6\bin\QtScript4.dll
        EMStudio < C:\Qt\4.8.6\bin\QtSql4.dll
        EMStudio < C:\Qt\4.8.6\bin\QtSvg4.dll
        EMStudio < C:\Qt\4.8.6\bin\QtXml4.dll
        EMStudio < C:\Qt\4.8.6\bin\QtXmlPatterns4.dll
        EMStudio < C:\libs\qwt\lib\qwt.dll
    • For debug builds, also add the following:
        EMStudio < C:\Qt\4.8.6\bin\QtCored4.dll
        EMStudio < C:\Qt\4.8.6\bin\QtDeclaratived4.dll
        EMStudio < C:\Qt\4.8.6\bin\QtGuid4.dll
        EMStudio < C:\Qt\4.8.6\bin\QtNetwork4.dll
        EMStudio < C:\Qt\4.8.6\bin\QtOpenGLd4.dll
        EMStudio < C:\Qt\4.8.6\bin\QtScriptd4.dll
        EMStudio < C:\Qt\4.8.6\bin\QtSqld4.dll
        EMStudio < C:\Qt\4.8.6\bin\QtSvgd4.dll
        EMStudio < C:\Qt\4.8.6\bin\QtXmlPatternsd4.dll
        EMStudio < C:\libs\qwt\lib\qwtd.dll
    • NOTE: Even though this is a static build, MinGW generates both freeemsplugin.dll and a 3K libfreeemsplugin.a linker definition file in EMStudio's plugins directory. To function as intended, the entire library should be written into the latter. Until this problem is understood, the only way to test an EMStudio Windows build is to type the following on a command line in the EMStudio root directory:
      • emstudio -p plugins/freeemsplugin.dll


  • MacOS: (Yosemite/10.10, 64-bit)
    • Install Xcode
      • NOTE: Command Line Tools and Git are now available by default
    • Install MacPorts
    • Open Terminal
      • sudo port selfupdate
      • sudo port install qt4-mac qjson qwt60
      • mkdir $HOME/dev
      • cd $HOME/dev/
      • git clone https://github.com/malcom2073/emstune
      • cd emstune/
        • git checkout origin/dev
        • In lib/core/core.pro, core/core.pro, and plugins/freeems/freeems.pro, change all QMAKE_LFLAGS from -static-libgcc -static-libstdc++ to -stdlib=libgcc -stdlib=libstdc++
          • NOTE: FAILS on unsupported clang option '-static-libgcc'. GCC on Mac OS is really Clang and therefore doesn't support all GCC flags.
        • Edit core/core.pro and add -Wno-deprecated to the end of CXXFLAGS
          • NOTE: gluPerspective is deprecated and should be fixed rather than ignored
        • qmake
        • make
    • For reasons that are not yet clear, EMStudio won't run naturally due to problems loading the FreeEMS plugin. It can be run from the command line manually, however:
      • cd $HOME/dev/emstune/core/
      • ./emstudio.app/Contents/MacOS/emstudio -p plugins/libfreeemsplugi.dylib



OpenLogViewer (ECU log viewer) - Last reviewed Dec 2014

  • Linux: (Ubuntu 14.04, 64-bit)
    • Open a terminal window
      • sudo add-apt-repository ppa:webupd8team/java
      • sudo apt-get update
      • sudo apt-get install git maven oracle-java8-installer
      • sudo apt-get clean
      • mkdir $HOME/bin
      • mkdir $HOME/dev
      • cd $HOME/dev/
      • git clone https://github.com/FreeEMS/OpenLogViewer
      • cd $HOME/dev/OpenLogViewer/
        • mvn clean
        • cp settings.xml ~/.m2
        • mvn -DskipTests
        • mv target/OpenLogViewer-0.0.3-SNAPSHOT-bin.jar $HOME/bin
          • NOTE: I'm not sure why both OpenLogViewer-0.0.3-SNAPSHOT-bin.jar and OpenLogViewer-0.0.3-SNAPSHOT.jar exist in the target dir, but -bin has the larger filesize and is the last showing build activity in the terminal scrollback. Both launch on demand. The docs are out of date and only refer to a nonexistent OLV.jar.
    • To run, type java -jar $HOME/bin/OpenLogViewer-0.0.3-SNAPSHOT-bin.jar at a terminal prompt and hit enter

  • Windows: (Windows 7 SP1, 64-bit)
    • Download Apache Maven as a ZIP archive and uncompress in %USERPROFILE%\\dev
    • Install Java SE JDK
    • Install Git and enable unix utilities on the command line
    • Open the Git Bash application
      • mkdir $HOME/dev
      • cd $HOME/dev/
      • git clone https://github.com/FreeEMS/OpenLogViewer
      • cd $HOME/dev/
        • cmd
        • set JAVA_HOME=C:\Progra~1\Java\jdk1.8.0_25\
        • set M2_HOME=%USERPROFILE%\\dev\apache-maven-3.2.3\
          • NOTE: Keep in mind that the JAVA and Maven versions will depend on the release that was installed
        • cd %USERPROFILE%\\dev\OpenLogViewer
          • %M2_HOME%\\bin\mvn clean
          • cp settings.xml %USERPROFILE%\\.m2\
          • %M2_HOME%\\bin\mvn -DskipTests
          • copy target\OpenLogViewer-0.0.3-SNAPSHOT-bin.jar %USERPROFILE%\\bin\
            • NOTE: I'm not sure why both OpenLogViewer-0.0.3-SNAPSHOT-bin.jar and OpenLogViewer-0.0.3-SNAPSHOT.jar exist in the target dir, but -bin has the larger filesize and is the last showing build activity in the terminal scrollback. Both launch on demand. The docs are out of date and only refer to a nonexistent OLV.jar.
    • Go to %USERPROFILE%\\bin\ (usually: Windows menu, username, bin) and double-click OpenLogViewer-0.0.3-SNAPSHOT-bin.jar

  • MacOS: (Yosemite/10.10, 64-bit)
    • Download Apache Maven as a ZIP archive and put the uncompressed folder in Applications
    • Install Xcode
      • NOTE: Command Line Tools and Git are now available by default
    • Install Java SE JDK
    • Open Terminal
      • mkdir $HOME/dev
      • cd $HOME/dev/
      • git clone https://github.com/FreeEMS/OpenLogViewer
      • export JAVA_HOME=`/usr/libexec/java_home -v 1.8`
      • export M2_HOME=/Applications/apache-maven-3.2.3
        • NOTE: Keep in mind that the JAVA and Maven versions will depend on the release that was installed
      • cd $HOME/dev/OpenLogViewer/
        • $M2_HOME/bin/mvn clean
        • cp settings.xml ~/.m2
        • $M2_HOME/bin/mvn -DskipTests
        • mv target/OpenLogViewer-0.0.3-SNAPSHOT-bin.jar /Applications/
          • NOTE: I'm not sure why both OpenLogViewer-0.0.3-SNAPSHOT-bin.jar and OpenLogViewer-0.0.3-SNAPSHOT.jar exist in the target dir, but -bin has the larger filesize and is the last showing build activity in the terminal scrollback. Both launch on demand. The docs are out of date and only refer to a nonexistent OLV.jar.
    • Go to Applications and double-click OpenLogViewer-0.0.3-SNAPSHOT-bin.jar



FreeEMS Loader (ECU firmware loader) - Last reviewed Dec 2014

  • Linux: (Ubuntu 14.04, 64-bit)
    • Open a terminal window
    • To run, type FreeEMS-Loader at a terminal prompt and hit enter

  • Windows: (32-bit build on Windows 7 SP1, 64-bit)
    • Install Git and enable unix utilities on the command line
    • Install the 2013.10.26 build of MinGW and choose everything except ADA & Fortran
    • Install 32-bit Qt, version 4.8.6
    • Open the Qt Command Prompt application
      • mkdir %USERPROFILE%\\bin\FreeEMS-Loader
      • mkdir %USERPROFILE%\\dev
      • cd %USERPROFILE%\\dev\
      • “C:\Program Files (x86)\GIT\bin\git.exe” clone https://github.com/toxicgumbo/FreeEMS-SerialIO
      • "C:\Program Files (x86)\GIT\bin\git.exe" clone https://github.com/FreeEMS/freeems-loader
      • cd %USERPROFILE%\\dev\FreeEMS-SerialIO\
        • qmake
        • Edit Makefile.Release (since the .pro file has no entry for win32 native) and at the end of LIBS, add: -lwsock32
          • NOTE: FAILS on undefined reference to WSAStartup@8 so we specify the Winsock lib earlier in the process
        • make release
        • copy %USERPROFILE%\\FreeEMS-SerialIO\build\release\SerialIO0.dll %USERPROFILE%\\bin\FreeEMS-Loader
          • NOTE: We do the above manually since there aren't an install arguments for win32
        • cd %USERPROFILE%\\dev\freeems-loader\
          • Edit FreeEMSLoader.pro and under QMAKE_POST_LINK, change touch to C:\MinGW\msys\1.0\bin\touch.exe
          • Edit FreeEMSLoader.pro and under "# Native Windows build", change INCLUDEPATH and LIBS, as follows, to pick up the SerialIO headers and libs we've created:
            • INCLUDEPATH *= "..\FreeEMS-SerialIO\src\inc\public"
            • LIBS += -L"%USERPROFILE%\\bin\FreeEMS-Loader" -L"..\FreeEMS-SerialIO\build\debug" -lSerialIO0
          • qmake
          • make release
          • move %USERPROFILE%\\freeems-loader\release\FreeEMS-Loader.exe %USERPROFILE%\\bin\FreeEMS-Loader\
      • copy %USERPROFILE%\\freeems-loader\build\debug\SerialIO0.dll %USERPROFILE%\\bin\FreeEMS-Loader\
      • copy C:\Qt\4.8.6\bin\QtCore4.dll %USERPROFILE%\\bin\FreeEMS-Loader\
      • copy C:\Qt\4.8.6\bin\QtCored4.dll %USERPROFILE%\\bin\FreeEMS-Loader\
      • copy C:\Qt\4.8.6\bin\QtGui4.dll %USERPROFILE%\\bin\FreeEMS-Loader\
      • copy C:\Qt\4.8.6\bin\QtGuid4.dll %USERPROFILE%\\bin\FreeEMS-Loader\
      • copy C:\Qt\4.8.6\bin\libwinpthread-1.dll %USERPROFILE%\\bin\FreeEMS-Loader\
    • Go to %USERPROFILE%\\bin\FreeEMS-Loader\ (usually: Windows menu, username, bin, FreeEMS-Loader) and double-click FreeEMS-Loader

  • MacOS: (Yosemite/10.10, 64-bit)
    • Install Xcode
      • NOTE: Command Line Tools and Git are now available by default
    • Install MacPorts
    • Open Terminal
      • sudo port selfupdate
      • sudo port install qt4-mac
      • mkdir $HOME/dev
      • cd $HOME/dev/
      • git clone https://github.com/toxicgumbo/FreeEMS-SerialIO
      • git clone https://github.com/FreeEMS/freeems-loader
      • cd $HOME/dev/FreeEMS-SerialIO/
        • qmake PREFIX=/opt/local
          • NOTE: We define the install location prefix since default is /usr/local/ and the Makefile for freeems-loader doesn't automatically assume this due to use of MacPorts (not to mention that this throws less clutter throughout the OS itself)
        • make
        • sudo make install
      • cd $HOME/dev/freeems-loader/
        • qmake
        • Edit $HOME/dev/freeems-loader/Makefile and append -Wno-unused-variable to the end of CXXFLAGS
          • NOTE: FAILS on unused variables in src/Types.cpp. Unused, yet declared, variables will throw errors and halt the compile, so we make the above change.
        • make
      • mv FreeEMS-Loader.app /Applications/
    • Go to Applications and double-click FreeEMS-Loader



MegaTunix (ECU tuner & firmware loader)

  • Linux: (Ubuntu 14.04, 64-bit)
    • Open a terminal window
      • sudo apt-get update
      • sudo apt-get install flex intltool autoconf automake libtool libglib-2.0-0 libgtk2.0-0 bison libgtkgl-2.0-dev glade-gtk2 g++ mesa-common-dev libglu1-mesa-dev
      • sudo apt-get clean
      • sudo ldconfig
      • mkdir $HOME/dev
      • cd $HOME/dev/
      • git clone https://github.com/djandruczyk/MegaTunix
      • cd MegaTunix/
        • ./autogen.sh
        • ./configure
        • make
        • sudo make install
        • sudo ldconfig
    • To run, type megatunix for (MegaTunix) or mtxloader (for the firmware loader) at a terminal prompt and hit enter

  • Windows: (Windows 7 SP1, 64-bit)
    • Install Git and enable unix utilities on the command line
    • Install the 2013.10.26 build of MinGW and choose everything except ADA & Fortran
    • Open the MinGW command line application (Start > Run > "C:\MinGW\msys\1.0\msys.bat")
    • To run,

  • MacOS: (Yosemite/10.10, 64-bit)
    • Install XQuartz
    • Install Xcode
      • NOTE: Command Line Tools and Git are now available by default
    • Install MacPorts
    • Open Terminal
      • sudo port selfupdate
      • sudo port install pkgconfig gtk2 gtkglarea2 libglade2 autoconf automake flex intltool
        • NOTE: This walkthrough shows how to build MegaTunix with a expectation of an XQuartz layer. It can conceivably be installed natively for Mac OS by combining "+no_x11 +quartz" with the above GTK packages, but gtkglarea2 currently dies a horrible death. This approach has worked in the past with older MacPorts dependencies.
      • mkdir $HOME/dev
      • cd $HOME/dev/
      • git clone https://github.com/djandruczyk/MegaTunix
      • cd $HOME/dev/MegaTunix
        • ./autogen.sh
        • ./configure
        • make
        • sudo make install
    • To run, type megatunix for (MegaTunix) or mtxloader (for the firmware loader) at a terminal prompt and hit enter



FreeEMS Build Tools (Firmware compiling environment)

  • Linux: (Ubuntu 14.04, 64-bit)

  • Windows: (Windows 7 SP1, 64-bit)

  • MacOS: (Yosemite/10.10, 64-bit)



FreeEMS Firmware (The firmware itself)

  • Linux: (Ubuntu 14.04, 64-bit)

  • Windows: (Windows 7 SP1, 64-bit)

  • MacOS: (Yosemite/10.10, 64-bit)

_________________
FreeEMS vehicle #23: 2003 Toyota "Toxic" Tacoma
Build page: http://forum.diyefi.org/viewtopic.php?f=3&t=1635)


Tue Dec 02, 2014 1:48 am
Profile
TO92 - Vaguely active

Joined: Sat Nov 01, 2014 4:00 pm
Posts: 2
Hi, my name is Qijun Tang. I am a visiting Ph.D student in McGill University in Canada. I am studying FreeEMS, and I make the platform according to your introduction (viewtopic.php?f=3&t=1635&p=39415&hilit=Compiling+on+Windows#p39415). However, it has some problems. Could you please give me your E-mail address, I will sent your the questions. Please so kind to help me. Thank you very much.


Sat Mar 28, 2015 3:07 am
Profile
TO92 - Vaguely active

Joined: Sat Nov 01, 2014 4:00 pm
Posts: 2
It has some problems in the process as follow.
install 'MegaTunix '
........
./autogen.sh
note
**Error**: You must have `autoconf' installed.
**Error**: You must have `intltoolize\' installed.
**Error**: You must have `libtool\' installed.
**Error**: You must have `glib' installed.
Please help me, thank you very much.
**Error**: You must have `automake' installed.


Sat Mar 28, 2015 3:20 am
Profile
Moderator
User avatar

Joined: Tue Jan 15, 2008 2:31 pm
Posts: 15273
Location: Home sweet home!
qijuntang wrote:
Hi, my name is Qijun Tang. I am a visiting Ph.D student in McGill University in Canada.

Hi Qijun, and welcome. Sorry for the delay approving your posts.

qijuntang wrote:
I am studying FreeEMS, and I make the platform according to your introduction (viewtopic.php?f=3&t=1635&p=39415&hilit=Compiling+on+Windows#p39415). However, it has some problems. Could you please give me your E-mail address, I will sent your the questions. Please so kind to help me. Thank you very much.

Bold emphasis mine. This is not how it's done in an open community. Please post your issues/questions here on the forum, and, as a group, we'll endeavour to solve/answer them. By doing it this way value is not lost to private conversations and is instead available to everyone for perpetuity.

Jeff, would you mind me splitting your post and these three out to a new thread in a different section?

Fred.

_________________
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!


Fri Apr 03, 2015 10:29 pm
Profile WWW
LQFP144 - On Top Of The Game
User avatar

Joined: Tue Jan 03, 2012 8:37 pm
Posts: 463
Location: Manhattan, KS. USA
By all means, please do!


-Jeff

_________________
FreeEMS vehicle #23: 2003 Toyota "Toxic" Tacoma
Build page: http://forum.diyefi.org/viewtopic.php?f=3&t=1635)


Fri Apr 03, 2015 10:45 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software for PTF. ColorizeIt.