delorie.com/electronics/rulz/A31L.html   search  
A31L - Open Hardware with Open Tools

A31L Lab Handout (1.4Mb PDF)
instructions for building cross compilers (or install the GNUPro RPM)
flash-tool.tar.gz - Linux-based software for downloading apps onto the board (note: make sure both "uflash" and "eeprom" are in your $PATH somewhow)
A31L-lab-files.tar.gz

As root, create /etc/udev/rules.d/99-libftdi.rules with this line (if
you already have this file, just add this line to it):

SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", MODE="0666", GROUP="plugdev"

Then run:

udevadm control --reload-rules

Extract the flash-tool.tar.gz file in an empty directory
(like $HOME/uflash).  While in that directory, type "make" to build
all the flash tools.  You should see both eeprom
and uflash in that directory.

Extract the A31L-lab-files.tar.gz in your home directory (or
elsewhere, but adjust the paths below accordingly)

Edit ~/gR8C/sw/Makefile to set the GCC_PATH and UFLASH_PATH
accordingly.  If m32c-elf-gcc and uflash are *already* in your default
path, you can leave these alone - they'll be harmless.  The
UFLASH_PATH setting should be the directory where you built the
flash-tool.tar.gz files.

Run eclipse

If it asks you to select a workspace, use the default.  Check the "do
not ask again" box if you want.

At the "Welcome to Eclipse" screen, select File -> Import

Open "General" and select "Existing Projects into Workspace"

Click the first "Browse" button and browse to the gR8C/sw directory
(i.e. the "Select root directory:" box stops at "/sw")

Make sure the gR8C project is checked and click "Finish"

Close the Welcome pane.

Window -> Open Perspective -> C/C++

Help -> Install New Software
http://www.scharf.gr/eclipse/fullscreen/update/

Select "Fullscreen Command" and Next, Next, Accept, Finish, OK.
Restart.


At this point you have a mostly-working project.  There are a few
settings that aren't archived:

Window -> Preferences
Run/Debug -> Launching
Check "Save required dirty editors before launching" as "Always"

Run -> Run configurations...
Select C/C++ application and click the "New" button.

Main:
Change the Application to wherever "uflash" is installed (i.e. /usr/local/bin/uflash
or /home/dj/m32c/uflash/uflash)

Arguments:
Add: -b 57600 -c -r blinky.elf

Environment:
New, name: TERM, value: dumb

apply and close.

In the pulldown for the run *icon* choose "organize favorites".  Add
this new run configuration (should be the only one).  The first time
you run it, use the pulldown.  After that the Run icon itself will run
it.

  webmaster     delorie software   privacy  
  Copyright © 2010     Updated Oct 2010