Skip to content
forked from esa/asn1scc

ASN1SCC: An open source ASN.1 compiler for embedded systems

License

Notifications You must be signed in to change notification settings

usr3-1415/asn1scc

 
 

Repository files navigation

Build and Test Status of ASN1SCC on Circle CI

Executive summary

This is the source code of the ASN1SCC compiler - an ASN.1 compiler that targets C and Ada, while placing specific emphasis on embedded systems. You can read a comprehensive paper about it here (PDF), or a blog post with hands-on examples here. Suffice to say, if you are developing for embedded systems, it will probably interest you.

Compilation

Common for all OSes

First, install the Java JRE. This is a compile-time only dependency, required to execute ANTLR.

Then depending on your OS:

Under Windows

Install:

  1. A version of Visual Studio with support for F# .

  2. Open Asn1.sln and build the Asn1f2 project (right-click/build)

Under OSX

  1. Install the Mono MDK.

  2. Execute ASN1SCC's ./build.sh - and the compiler will be built.

Under Linux

  1. Install the mono development tools. Under Debian Jessie for example (as of Sep/2014):

    $ mono -V
    Mono JIT compiler version 3.2.8 (Debian 3.2.8+dfsg-7)
    Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors.
            TLS:           __thread
            SIGSEGV:       altstack
            Notifications: epoll
            Architecture:  x86
            Disabled:      none
            Misc:          softdebug 
            LLVM:          supported, not enabled.
            GC:            sgen
    
  2. Use the fsharpc compiler inside your distro, or just checkout and compile the Open Source F# compiler...

    git clone https://github.com/fsharp/fsharp && \
        cd fsharp && \
        ./configure && \
        make && sudo make install 
    
  3. Execute 'xbuild'.

  4. Run tests (if you want to):

    cd Tests
    make
    

Note that in order to run the tests you need both GCC and GNAT. The tests will process hundreds of ASN.1 grammars, generate C and Ada source code, compile it, run it, and check the coverage results.

Usage

The compiler has many features - it is documented in Chapter 10 of the TASTE manual, and you can see some simple usage examples in a related blog post.

You can also read about how the compiler has been used in the TASTE project to target safety-critical systems - and maybe also check out the official TASTE project site.

Credits

George Mamais ([email protected]), Thanassis Tsiodras ([email protected])

About

ASN1SCC: An open source ASN.1 compiler for embedded systems

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 44.0%
  • Ada 36.7%
  • F# 16.1%
  • C# 1.0%
  • GAP 0.7%
  • HTML 0.5%
  • Other 1.0%