Additional Info for A19C and A31L

This packet provides additional information for:

Presenter Info

DJ Delorie's work web site is people.redhat.com/~dj and his group's site is www.redhat.com/services/custom. Email: dj@redhat.com

DJ Delorie's personal web site is www.delorie.com with most electronics-related projects listed under pcb/ and electronics/. Email: dj@delorie.com

DJ hangs out on RenesasRulz and in the #geda IRC channel on irc.oftc.net (nick: djgpp).

Included in this Packet

All software and EDA files provided in this packet are licensed as Free Software, and may be redistributed without any additional license

The gR8C Standard
Specifications for the gR8C interface - connecting R8C chips to PCs using FT232R USB chips.
flash-tool.tar.gz
Sources for a Linux-hosted tool to flash R8C, M16C, M32C, R32C, and RX processors.
fakeos.zip
Sources for a "fake operating system" for your gR8C mini-eval board.
rulz-r8c33-design-files.zip
EDA files for the schematics and layout of the gR8C lab board.

Free Software and Open Hardware Organizations

The Free Software Foundation
The FSF created the Free Software philosophy, and acts as its champion and protector - they own the copyrights on most of the GNU software and publish updates to the GNU General Public License, as well as enforce violations of it for their software.
Open Source Initiative
The Open Source Initiative (OSI) is a non-profit corporation formed to educate about and advocate for the benefits of open source and to build bridges among different constituencies in the open source community. OSI defines "Open Source".
The GNU Operating System
The GNU OS is a vast collection of Free Software, including such popular packages as GCC, GDB, and Emacs.
The Fedora Project
The Fedora Project produces the Fedora distribution, a freely redistributable operating system. The A31L lab uses the Fedora Electronics Lab spin.
Red Hat Inc
Red Hat is a leading contributor to and distributor of Free Software, especially Enterprise-class Linux-based distributions. The Global Engineering Services group provides custom cross-development packages, including most Renesas processors.
RenesasRulz
Renesas's open community - the best place to ask questions about using Free Software with Renesas products.
Other popular Linux-based distributions: Ubuntu Debian CentOS Suse OpenWRT Android

Downloadable Software and Resources

DJ's Rulz Board
DJ's project page for various gR8C boards, including the lab board.
DJ's RX-Stick Page
DJ's project page for altering the RX-Stick for use with a Linux-hosted development environment.
gEDA: GPL'd EDA Software
Schematic capture, PCB layout, simulation, and more. The gR8C lab board was designed with this software.
KiCAD
Another Free EDA suite.
KPit GNU Tools
Ready-to-use GNU tools for Windows, supporting most Renesas MCUs
The GCC Project
Binutils
GDB & Sim
Newlib
These are the origins of the most commonly used Free Software cross-development packages. If you want the absolute latest sources, this is where to find them.
OpenCores
A community of Open Hardware FPGA designs
The Linux Kernel
The core of any Linux-based operating system is, of course, the Linux kernel itself.
Firefox
A Free web browser - the default browser for Linux but also a popular alternative to IE on Windows.
OpenOffice
A Free office suite - word processor, spreadsheet, database, presentation, etc. The A19C and A31L presentations were created with this suite.

Standards and References

The GNU General Public License
The "GPL" is the core of the Free Software Movement. This license is used by most Free Software to define its use and redistibution terms. Basically, the GPL defines "Free Software".
The Open Source Definition
"Open Source" is similar to "Free Software", but not quite the same. The OSD defines the term "Open Source".
The gR8C Standard
What is gR8C? It's a standard for using an off-the-shelf USB chip to program and communicate with R8C processors.
Easy R8C/M16C/M32C/R32C Flash Programming (pdf)
A simplified way to program these MCU chips using Serial Mode 2. This is the protocol used by gR8C boards.

Building a GNU Cross-Development Toolchain

Building a cross-development toolchain is fairly easy, but there are a few gotchas that you need to avoid. What follows is a generic example of how to build a simple cross-m32c toolchain under Linux; adapt it to your specific environment and target.

To build a GNU toolchain (gcc, gas, ld, gdb, newlib), you'll need to download a bunch of tarballs from any GNU mirror, or check the latest versions out of their source code repositories. I usually check out the latest; some packages don't release often enough to get current support which you'll need.

Go to www.gnu.org and click the download link. You want sources, so find the links for downloading it via web/ftp, and get the latest versions of these (project pages appended, in case you want to check out the latest from source control):

GDB is not really needed, but it does include simulators for R8C and RX which might come in handy.

Each package is built and installed separately. Just use the same --prefix and they'll all get along. Never build in the source tree! Always use a separate build tree; this will not only work more reliably but it means you don't need separate R8C and RX source trees.

First, build binutils. Something like this:

mkdir $TOP/m32c-binutils ; cd $TOP/m32c-binutils
../binutils-X.Y/configure --prefix=/opt/redhat --target=m32c-elf
make
make install
Note that the instructions are the same for RX, just use rx-elf instead of m32c-elf. Note that the m32c target supports r8c, m16c, and m32c, so don't get confused by the different name.

Next build as much of gcc as you can (yes, it will fail, because you haven't built newlib yet):

mkdir $TOP/m32c-gcc ; cd $TOP/m32c-gcc
../gcc-X.Y/configure --prefix=/opt/redhat --target=m32c-elf --enable-languages=c --with-newlib
make -k
make -k install

Now that you have a working compiler, you can build newlib:

mkdir $TOP/m32c-newlib ; cd $TOP/m32c-newlib
../gcc-X.Y/configure --prefix=/opt/redhat --target=m32c-elf --enable-languages=c --with-newlib
make
make install

Now go back and build the rest of gcc:

cd $TOP/m32c-gcc
make
make install

If you want the debugger/simulator, you can build it now:

mkdir $TOP/m32c-gdb ; cd $TOP/m32c-gdb
../gdb-X.Y/configure --prefix=/opt/redhat --target=m32c-elf
make
make install

Wherever you installed them too, make sure your $PATH includes that .../bin directory. In the examples above, that would be /opt/redhat/bin