Used a do_nothing() function for px4_omit() that will satisfy the
compiler so it will not report unused variables when a debug
message is compiled out.
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
The gpssim code was named gps_sim vs being consistent with other
simulators (gpssim). It also used warnx and errx and had lots of
commeted out code.
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
If __px4_log_level_current is unsigned then the runtime filter
comparison warns because an unsigned value can't be less than zero.
Changed typed to signed so compiler will not issue a warning.
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
px4_log.c was added to px4_platform library and the library was added
to unit tests that use the log macros.
There is also a dependency on hrt_absolute_time() as well which requires
px4_platform.
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
Added __attribute__ ((unused)) for variables used only for log
output and flagged as unused if the message log level is compiled out.
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
The device level debug will have to be removed and the debugging
can be based on this new logging structure which can tell where
an error (or debug output) occured whch the current implmentation
cannot.
The one limitation is the new macros cannot take a char* for the
format parameter. It must be an actual string literal because it
is concatenated with other strings.
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
APU requires the use of ?= for MK_DIR but the use of lastword was
causing MK_DIR to be a subdir of makefiles. Changed lastword to
firstword (which is always the path to firmware.mk) which fixed
the problem.
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
Moved nuttx specific make rules to files in makefiles/nuttx.
All target specific makefiles are in their target sub directories.
To minimize file duplication, targets that share rules include a
common file. For example the posix and posix-arm targets both use
makefiles/posix/posix_elf.mk
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
Changed rc.S to rcS.
Updated README.md to explain the require directory structure and
where to run mainapp from for SITL to work correctly.
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
The SITL build is now the default posix build.
The linker script for posix was moved to makefiles/posix.
The rc.S file was moved to posix-configs/SITL/init/
The POSIXTEST board definition is now SITL
To run the SITL test run:
make sitlrun
This replaces the make posixrun target.
The build directory is now Build/posix_sitl.build/
Signed-off-by: Mark Charlebois <charlebm@gmail.com>