0% found this document useful (0 votes)
187 views11 pages

Clib Howto v13

The document describes how to integrate the CLIB library into Borland C++ 5.02 and Paradigm C/C++ compilers. It provides steps to install the library, create projects, configure settings, and access documentation.

Uploaded by

mail87523
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
187 views11 pages

Clib Howto v13

The document describes how to integrate the CLIB library into Borland C++ 5.02 and Paradigm C/C++ compilers. It provides steps to install the library, create projects, configure settings, and access documentation.

Uploaded by

mail87523
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

IPC@CHIP CLIB HowTo V1.

IPC@CHIP CLIB

How to integrate the CLIB into Borland C++ 5.02 and Paradigm C/C++ Beck IPC Edition

2000-2007 Beck IPC GmbH

Page 1 of 11

IPC@CHIP CLIB HowTo V1.3

Table of Contents
1 INTRODUCTION ................................................................................................................................ 3 2 HOW TO INTEGRATE THE CLIB BINARIES AND CLIB/RTOS DOCUMENTATION INTO PARADIGM C/C++ BECK IPC EDITION .......................................................................................... 4 2.1 STEP 1 CALL THE SETUP ............................................................................................................ 4

3 HOW TO INTEGRATE THE CLIB IN A BORLAND C 5.02 PROJECT ............................................ 4 3.1 3.2 3.3 3.4 3.5 3.6 STEP 1 - INSTALL THE CLIB........................................................................................................... 4 STEP 2 - CREATE YOUR PROGRAM DIRECTORY ............................................................................... 4 STEP 3 - CREATE THE BORLAND C 5.02 PROJECT .......................................................................... 5 STEP 4 - ADJUST THE PROJECT SETTINGS ...................................................................................... 7 STEP 5 - ADD THE CLIB TO THE PROJECT ...................................................................................... 9 STEP 6 - WRITE YOUR PROGRAM ................................................................................................. 10

4 CLIB API DOCUMENTATION AND @CHIP-RTOS API DOCUMENTATION ............................... 11

2000-2007 Beck IPC GmbH

Page 2 of 11

IPC@CHIP CLIB HowTo V1.3

Introduction

The libraries provide an easy access to the IPC@CHIPs operating system using the programming language C. In addition to the binary library files, documentation in HTML format is also provided. The CLIB software package comes in two versions: The setup UpdateDocuxxxxxx_CLIBxxx.exe integrates the CLIB binaries and complete RTOS and CLIB documentation into the Paradigm C/C++ Beck Edition compiler, if the Paradigm compiler is installed. If you are a Borland user, the setup will ask for the installation paths of the library and the documentation. The archive CLIBVxxxSRC.ZIP holds the source code of the CLIB libraries.

This document describes how to: Integrate the CLIB into your Paradigm C/C++ Beck IPC Edition compiler Integrate the CLIB into your Borland C 5.02 project Use the CLIB and @CHIP-RTOS API documentation

The library is available in 5 different models. One model for every compiler memory model: CLIBxxxH.lib Huge CLIBxxxL.lib Large CLIBxxxM.lib Medium CLIBxxxC.lib Compact CLIBxxxS.lib Small Note: For inexperienced users, we advise to use compiler memory model Large. There is NO correlation between the names of the compiler memory models (Small, Compact, Medium, Large, Huge) and those of the available SC1x @CHIP-RTOS variants (Tiny, Small, Medium, Medium_PPP, Large, Large_PPP)!

2000-2007 Beck IPC GmbH

Page 3 of 11

IPC@CHIP CLIB HowTo V1.3

How to integrate the CLIB binaries and CLIB/RTOS documentation into Paradigm C/C++ Beck IPC Edition
Step 1 Call the Setup

2.1

Call the setup UpdateDocuxxxxxx_CLIBxxx.exe. The setup installs/updates the CLIB binaries and the CLIB and RTOS documentation in the Paradigm installation path provided that the compiler is installed. To use the CLIB in your Paradigm projects, include the header file clib.h into your C files. The library should NOT be manually added to the project (like on the Borland compiler). The Paradigm compiler automatically integrates the CLIB library file, according to the selected memory model.

3
3.1

How to integrate the CLIB in a Borland C 5.02 project


Step 1 - Install the CLIB

First you have to call the setup UpdateDocuxxxxxx_CLIBxxx.exe. Choose a path where the CLIB should be copied, e.g. C:\Projects\Clib.

You should now have a directory, e.g. C:\Projects\Clib with the CLIB contents.

3.2

Step 2 - Create your program directory

Make a directory inside your project directory for storing your program files. For example, you now have a directory C:\Projects\Hello which is empty.

2000-2007 Beck IPC GmbH

Page 4 of 11

IPC@CHIP CLIB HowTo V1.3

3.3

Step 3 - Create the Borland C 5.02 project

Open the Borland C 5.02 program and create a new project.

In the field "Project Path and Name" choose the new directory, which you have created for the program followed by the project name, e.g. C:\Projects\hello\hello.ide Make the correct project settings. Target Type: Application [.exe] Platform: DOS (Standard) Target Model: Large Frameworks: Deselect Class Library Math Support: None Libraries: No Exceptions

2000-2007 Beck IPC GmbH

Page 5 of 11

IPC@CHIP CLIB HowTo V1.3

Click now the "Advanced" button and choose the *.c node type.

Close the "Advanced Options" dialog and the "New Target" dialog with "OK".

2000-2007 Beck IPC GmbH

Page 6 of 11

IPC@CHIP CLIB HowTo V1.3

3.4

Step 4 - Adjust the project settings

Open the menu "Options" and select "Project...".

Select "Directories" and change the include path and the library path to: Include: $env(bcroot)\include;..\clib 1 Library: $env(bcroot}\lib

The expression "$env(bcroot)" is translated to the installation directory of the Borland 5.02 compiler

2000-2007 Beck IPC GmbH

Page 7 of 11

IPC@CHIP CLIB HowTo V1.3

Now select "16-bit Compiler" and choose the 80186 instruction set for compiling.

Close the dialog with the "OK" button.

2000-2007 Beck IPC GmbH

Page 8 of 11

IPC@CHIP CLIB HowTo V1.3

3.5

Step 5 - Add the CLIB to the project

Go to the project window. Use the right mouse button to click on the project node. Choose "Add node" from the popup menu.

Change the path to the CLIB directory.

Select the file extension type *.lib or *.* from the lower listbox. Open the CLIB with the name CLIBxxxL.LIB for the Large memory model library.

2000-2007 Beck IPC GmbH

Page 9 of 11

IPC@CHIP CLIB HowTo V1.3

3.6

Step 6 - Write your program

Include the header file CLIB.H in your C files. After this you can use all CLIB functions inside your code.

2000-2007 Beck IPC GmbH

Page 10 of 11

IPC@CHIP CLIB HowTo V1.3

CLIB API documentation and @CHIP-RTOS API documentation

The UpdateDocuxxxxxx_CLIBxxx.exe setup already includes the complete CLIB and RTOS documentation. Paradigm users: The documentation can be accessed from the Paradigm Help menu or by pressing the F1 key when the cursor is over a CLIB function. Borland users: The documentation is copied to a user defined path during the setup. The Windows start menu will contain a link to the documentation index page. At the @CHIP-RTOS API index page is a link to the CLIB index page.

Each documented CLIB function has an HTML link to the invoked RTOS API software interrupt, which is described in the @CHIP-RTOS HTML documentation.

2000-2007 Beck IPC GmbH

Page 11 of 11

You might also like