Each of the various projects on the Schmalz Haus website (for
UBW32, EiBotBoard, etc.) is provided in both source form and
compiled HEX file. In order to complile the source code
may need a little help in understanding what tools (compiler
is necessary, and how to set things up so you can build and
the code yourself. This page describes the tools and process
to build Schmalz Haus projects. This page speaks about the
applies equally to all boards (and all projects).
Microchip makes integrated circuits. They make the microcontroller that is on the UBW, UBW32 and EBB. They also give away (and also sell) the software necessary to write programs for their microcontrollers. To write software for these parts you can use Microchip's free tool chain, which consists of an IDE, a compiler and (for most projects) an applications library. The applications library consists of header files and C files for several types of software, including a USB stack, a TCP/IP stack, a graphics library, and several others. Also included in the Microchip Applications Library (which is what they call it - or MAL) are lots of example projects to get you started programming with their microcontrollers and software libraries. For example, the UBW, EBB and UBW32 are built on the Microchip USB CDC example project as a starting point.
Because Microchip wants their application libraries to be as
as possible, they came up with a certain folder structure that
projects must abide by in order to compile properly. For the
simplicity I have chosen to change that folder structure
web page describes how my projects can be built with free
tools, and the slight modification to the stock Microchip
Library way of doing things that you need in order to compile
If you choose to download the whole Microchip Application
you will get a C:/Microchip Solutions folder that contains a
example code, some documentation, and a folder called
this Microchip folder are all of the actual files for the
software libraries. It is this Microchip folder that is used
building UBW32 projects. It contains both the USB stack header
well as the source code files necessary to compile the whole
which is used for almost all UBW32 projects.
The whole reason this folder hierarchy exists this way is so
you can have multiple projects all referencing the USB stack
graphics library or whatever) without having to have separate
these stacks for each project. Since they are common to all
projects, you only need one copy of them, and this also makes
them with newer versions much easier.
All of the Microchip tools are currently Windows only. However, this situation is going to change in the very first part of 2011. A new version of MPLAB (called MPLAB X) will become available on Windows, Mac OS and Linux, and all compilers will be released on all platforms, so you can build these projects on any machine.
I have set up all of my projects on the UBW, UBW32 and EBB pages to build with the Microchip folder (which contains the headers and C files for the USB stack) to be in the same folder as the project folder. You must set your file system up the same if you want the projects to compile without modifying them. The name of the top level folder does not matter, only that the Microchip folder and the project folder are in the same directory together.
For example, if your top level folder is called "Projects",
folder that contains the UBW32 project is called
you would need the following folder structure:
| +-->All project files like *.mcp, *.mcw, *.c, *.h, etc.
The reason things need to be this way is that the project *.c
*.h files reference files in the Include and USB folders that
inside the Microchip folder, and they need to be located in
relative path in order to compile properly.
You can just add more project folders into the "Projects"
(for example, HelloWorld, or Firmware D, etc.) and they will
reference the USB stack that is in the Microchip folder.
In the above Tools links I have included a link to just the
Microchip folder as a zip file so that you can just download
it and not
the whole MAL to save time.
You must be sure to have the procdefs.ld file in your project
folder when you build your firmware application for the UBW32
are going to download it using the HID Bootloader (which is
standard way for download programs into the UBW32). This file,
present (and named exactly that) will tell the C32 linker to
the proper space for the HID bootloader in the resulting HEX
file is contained in each of the UBW32 project folders that is
website. HOWEVER- you must never add the procdefs.ld file to
actual MPLAB project (i.e. don't add it to the Linker folder
MPLAB). Doing this will result in a HEX file that won't run.