-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathREADME
executable file
·88 lines (73 loc) · 2.98 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
General Information
===================
cantools is a set of command line tools for dealing with ASC, MDF, and
DBC files from Vector-Informatik. The tools can be used to analyze and
convert the data to other formats:
* dbcls lists the contents of a DBC file.
* asctomat converts a .ASC log file to a MATLAB .MAT file
* mdftomat converts a .MDF log file to a MATLAB .MAT file
* dbccopy copies a dbcfile (to test the parser and generator)
The tools 'asctomat' and 'mdftomat' require the package matio, which
needs to be compiled and installed first (see instructions below).
Shared libraries for parsing and accessing these files are also
provided:
* libcandbc, libcanasc, libcanmdf: parsing of DBC, ASC, MDF files
Installation of matio
=====================
Prerequisites: autotools
1) download matio-1.5.2.tar.gz:
wget 'http://downloads.sourceforge.net/matio/matio-1.5.2.tar.gz?use_mirror='
or
curl -o matio-1.5.2.tar.gz -L 'http://downloads.sourceforge.net/matio/matio-1.5.2.tar.gz?use_mirror='
2) unpack:
tar xzf matio-1.5.2.tar.gz
3) configure:
cd matio-1.5.2
CFLAGS=-DZ_PREFIX ./configure --prefix=/usr
4) build and install:
make ; make install
Installation of cantools
========================
Prerequisites: autotools, matio
download and extract cantools-*.tar.gz
cd cantools
libtoolize
autoreconf -f -i
./configure
make
make install
Debugging DBC parser
====================
Edit Makefile:
- uncomment the line DEFS=$(YYDEBUG)
- add "extern int yydebug; yydebug = 1;" to the main program
- recompile
Profiling
=========
Edit Makefile:
- add flag "-pg" to CFLAGS
Troubleshooting
===============
1) Error: ./libtool: line 860: X--tag=CC: command not found
Reason: libtool scripts from a different environment are used
Fix: execute "autoreconf -f -i; make"
2) Error: matio.h: No such file or directory
Reason: matio is not installed
Fix: install matio (see "Installation of matio")
3) Error: configure stops with "Error! You need to install libmatio first."
Reason: linker did not find matio in the library path
Fix: install matio to /usr instead of /usr/local. Set PREFIX to
/usr at configuration time (see "Installation of matio")
4) Error while compiling matio-1.5:
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -DZ_PREFIX -c mat.c -DDLL_EXPORT -DPIC -o .libs/mat.o
mat.c: In function `Mat_VarReadInfo':
mat.c:1710: warning: dereferencing `void *' pointer
mat.c:1710: error: request for member `_flags' in something not a structure or union
mat.c: In function `Mat_VarReadNext':
mat.c:1762: warning: dereferencing `void *' pointer
mat.c:1762: error: request for member `_flags' in something not a structure or union
Reason: incorrect definition in _mat_t
Fix: in file matio_private.h, replace line
void *fp; /**< File pointer for the MAT file */
by
FILE *fp; /**< File pointer for the MAT file */