Skip to content
/ keapi Public

Kontron Embedded API

License

Notifications You must be signed in to change notification settings

kontron/keapi

Repository files navigation

Build Status

Kontron Embedded API

A software library that enables programmers to easily create their applications for monitoring and control hardware resources of Kontron boards, modules, systems and platforms.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

Development tools:

Libraries:

  • POSIX threads (libpthread)
  • Perl Compatible Regular Expression library (libpcre)
  • ATA S.M.A.R.T. reading and parsing library (libatasmart)
  • Jansson (libjansson)

Build instruction

Compilation on target:

# Configure with autoconf
autoreconf --install
./configure --prefix=/usr ${CONFIGURE_FLAGS}

# Build and install
make
make install

Cross-compilation (example for ARM):

# Setup environment
source /opt/poky/<version>/environment-setup-armv7vehf-neon-poky-linux-gnueabi

# Configure with autoconf
autoreconf --install
./configure --build=x86_64-linux-gnu \
            --host=arm-poky-linux-gnueabi \
            --prefix=/usr ${CONFIGURE_FLAGS}

# Build
make

# Copy compiled libraries to target file system
# scp .libs/<libname.[a,la,so]> root@<target_ip>:/usr/lib/

Coding style

Modified .clang-format file from Linux kernel project with increased ColumnLimit (80 -> 120).

clang-format -style=file -i -verbose src/* include/*

Configuration files

All configuration files are placed in the "/etc/keapi" directory of target file system.

See CONFIGURATION_FILES_FORMAT for details.

Versioning

KEAPI version is four numbers divided by point (for example 3.0.5.0).

It contains two parts: (a.b).(c.d).

First part - a.b, defined in keapi.h and reflects library specification:

  • a - specifies basic API specification version
  • b - reflects changes which are not related to basic API

Second part - c.d, is platform dependent:

  • c - reflects functions behavior changes. Could affect on linked application
  • d - reflects implementation fixes / improvements. Should not affect on linked application

License

This project is licensed under the BSD 3-Clause "New" or "Revised" License - see the LICENSE file for details.