Melexis - LDF Node generation utility

LDF_LIN_Node_driver_generation_utility.pdf

LDF Node generation utility

User manual

Contents

1. Name ..................................................................................................................................................... 5

2. Synopsis ................................................................................................................................................. 5

3. Description ............................................................................................................................................ 5

4. Options .................................................................................................................................................. 5

5. Files ....................................................................................................................................................... 7

5.1. Input files ............................................................................................................................................. 7

5.2. Generated files .................................................................................................................................... 7

6. Limitations and Known issues ................................................................................................................ 8

7. Examples ............................................................................................................................................... 9

8. See also ................................................................................................................................................. 9

Date                 Document Version               Comments

Oct 9, 2007         0.1                                     Document creation

Dec, 26, 2016         1.16                                Added support of LIN 2.2 ldf-files;

这里的很多变更点也看不懂。基本使用功能之外的话,就要另外花时间研究,看情况了。

1. Name

ldf_nodegen – LDF node generation utility.

Table 1 below explains the abbreviations used in this document.

Table 1: Abbreviations used in this document

API     Application Program Interface

FW     Firmware

LIN     Local Interconnect Network

LDF     LIN description file

SW     Software

2. Synopsis

ldf_nodegen.exe [ -ab:c:dDefFGhJ:n:No:p:sS:t:vwW] [-n node_name] [–o output_directory] <ldf-file name>

ldf_nodegen.exe -h

ldf_nodegen.exe -nMLX_slave1,MLX_slave2 -N s2s.ldf

ldf_nodegen.exe -a s2s.ldf

3. Description

ldf_nodegen utility generates the files with source code for the Standard LIN API [1], based on the LIN node’s description from LDF file.

The generated LIN API part can be used with the Melexis SW Platform. It is especially useful for generating code for applications which use signal based interaction, eliminating possible errors during signals packing/unpacking.

The utilities can generate code for one or several slave nodes defined in LDF files. Code generation for master node is not supported.

4. Options

-a

     Generate code for all nodes in input file. (Implies –N, i.e. node names are used as default output directory)

-b<d|f|e>

     Set baudrate detection mode (-bd: default baudrate from ldf-file,

     -bf: autobaudrate detection on first frame, -be: autobaudrate detection on each frame

-cname

     Set configuration name, for which to generate code. Configuration is defined in optional composite section of the LDF file.

-d

     Prints debug info to stderr; implies –v.

-D

     Dumps internal symbol tables at end of processing to stderr.

-e

     Delete on error, deletes output files when errors occurred during code generation.

-f

     Enable automatic overwriting existing files. If parameter not used and files are already exist, will be generated the message: "Output file ‘%filename%’ exists, for overwriting use option '-f'".

-F

     Generate old-style lin2b_romtbl.S for backward compatibility.

-G

     Force output generation, in case of semantic errors during parsing.

-h

     Prints short help page to stdout and exits.

-J<c|f|i|n>

     Adding special services and functions for SAE J2602 mode (-Jc has ld_read_configuration and ld_set_configuration, -Jf (0xB1 SID: has assign frame id service), -Ji (0xB2 SID: has read by identifier service), -Jn (0xB0 SID: has assign nad service)).

-nnode

     Set node name for which to generate code. Node should exist in slave’s list in Nodes section of input file.

-N

     Use node name as default output directory (overrides -o).

-odir

     Set output directory (default: '.').

-p<f|t|s>

     Partial disable of warnings. Some part of warning may be disabled (unlike –w option): use –pf for disabling warnings about overwriting existing files that was previously generated, -pt for disabling warning about that the schedule table will not used in driver generation process, use –ps for disabling warning about that the signal encoding will not used in driver generation process.

-s

     Syntax check only, no code generation.

-S<d|n|r|s>

     Special functions (d: enable callback for diagnostic messages,

     n: enable HAS_SERIAL_NUMBER_CALLOUT (enabled by default for LIN 2.x),

     r: enable HAS_READ_BY_ID_CALLOUT,

     s: enable HAS_SAVE_CONFIGURATION_SERVICE).

-t<n>

     Set initial signal table size.

-v

     Verbose, prints action summary to stdout.

-w

     Inhibits warning messages.

-W

     Allow using wildcard product_id (0x7FFF, 0xFFFF, 0xFF).

5. Files

/bin/ldf_nodegen.exe – command line node generation utility for LDF input files

5.1. Input files

*.ldf – LIN description file (LDF) which describes a complete LIN cluster containing target node.

5.2. Generated files

The generated LIN-API consists of the following components:

  • lin_signals.h – contains declaration of node’s configuration parameters, declaration of user application signals and notification flags; implementation of the inline LIN core signal interaction and notification functions.

This file also contains the following defines:

  • lin2b_romtbl.S – LIN module configuration.

6. Limitations and Known issues

7. Examples

The following examples generated by LDF nodegen utility are provided in Mulan2 SW Platform [4]:

  • LIN_SAE_SOFTWARE_DNN

  • LIN21_Signal_layer

  • LIN20_Event_Triggered

The examples can be re-generated with the LDF files provided with those examples.

8. See also

[1] Melexis Standard LIN API – Programmer’s Reference Manual

[2] LIN 2.0 Configuration Language Specification (part of LIN Specification Package Revision 2.0)

[3] Melexis_SAE_J2602_API – Programmer’s Reference Manual

[4] Mulan2 SW Platform https://gitlab.melexis.com/swcc/library_platform_mulan2

9,使用区分

MLX81325平台,使用的是ldf_nodegen.exe。

MLX81332平台,使用的是lin_nodegen.exe。

10. LIN_nodegen.exe建议参数

可以在项目中搜索LDF_NODEGEN 和 LDF_NODEGEN_FLAGS,这两个宏分别是exe文件路径和参数。

参数

-bd

检测LDF文件中的波特率设置

-f

生成文件已存在时,覆盖

-n NODENAME

指定为某个节点生成代码

-o OUTPUTDIR

指定输出文件夹

-Cf -Cv

编译器相关选项

-pf

禁止显示覆盖文件的警告

-w

显示警告

-Jc

-Jc has ld_read_configuration and ld_set_configuration

-Sa -Sd -Sn -Sr

-Sa: force enable SL_HAS_ASSIGN_NAD_SERVICE

-Sd: callback for diagnostic messages

-Sn: enable SL_HAS_SERIAL_NUMBER_CALLOUT

-Sr: enable SL_HAS_READ_BY_ID_CALLOUT

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

夜流冰

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值