![]() |
|
| RabbitCore RCM2300 Getting Started |
|
3. Software Installation & Overview
To develop and debug programs for the RCM2300 (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 RabbitCore RCM2300 module.
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 multitasking.
- 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 RCM2300-based systems should have the following hardware:
- A Pentium or later microprocessor
- 32 MB of RAM
- At least 50 MB of free hard drive space
- At least one free COM (serial) port for communication with the target 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 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 and 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 section.
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 RCM2300's programming port, with the pin-1 edge of the cable matched to the pin-1 mark on the board. 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 Project Options, then 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 you receive the "BIOS successfully compiled ..." message after pressing <Ctrl-Y> or starting Dynamic C, and this message is followed by a communications 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 > Project Options > Communications menu. Change the baud rate to 57,600 bps. Then press <Ctrl-Y> or restart Dynamic C.
3.5 Sample Programs
To help familiarize you with the RCM2300 modules, Dynamic C includes several sample programs. Loading, executing and studying these programs will give you a solid hands-on overview of the RCM2300'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 User's Manual for a suggested reading list. Of the many sample programs included with Dynamic C, several are specific to the RCM2200 module. These programs will be found in the Samples\RCM2300 folder.
![]()
We suggest that you examine the following three of these sample programs to get a complete tour of the capabilities of the RabbitCore RCM2300 modules. They form a "learning arc" from basic to advanced I/O control.
- FLASHLED.C-Master RCM2300 repeatedly flashes LED DS3 on the Prototyping Board.
FLASHLEDS.C-Master RCM2300 repeatedly flashes LEDs DS2 and DS3 on the Prototyping Board.
TOGGLELED.C-Master RCM2300 flashes LED DS2 on the Prototyping Board and toggles LED DS3 on/off in response to pressing S3.Each of these programs is fully commented within the source code. Refer to these comments for the details of how each program works.
Once you have loaded and executed these three programs and have an understanding of how Dynamic C and the RCM2300 modules interact, you can move on and try the other sample programs, or begin building your own.
| Z-World, Inc. www.zworld.com Phone: 1.530.757.3737 FAX: 1.530.757.3792 |
Rabbit Semiconductor www.rabbitsemiconductor.com Phone: 1.530.757.8400 FAX: 1.530.757.8402 |