| RabbitCore RCM2100 Getting Started |
3. Software Installation & Overview
To develop and debug programs for the RCM2100 series (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 RCM2100 series.
3.1 An Overview of Dynamic C
Dynamic C integrates the following development functions into one program:
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.2 System Requirements
To install and run Dynamic C, your system must be running one of the following operating systems:
3.2.1 Hardware Requirements
The PC on which you install Dynamic C for development of RCM2100-based systems should have the following hardware:
- A Pentium or later microprocessor
- 32 MB of RAM
- At least 40 MB of free hard drive space
- 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 developing Ethernet-based systems)- A CD-ROM drive (for software installation)
3.3 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.3.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.3.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.3.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 cause temporary problems when Dynamic C is started. 3.3.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.4 Starting Dynamic C
Once the RabbitCore module 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 and loaded..." you are ready to continue with the sample programs in the next chapter.
3.4.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. If it is, check both ends of the programming cable to ensure that it is firmly plugged into the PC and the RCM2100'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.
If you are using Dynamic C version 7.04 or earlier, modify the BIOS source code as follows. Skip these three steps if your version of Dynamic C is 7.05 or later.
- 1. Open the BIOS source code file named RABBITBIOS.C, which can be found in the BIOS directory.
- 2. Change the line
#define USE115KBAUD 1 // set to 0 to use 57600 baud
- to read as follows.
#define USE115KBAUD 0 // set to 0 to use 57600 baud
- 3. Save the changes using File > Save.
Now press <Ctrl-Y>. You should receive the "BIOS successfully compiled ..." message indicating that the target is now ready to compile a program. You should then continue with the sample programs in the next chapter.
| Z-World http://www.zworld.com Voice: (530) 757-3737 FAX: (530) 753-5141 sales@zworld.com |
Rabbit Semiconductor http://www.rabbitsemiconductor.com Voice: (530) 757-8400 FAX: (530) 757-8402 sales@rabbitsemiconductor.com |