PersonalTransport/LIN


LIN Implementation

Download


Step 1. Add the JitPack repository to your build file

Add it in your root settings.gradle at the end of repositories:

	dependencyResolutionManagement {
		repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
		repositories {
			mavenCentral()
			maven { url 'https://jitpack.io' }
		}
	}

Add it in your settings.gradle.kts at the end of repositories:

	dependencyResolutionManagement {
		repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
		repositories {
			mavenCentral()
			maven { url = uri("https://jitpack.io") }
		}
	}

Add to pom.xml

	<repositories>
		<repository>
		    <id>jitpack.io</id>
		    <url>https://jitpack.io</url>
		</repository>
	</repositories>

Add it in your build.sbt at the end of resolvers:

 
    resolvers += "jitpack" at "https://jitpack.io"
        
    

Add it in your project.clj at the end of repositories:

 
    :repositories [["jitpack" "https://jitpack.io"]]
        
    

Step 2. Add the dependency

	dependencies {
		implementation 'com.github.PersonalTransport:LIN:-SNAPSHOT'
	}
	dependencies {
		implementation("com.github.PersonalTransport:LIN:-SNAPSHOT")
	}
	<dependency>
	    <groupId>com.github.PersonalTransport</groupId>
	    <artifactId>LIN</artifactId>
	    <version>-SNAPSHOT</version>
	</dependency>

                            
    libraryDependencies += "com.github.PersonalTransport" % "LIN" % "-SNAPSHOT"
        
        

                            
    :dependencies [[com.github.PersonalTransport/LIN "-SNAPSHOT"]]
        
        

Readme


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.
</br> ##### 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.