RabbitCore RCM3000 Getting Started

> ## 3. Software Installation & Overview

> To develop and debug programs for the RCM3000 (and for all other Z-World and Rabbit Semiconductor hardware), you must install and use Dynamic C. This chapter takes you through the installation of Dynamic C, and then provides a tour of its major features with respect to the RCM3000.

> ### 3.1 An Overview of Dynamic C

> Dynamic C integrates the following development functions into one program:

> - Editing

> - Compiling

> - Linking

> - Loading

> - In-Circuit Debugging

> In fact, compiling, linking and loading are one function. Dynamic C does not use an In-Circuit Emulator; programs being developed are downloaded to and executed from the "target" system via an enhanced serial-port connection. Program development and debugging take place seamlessly across this connection, greatly speeding system development.

> Other features of Dynamic C include:

> - Dynamic C has an easy-to-use built-in text editor. Programs can be executed and debugged interactively at the source-code or machine-code level. Pull-down menus and keyboard shortcuts for most commands make Dynamic C easy to use.

> - Dynamic C also supports assembly language programming. It is not necessary to leave C or the development system to write assembly language code. C and assembly language may be mixed together.

> - Debugging under Dynamic C includes the ability to use `printf` commands, watch expressions, breakpoints and other advanced debugging features. Watch expressions can be used to compute C expressions involving the target's program variables or functions. Watch expressions can be evaluated while stopped at a breakpoint or while the target is running its program.

> - Dynamic C provides extensions to the C language (such as shared and protected variables, costatements and cofunctions) that support real-world embedded system development. Interrupt service routines may be written in C. Dynamic C supports cooperative and preemptive multi-tasking.

> - Dynamic C comes with many function libraries, all in source code. These libraries support real-time programming, machine level I/O, and provide standard string and math functions.

> - Dynamic C compiles directly to memory. Functions and libraries are compiled and linked and downloaded on-the-fly. On a fast PC, Dynamic C can load 30,000 bytes of code in 5 seconds at a baud rate of 115,200 bps.
> 3.1 Hardware Requirements

> To install and run Dynamic C, your system must be running one of the following operating systems:

> - Windows 95

> - Windows 98

> - Windows NT

> - Windows Me

> - Windows 2000

> - Windows XP

> #### 3.1.1 Hardware Requirements

> The PC on which you install Dynamic C for development of RCM3000-based systems should have the following hardware:

> - A Pentium or later microprocessor

> - 32 MB of RAM

> - At least one free COM (serial) port for communication with the target systems

> - A 10Base-T Ethernet network interface port
>   (optional if you will not be using the RCM3000's Ethernet port)

> - A CD-ROM drive (for software installation)

> ### 3.2 Installing Dynamic C

> Insert the Dynamic C CD-ROM in the drive on your PC. If autorun is enabled, the CD installation will begin automatically.

> If autorun is disabled or the installation otherwise does not start, use the Windows Start | Run menu or Windows Disk Explorer to launch SETUP.EXE from the root folder of the CD-ROM.

> The installation program will guide you through the installation process. Most steps of the process are self-explanatory and not covered in this section. Selected steps that may be confusing to some users are outlined below. (Some of the installation utility screens may vary slightly from those shown.)

> #### 3.2.1 Program & Documentation File Location

> Dynamic C's application, library and documentation files can be installed in any convenient location on your workstation's hard drives.

> The default location, as shown in the example above, is in a folder named for the version of Dynamic C, placed in the root folder of the C: drive. If this location is not suitable, enter a different root path before clicking Next >. Files are placed in the specified folder, so do not set this location to a drive's root directory.

> #### 3.2.2 Installation Type

> Dynamic C has two components that can be installed together or separately. One component is Dynamic C itself, with the development environment, support files and libraries. The other component is the documentation library in HTML and PDF formats, which may be left uninstalled to save hard drive space or installed elsewhere (on a separate or network drive, for example).

> The installation type is selected in the installation menu shown above. The options are:

> - Typical Installation -- Both Dynamic C and the documentation library will be installed in the specified folder (default).

> - Compact Installation -- Only Dynamic C will be installed.

> - Custom Installation -- You will be allowed to choose which components are installed. This choice is useful to install or reinstall just the documentation.

> #### 3.2.3 Select COM Port

> Dynamic C uses a COM (serial) port to communicate with the target development system. The installation allows you to choose the COM port that will be used.

> The default selection, as shown in the example above, is COM1. You may select any available port for Dynamic C's use. If you are not certain which port is available, select COM1. This selection can be changed later within Dynamic C.

> NOTE | The installation utility does not check the selected COM port in any way. Specifying a port in use by another device (mouse, modem, etc.) may lead to a message such as "could not open serial port" when Dynamic C is started.

> #### 3.2.4 Desktop Icons

> Once your installation is complete, you will have up to three icons on your PC desktop, as shown below.

> One icon is for Dynamic C, one opens the documentation menu, and the third is for the Rabbit Field Utility, a tool used to download precompiled software to a target system.

> ### 3.3 Starting Dynamic C

> Once the RCM3000 is set up and connected as described in Chapter 2 and Dynamic C has been installed, start Dynamic C by double-clicking on the Dynamic C icon. Dynamic C should start, then look for the target system on the COM port you specified during installation (by default, COM1). Once detected, Dynamic C should go through a sequence of steps to cold-boot the module and compile the BIOS.

> If you receive the message beginning `"BIOS successfully compiled"` you are ready to continue with the sample programs.

> #### 3.3.1 Communication Error Messages

> If you receive the message `"No Rabbit Processor Detected,"` the programming cable may be connected to a different COM port, a connection may be faulty, or the target system may not be powered up. First, check to see that the power LED on the Prototyping Board is lit and that the jumper across pins 5-6 of header JP1 on the Prototyping Board is installed. If the LED is lit, check both ends of the programming cable to ensure that it is firmly plugged into the PC and the RCM3000 series module's programming port. If you are using the Prototyping Board, ensure that the module is firmly and correctly installed in its connectors.

> If there are no faults with the hardware, select a different COM port within Dynamic C. From the Options menu, select Communications. The dialog shown should appear.

> Select another COM port from the list, then click OK. Press <Ctrl-Y> to force Dynamic C to recompile the BIOS. If Dynamic C still reports it is unable to locate the target system, repeat the above steps until you locate the active COM port.

> If Dynamic C appears to compile the BIOS successfully, but you then receive a communication error message, it is possible that your PC cannot handle the 115,200 bps baud rate. Try changing the baud rate to 57,600 bps as follows.

> - Locate the Serial Options dialog in the Dynamic C Options > Communications menu. Change the baud rate to 57,600 bps.

> ### 3.4 Sample Programs

> To help familiarize you with the RCM3000 modules, Dynamic C includes several sample programs. Loading, executing and studying these programs will give you a solid hands-on overview of the RabbitCore's capabilities, as well as a quick start with Dynamic C as an application development tool.

> NOTE | The sample programs assume that you have at least an elementary grasp of ANSI C. If you do not, see the introductory pages of the Dynamic C Premier User's Manual for a suggested reading list.

> Of the many sample programs included with Dynamic C, several are specific to the RCM3000. These programs will be found in the `-Samples/RCM3000` folder.

> We suggest that you examine the following five of these sample programs in order to get a complete tour of the capabilities of the RCM3000 modules.

> - `FLASHLED1.c`

> - `FLASHLED2.c`

> - `TOGGLESWITCH.c`

> - `BROWSELED.c`

> - `PINGLED.c`

> Each of these programs is fully commented within the source code. Refer to these comments for the details of how each program works.

> To run a program, open it with the File menu (if the sample program is not already open), compile it using the Compile menu, and then run it by selecting Run in the Run menu.

> Once you have loaded and executed these five programs and have an understanding of how Dynamic C and the RCM3000 modules interact, you can move on and try the other sample programs, or begin building your own.

Z-World http://www.zworld.com Voice: (530) 757-3737 FAX: (530) 757-3792 sales@zworld.com | Rabbit Semiconductor http://www.rabbitsemiconductor.com Voice: (530) 757-8400 FAX: (530) 757-8402 sales@rabbitsemiconductor.com