Coder Social home page Coder Social logo

sentinel-software-gmbh / charon-server Goto Github PK

View Code? Open in Web Editor NEW
10.0 2.0 7.0 36.02 MB

CharonUDS Server - Plattform independent (ISO 14229)

License: GNU General Public License v3.0

Batchfile 0.01% C 97.15% Assembly 0.34% C++ 0.23% Makefile 0.03% Ruby 1.79% HTML 0.03% XSLT 0.04% CMake 0.15% Python 0.23% Shell 0.01%
uds can isotp iso14229 diagnose

charon-server's Introduction

Mainpage {#mainpage}

Charon UDS Server

Hello and welcome to the Charon UDS Server documentation!
If you are reading this, chances are that you want to implement Charon into your software, and I'm really glad about that!

Charon stands for C ar H ealth A nalyze R ealtime O nboard N etwork.
It means, that we want to provide an quick, easy and lightweight way to implement the UDS Standard into your automotive application.

Note that the Charon UDS Server is marked as a Work In Progress and that there still might be some bugs in the code, or functions that are not implemented yet.

Usage

To use the Charon UDS Server you need to set up a few things beforehand. The Server itself is meant to be used in cooperation with the Charon Client - also here on github LINK. UDS is a Standard based in automotive to fulfill certain services that are widespreadly used and normalizes them. Like:

  • Bootlaoder / Update (over the air)
  • Parameter and Persistent Data Management
  • Error Logging
  • Basic Communication Safety and Security
  • Runtime Execution
  • EOL Adaption
  • etc...

Note

The EA design will no longer be maintained. Instead the architecture documentation can be found via the following link:

https://drive.google.com/file/d/1WDjvAKW8tA1s4Mtgc6YLVcqvCr4p2PGO/view?usp=sharing

Thanks

Building Tools and small How To:

Tools:

required Tools in Path:

CMake 
Ninja
GNU gcc for Windows
ARM NONE EABI GCC

use the compiler based on your target port

optional Tools in Path:

Ruby
Ceedling
Python
Doxygen
HTMLHelpCompiler
CppCheck
(Graphviz) DOT

for automatic build tool and unit tests.

How To:

CMake:

For CMake you have to create a build folder. After that you can use one of the predefined patterns in your build folder:

If you want to build a Charon port in a build folder that is created outside your project folder:

cmake ../uds_server --preset=windows    

If you want to build a Charon port in a build folder that is created inside your project folder:

cmake ../ --preset=windows 

The commands above causes CMake to configure the Windows port as a debug build. Use Ninja after configuring CMake to build your desired port.

If you want to switch ports without deleting the full build folder then follow the steps below.

Step 1: Navigate to your build folder then find and delete the "CMakeCache.txt" if it exists.

Step 2: Find and delete the "CMakeFiles" folder in your build folder if it exits.

Step 3: Open CMD in your build folder and use one of the patterns below (use the port you like to build). The previous steps causes CMake to reconfigure the project and to swap compilers. Then use Ninja to build.

Ceedling:

You can also use Ceedling to build unit tests and the supported Charon ports. To build a port, navigate to the port folder and use one of the ports. Open CMD in the chosen port folder then use ceedling release in your CMD to build .exe or .elf. To build unit tests, open CMD in your project folder and use ceedling.cmd .

runCharonBuilder:

You can use the runCharonBuilder.cmd to run and configure CMake and Ninja for you. To use the runCharonBuilder, open a CMD in your project folder and use:

runCharonBuilder.cmd --help
OR
runCharonBuilder.cmd -h

The command above will show an overview for all possible commands.

runCharonBuilder.cmd --windows
OR
runCharonBuilder.cmd -w 

The command above will create a debug build folder inside your project folder. After that it will configure CMake for the Windows port, it will also run Ninja. You can choose between a debug and a release build. To create a release build, use the command below.

runCharonBuilder.cmd --windows --release
OR
runCharonBuilder.cmd -w -r

The command above will also create a release build folder. The commands for the other ports are the same as the CMake presets. If you like you can use:

runCharonBuilder.cmd --tests

The command above will create a build folder and run Ceedling to create unit tests.

The command above will create a debug build folder inside your project folder based on the Windows port. After that it will configure CMake for the Demo port, it will also run Ninja.

CppCheck

To run CppCheck on charon files you can use the codeanalysis.bat. At the current state the analysis will only apply to the file in the root src folder and the Windows port files. To change or add new folders or files to analysis modify the codeanalysis.bat. You can find the analysis report in the folder build\cppCheckReport\index.html.

Doxygen

To generate Doxygen documentation you can use the documentation.bat. If you do not have the HTMLHelpCompiler in your Path you need to set it up in the Doxyfile or use the DoxygenWizard. You can find the documentation in the folder build\documentation\Charon_UDS_Server.

Note

The available preset for CMake can be found in the CMakePreset.json file. If you want to add an other preset please use the existing one as template.

The standalone build will only create a library without any port dependencies. All CMake presets are containing debug information, if you want to build a release build, you need to use:

cmake ../uds_server --preset=windows -DCMAKE_BUILD_TYPE=Release

Demo

For an easy overview what our Charon UDS Server is capable of, simply build the DEMO build on Server and Client. To start: execute the Charon Server executable and after that execute the Charon Client executable which are results of the demo build. Now you can navigate your way through the demo terminal and explore DTC and DID subfunctions with an interface.

Server side will fill the dummy data into the NVM emulator, response to the Client request and handles intern data. Just like any port will work.

BUILD: (..\port\windows\include\config\charon_config.h) 1. Make sure: CHARON_CONFIG_LOAD_DUMMY_DATA = 1 --^ this will load data for the demo into the system, will work without it but only empty request or error may follow on request.

2. build Windows port on non release. (--release will strip the define out of the system.)

(Check needs to be manually because we don't want any Python, cMake or Ceedling dependent code to change this define.)

Available Presets

windows
stm32f4
standalone

Supported Ports:

Windows
STM32F4

charon-server's People

Contributors

andreashofmanncto avatar kristallerictimo avatar sentinelsoftwaregmbh avatar steveninacio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

charon-server's Issues

DRY-Principles

// SEND NEGATIVE RESPONSE (REQUEST OUT OF RANGE)

As you will work on this file, you might want to remove some really unnecessary comments while you're at it.

Includes not correct

#include "charon_interface_debug.h"

Assuming that only "src/Library" and "src/Library/Interface" needs to be included.

Please specify how to set up:

To use the Charon UDS Server you need to set up a few things:

Early returns in IO Control

charon_InputOutputControlFunctionalUnit.c is full of early returns. This is not in line with rest of library code. Misra is not happy -.-

ISO 14229-1:2020

Does the new ISO14229-1:2020 standard affects the stack?
If yes:
Do you plan to adjust the stack according to the latest ISO14229-1:2020 standard?

Provided Interfaces missing

Provided interfaces are missing. (abstraction from business logic)

  • read/write data
  • routine control
  • dtc
  • ...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.