Components of CRuntimeJavalike

From Java4c

Contents

Navigation

Overview

CRuntimeJavalike is a tree of C-files proper to use in embedded applications. All files are written by Hartmut Schorrig, www.vishia.org. They are used in some applications in profession too (with second license model). It is a conglomeration of different things, of course. It contains some makefiles to build libraries for a PC platform.

The CRuntimeJavalike can be used in any application, especially for embedded systems. It contains a OSAL-layer, which is provided for Windows and Linux. The OSAL-layer have to be adapted for other operation systems. Some adaption exists and are tested and used in profession. With adapting the OSAL-layer the sources can be used and the examples can run on any platform.

Distribution and sources in internet

OSAL

See OSAL. The OSAL-component contains

  • C-files, which are special written for the appropriate operation system.
  • One Headerfile, which contains some depending definitions which should be adapted to the platform, os and compiler. It is the os_types_def.h.
  • Headerfiles, which are independent of the operation system. It describes the OSAL-interface.
  • Headerfiles, which contains simple C-definitions and declarations. It are independent of compiler, platform and os.
    • [include/Fwc/fw_Exception.h]: Exception handling for C and C++ inclusive Stacktrace-Mechanism. In C a longjmp is used to throw. (longjmp.h is defined in the old Standards of C and in C99 too).
    • [include/Fwc/fw_Formatter.h]: Declaration of methods for formatting Strings. It include time-formattings. It is similar to sprintf.
    • [include/Fwc/fw_MemC.h]: Definition of a struct MemC with pointer and its size. Some macros to handle with pointer. Some function prototypes for MemC-handling.
    • [include/Fwc/fw_Readline.h]: Support of reading lines from a file. A line can be terminated with 0d, 0a or any combination (Windows, Unix, Mac-conventions all in one). The os_file.h is used as interface to read a file.
    • [include/Fwc/fw_SimpleC.h]: Some basicly simple macros and function declarations.
    • [include/Fwc/fw_String.h]: Basic functions for String storing in a struct StringJc. It is the alternative to zero-terminated C-Strings. The pointer and the length is stored. The basic functions are a bridge between 0-terminated C-strings and StringJc-referenced strings.
    • [include/Fwc/fw_ThreadContext.h]: The ThreadContext is managed in the OSAL, but its struct is defined here.
    • [include/Fwc/fw_timeconversions.h]: struct and funtion declarations for time conversions: A timestamp should be stored internally in form of currently seconds and microseconds after a start time. The conversion to a human readable time should be done only for presentation. The routines support the conversion.
    • [include/Fwc/fw_Va_list.h]: An appreciation to the < stdarg.h> concept. The value as new: Any argument-type of a variable argument list is described with one char in a char*-string with one char. With the knowledge of the correct type any users function can be use the variable argument more correctly. Usual any other information should be necessary, for example the format-String of sprintf. This header and functions are used in fw_formatter.h
  • C-files, which contains common sources for OSAL
  • C-files, which contains common sources for simple C-functions. It can be used in the OSAL-Adaption.

With this Sources a application can be written os-indenpendent. All this sources are independent of the Java2C-thinking. This sources are not complex. There are not any assumption to Java.

Personal tools