2 @mainpage Eurobot Software Documentation
4 This document contains programmer documentation of some parts of
5 software developed by Eurobot team at Department of Control
6 Engineering, FEE, Czech Technical University. .
8 Currently, these modules are documented:
20 To regenerate this documentation, run @c doxygen in @c src
21 directory. The result can be found in @c src/doc/html/index.html.
23 \defgroup leds Meanings of LEDs on various boards
25 \defgroup canmsg CAN bus messages
28 Common files for all supported targets (CAN message IDs etc.).
31 Demo application to test compilation and demonstrate OMK usage.
34 Matlab/Simulink tests for localization and trajectory generation.
37 Main robot-control application(s) and support files.
39 \page compilation How to compile it
41 Before first compilation, you should execute
42 <tt>build/prepare_infrastructure script</tt>.
45 ./prepare_infrastructure
47 It downloads repository
48 for @c h8s processors and configures sources. Then, it should be
49 sufficient to go to the <tt>build/<em><target></em></tt> directory and
56 \section cflags Custom compilation flags
58 To compile the project with debugging flags, put them to config.omk
59 file in <tt>build/*</tt> directory. Don't modify config.target,
60 because this will influence all other developers.
63 cat <<EOF >> config.omk
64 CFLAGS = -O0 -g -Wall -fno-strict-aliasing
65 CXXFLAGS = -O0 -g -Wall -fno-strict-aliasing
72 \section config Using multiple software configurations
74 OMK build system allows to configure compilation process so that we
75 can have multiple configurations of software (e.g.: with odometry
76 feedback or without). On the OMK side, the configuration is done by
77 setting make variables, from which headers files can be automatically
78 generated. In sources <tt>##ifdef</tt> can be used to compile
79 differently under different configuration.
86 produces list of all possible configuration variables in
87 <tt>config.omk-default</tt> (note, that this is also run by
88 <tt>prepare_infrastructure</tt>).
90 To use different value than the default one, put the variable
91 assignment to <tt>config.omk</tt> or (preferably) to
92 <tt>config.omk.local</tt>.
95 echo CONFIG_OPEN_LOOP = y >> config.omk.local
99 If you want to compile other configuration only temporarily you can
103 touch config.omk # make OMK notice a change
104 make CONFIG_OPEN_LOOP=y
107 or a more permanent way:
111 export CONFIG_OPEN_LOOP=y
112 make -e # the -e option is important!
115 \page logging Logging
117 We use uLUt library for logging. printf() should never be used for
118 printing some information - error message, debug data etc. Instead
119 ul_logXXX(), which is declared in ul_log.h, should be used.
121 \section loghowto Howto
123 In every file, where you want to log something you must initialize
124 ul_log.h library by using UL_LOG_CUST macro and defining the name of
127 UL_LOG_CUST(ulogd_robot); // Log domain name = "ulogd_" + the name of the source file
130 Then, you can use one of the functions (macros) bellow. Each macro
131 logs a message with different severity. The severity should be chosen
132 according to the following rules:
134 - ul_logfatal() - fatal error which causes the program to terminate.
135 These error should only be reported at program startup, not while
136 the program is running for a while.
138 - ul_logerr() - error i.e. something that should not happen during
139 normal operation. The application should be able to continue,
140 possibly with its functionality limited.
142 - ul_logmsg() - important information that should always be seen by
143 the operator. These messages with this log level are printed by
146 - ul_loginf() - not so important information, which is normally
147 suppressed and is displayed only on request.
149 - ul_logdeb() - debuging information. This information is only useful
150 to someone who knows the details of the source code.
152 - ul_logtrash() - lowlevel debugging information.