AMC 68VZ328 Frozen Dessert Maker User Manual


 
www.amctechcorp.com 39
cd ~/dimmpci
mkdir source
cd source
Create a simple ‘hello world’ C program called ‘hello.c’ such as this:
#include <stdio.h>
void main() {
printf(“Hello World\n”);
}
Now run the GCC compiler to create the binary file. Links should be set up so the compiler is in
the path. If not add ‘/opt/uClinux/bin’ to the path and everything should work fine.
m68k-pic-coff-gcc hello.c -o hello
Once the hello world program has been successfully compiled, copy the resulting binary file to
the romdisk directory and create a new image file.
cp ~/dimmpci/source/hello /opt/fs/romdisk/usr
cd /opt/fs
make imagez.bin
Now program the image file to the dimmPCI
TM
CPU module and connect to it using the serial port.
Run the hello program in the root directory and, sure enough, it will print out ‘Hello World’.
You can use a ‘Makefile’ as well to automate the compiling process if you have multiple files or
special options, etc.
Using NFS to streamline the development cycle
If reprogramming of the dimmPCI
TM
CPU module were necessary every time changes were made,
more time would be spent reprogramming than writing source code. Assuming that both the
linux PC and the dimmPCI
TM
development board are connected via ethernet the solution is to
make part of the computer’s hard drive available on the dimmPCI filesystem using NFS. First an
entry will need to be added to the ‘/etc/exports’ file of the host computer similar to the following: