RabbitCore RCM3000
User's Manual
PREV INDEX NEXT


5. Software Reference

Dynamic C is an integrated development system for writing embedded software. It runs on an IBM-compatible PC and is designed for use with Rabbit Semiconductor controllers and other controllers based on the Rabbit microprocessor. Chapter 4 provides the libraries and function calls related to the RCM3000.

5.1 More About Dynamic C

Dynamic C has been in use worldwide since 1989. It is specially designed for programming embedded systems, and features quick compile and interactive debugging. A complete reference guide to Dynamic C is contained in the Dynamic C User's Manual.

You have a choice of doing your software development in the flash memory or in the static RAM included on the RCM3000. The flash memory and SRAM options are selected with the Options > Project Options > Compiler menu.

The advantage of working in RAM is to save wear on the flash memory, which is limited to about 100,000 write cycles. The disadvantage is that the code and data might not both fit in RAM.

NOTE An application can be developed in RAM, but cannot run standalone from RAM after the programming cable is disconnected. All standalone applications can only run from flash memory.
NOTE Do not depend on the flash memory sector size or type. Due to the volatility of the flash memory market, the RCM3000 and Dynamic C were designed to accommodate flash devices with various sector sizes.

The RCM3000 model has two 256K flash memories. By default, Dynamic C will use only the first flash memory for program code in the RCM3000 model. Uncomment he BIOS USE_2NDFLASH_CODE macro to allow the second flash memory to hold any program code that is in excess of the available memory in the first flash.

Developing software with Dynamic C is simple. Users can write, compile, and test C and assembly code without leaving the Dynamic C development environment. Debugging occurs while the application runs on the target. Alternatively, users can compile a program to an image file for later loading. Dynamic C runs on PCs under Windows 95 or later. Programs can be downloaded at baud rates of up to 460,800 bps after the program compiles.

Dynamic C has a number of standard features.

5.2 Dynamic C Functions

5.2.1 Digital I/O

The RCM3000 was designed to interface with other systems, and so there are no drivers written specifically for the I/O. The general Dynamic C read and write functions allow you to customize the parallel I/O to meet your specific needs. For example, use

to set all the Port E bits as inputs, or use

to set all the Port E bits as outputs.

When using the auxiliary I/O bus on the Rabbit 3000 chip, add the line

to the beginning of any programs using the auxiliary I/O bus.

The sample programs in the Dynamic C SAMPLES/RCM3000 folder provide further examples.

5.2.2 Serial Communication Drivers

Library files included with Dynamic C provide a full range of serial communications support. The RS232.LIB library provides a set of circular-buffer-based serial functions. The PACKET.LIB library provides packet-based serial functions where packets can be delimited by the 9th bit, by transmission gaps, or with user-defined special characters. Both libraries provide blocking functions, which do not return until they are finished transmitting or receiving, and nonblocking functions, which must be called repeatedly until they are finished, allowing other functions to be performed between calls. For more information, see the Dynamic C Function Reference Manual and Technical Note TN213, Rabbit Serial Port Software.

5.2.3 TCP/IP Drivers

The TCP/IP drivers are located in the LIB\TCPIP folder. Complete information on these libraries and the TCP/IP functions is provided in the Dynamic C TCP/IP User's Manual.

5.2.4 Prototyping Board Functions

The function described in this section is for use with the Prototyping Board. The source code is in the RCM3000.LIB library in the Dynamic C SAMPLES\RCM3000 folder if you need to modify it for your own board design.

Other generic functions applicable to all devices based on Rabbit microprocessors are described in the Dynamic C Function Reference Manual.

5.2.5 Board Initialization

void brdInit (void);


Call this function at the beginning of your program. This function initializes Parallel Ports A through G for use with the RCM3000/31/32XX Prototyping Board.
This function also sets any unused configurable port pins as outputs with a high output, and assumes that only one RCM3000 module is installed in the MASTER position on the Prototyping Board.
Return Value
None.

5.3 Upgrading Dynamic C

Dynamic C patches that focus on bug fixes are available from time to time. Check the Web sites www.rabbit.com/support/ for the latest patches, workarounds, and bug fixes.

The default installation of a patch or bug fix is to install the file in a directory (folder) different from that of the original Dynamic C installation. Rabbit Semiconductor recommends using a different directory so that you can verify the operation of the patch without overwriting the existing Dynamic C installation. If you have made any changes to the BIOS or to libraries, or if you have programs in the old directory (folder), make these same changes to the BIOS or libraries in the new directory containing the patch. Do not simply copy over an entire file since you may overwrite a bug fix; of course, you may copy over any programs you have written. Once you are sure the new patch works entirely to your satisfaction, you may retire the existing installation, but keep it available to handle legacy applications.

5.3.1 Upgrades

Dynamic C installations are designed for use with the board they are included with, and are included at no charge as part of our low-cost kits. Dynamic C is a complete software development system, but does not include all the Dynamic C features. Rabbit Semiconductor also offers add-on Dynamic C modules containing the popular µC/OS-II real-time operating system, as well as PPP, Advanced Encryption Standard (AES), and other select libraries. In addition to the Web-based technical support included at no extra charge, a one-year telephone-based technical support module is also available for purchase.


Rabbit Semiconductor
www.rabbit.com
PREV INDEX NEXT