USBDM  V4.12
Building USBDM Software.

Software Packages Needed

USBDM makes use of the following packages under WIN32:

  • To build applications:
    • Minimalist GNU for Windows (MinGW)
    • wxWidgets
    • TCL
    • Xerces-c
  • To build the Windows installer package (.msi file)
    • Windows Installer XML (WiX) toolset
    • MSI Installer SDK V4.5
  • To build Eclipse plugin-ins for Codewarrior 10.x
    • Java SDK
    • Codewarrior 10.x
  • To build firmware for BDMs
    • Codewarrior 10.2
  • To build documentation
    • Doxygen

Building Firmware.

The firmware for the HCS08 bdm is available as exported projects from Codewarrior 10.2. It should be straightforward to import these and rebuild them using Codewarrior.

  • Unzip the archive.
  • Select import existing projects in Codewarrior.

Building Applications under Windows.

To maintain portability between WIN32 and Linux I have chosen to use wxWidgets to provide the GUI.

While I do the development using the Eclipse IDE I have found it difficult to provide a portable build environment since Eclipse seems to embed a great deal of machine specific information in the project settings. When moving the projects to another machine they were breaking in a fatal fashion - The project setting would become unusable. In any case this is not a practical approach since changing the project settings when moving between machine would be tedious.

To solve this I have changed the projects to using make files. This allows the projects to be built outside of Eclipse or with Eclipse using Makefile based projects. Machine specific information is localised to one Makefile to allow convenient changes.

The following described setting up the required environment using currently available (May 2013) versions of the needed packages.

  • Mingw 4.6.2 (32-bit)
    I installed to "c:\Apps\MinGW"
    Download mingw-get-inst-xxxx.exe from http://sourceforge.net/projects/mingw/files/Installer/mingw-get-inst
    I suggest you follow the guidelines at http://www.mingw.org/wiki/Getting_Started to install MinGW using the automatic installer. You will also need to install MSYS.
  • wxWidgets 2.9.4
    I installed to "C:\Apps\wxWidgets-2.9.4"
    Download wxMSW-2.9.4-Setup.exe from http://sourceforge.net/projects/wxwindows/files/2.9.4/
    It is necessary to build wxWidgets libraries using the MinGW compiler. Instructions for doing so area available in the README installed (search for MinGW). I just used the simple make option.
    Command line used: mingw32-make -f makefile.gcc BUILD=release SHARED=1
    This will create the library and include files.
  • TCL (Active TCL 8.6.x.x)
    I installed to "C:\Apps\Tcl"
  • Xerces-C 3.1 XML parser
    I installed the archive to "C:\Apps\xerces"
    • It is necessary to compile the xerces library using MinGW. Download the sources from http://xerces.apache.org/xerces-c/
      Build xerces libraries using the MinGW compiler. Instructions for doing so area available here http://xerces.apache.org/xerces-c/build-3.html
      Commands used:
      ./configure
      make libxerces_c_la_LDFLAGS="-release 3.1 -no-undefined"
      (Note the -no-undefined option is NOT used in the ./configure!)
  • Windows Installer 4.5 SDK (needed to build the Windows installer)
    This is part of Windows SDK for Windows 7. I was unable to get this version to work so I used earlier non-official download of msi45sdk.msi.
    • Search for 'Windows Installer 4.5 SDK' or msi45sdk.msi to install the Windows installer by itself.
  • WiX Tool-set v3.7 (needed to build the Windows installer)
  • Building USBDM applications
    The following will build the applications and interface DLLs but not the Java related components.
    1. Download the source package from GITHUB - https://github.com/podonoghue
    2. Edit the Common.mk file. This file assumes the paths given above. Update paths as necessary
    3. Run the command CollectExternalFiles. This collects external files. If it complains, then locate the missing external files or correct the paths in the command file.
    4. Run the make command "make -f MakeAll.mk all"

Building Applications under Linux.

Tested using Ubuntu derivative e.g. Mint

It looks for Eclipse and KDS in several locations. Update usbdm-eclipse-makefiles-build/PackageFiles/MiscellaneousLinux/DEBIAN/postinst, prerm to add extra locations

Documentation

The documentation is built in Eclipse using

Java & Eclipse plugins

The required source files are included as part of the USBDM source package referred to in the above step.

  • USBDM JNI dll
    This is the Java native Interface for the USBDM interface DLL. It allows java code to access basic functions.
    • Download and install a current Java SDK from Oracle: Java SE Development Kit 7 (32-bit) (Java SE 7u21, JDK)
      Download from http://www.oracle.com/technetwork/java/javase/downloads/index.html
      I installed the standard location
    • Complete the steps given above for Building USBDM applications
    • Edit the MakeAll.mk file and add in the UsbdmJniWrapper_dll target to the list of targets
    • Run the make command "make -f MakeAll.mk all"
  • Codewarrior plugins
    No idea how to do these except from within Eclipse with Plugin development tools.
    • Install Eclipse with plugin development support (PDE).
      Add Eclipse SDK (See Help->Install New Software, search for SDK).
      We are building plugins for the Codewarrior version of Eclipse so it is necessary to change the plugin target.
      • Select Window->Preferences.
      • Expand Plug-in Development->Target Platform.
      • Click Add on the first tab.
      • Use the wizard to add the plugin directory from a Codewarrior installation.
    • Follow the instructions at http://www.eclipse.org/swt/eclipse.php to download and install Eclipse SWT as a project in Eclipse. I used swt-3.7.2-win32-win32-x86_64.zip from http://www.eclipse.org/swt/.
    • You should be able now build the usbdmPligin_CW10_2 project.