Skip to content

PersonalTransport/LIN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LIN

Introduction

LIN is a compiler (written in java) that will parse LIN Node capability and LIN description files and generate C source code that implements the LIN 2.2 spec for slave or master nodes.

Download

Install

Windows
  • Extract the downloaded zip file into the path "C:\Program Files\LIN-v0.3.1-beta"
  • The final folder structure should look something like this.
    • C:\Program Files\LIN-v0.3.1-beta
      • bin
        • LIN
        • LIN.bat
      • lib
        • LIN-v0.3.1-beta.jar
  • Then finally add "C:\Program Files\LIN-v0.3.1-beta\bin" to the environment PATH variable.
    • Here is a short video on how to do this in this video he adds C:\Python27 just type C:\Program Files\LIN-v0.3.1-beta\bin instead. You should also make sure that Java is also on your PATH variable as well.

Unix

  • Extract the downloaded zip file where ever you feel fit.
  • I put it in /opt/LIN-v0.3.1-beta
  • Add that location to your PATH so you can run the LIN-v0.3.1-beta/bin/LIN bash script.

Supported Targets

  • PIC24FJXXGA00X family.
  • PIC24FJXXGB00X family.
  • Support for others should not be too difficult to add.

Dependencies

Usage

Usage: LIN [options] source files...
  Options:
    -h, --help
       Show help this message.
       Default: false
    -o, --output
       Output directory.
       Default: gen
  * -t, --target
       The target device.
  * -i, --target-interface
       The target device's interface.
    -v, --version
       Display compiler version information.
       Default: false

Examples

Generate a master node from a LIN Node capability file.
  • LIN -t PIC24FJ64GB002 -i UART1 CEM.ncf
  • This will generate two files gen/CEM.h and gen/CEM.c that targets the PIC24FJ64GB002 and uses the first UART module, you will include these files in your master node project.

##### Generate a slave node from a LIN Node capability file. ##### - ```LIN -t PIC24FJ32GB002 -i UART1 LSM.ncf``` - This will generate two files gen/LSM.h and gen/LSM.c that targets the PIC24FJ32GB002 and uses the first UART module, you will include these files in your slave node project.