doc/code_debug.txt
author gabriele at naustech dot com
Thu, 12 Jun 2014 14:07:16 +0200
changeset 791 7740ac6fdedc
parent 288 26015ee2c2c9
permissions -rw-r--r--
Fix : libcanfestival_unix.a not built if examples are not compiled

Problem: when building Canfestival with unix timers 'libcanfestiva_unix.a'
is built only if you build examples too.

Test case:

$ ./configure --timers=unix --can=socket --target=unix
$ make canfestival

...

no errors but 'libcanfestival_unix.a' is not built:
$ find . -name "*.a"
./src/libcanfestival.a

Changing line 90 of 'drivers/unix/Makefile.in' to:
#driver: $(OBJS)
driver: libcanfestival_$(TARGET).a

solves the problem:

$ ./configure --timers=unix --can=socket --target=unix
$ make canfestival

...

$ find . -name "*.a"
./drivers/unix/libcanfestival_unix.a
./src/libcanfestival.a

# Debug and warning codes
-------------------------

Errors are managed by the macro 
MSG_ERR(nbr, string, value)

Warnings and Informations  are managed by the macro
MSG_WAR(nbr, string, value)



The format of nbr
++++++++++++++++++++
16 bits, writen in hexadecimal: 0xtfxx

t   : 1    -> Error
      2    -> Warning
      3    -> Information

f   : 0    -> In file sync.c, emcy.c
      1    ->         lifegrd.c
      2    ->         objacces.c
      3    ->         timer.c
      4    ->         nmtSlave.c
      5    ->         nmtMaster.c
      6    ->         canOpenDriver.c, interrupt.c, variahw.c (errors nb 20 .. 30)
      7    ->         initObjdict.c
      8    ->         Maps_module_utilisé.cpp
      9    ->         pdo.c
      A    ->         sdo.c
      B    ->         objacces.c
      D    ->         user's application
      E    ->         user's application
      F    ->         user's application

xx  : a number


The format of string
++++++++++++++++++++
A string, ended by a space, whithout a newline

The format of value
++++++++++++++++++++
Unsigned 32 bits or less