@@ -74,15 +74,15 @@ If you have already done the previous step (compile everything) and you want to
...
@@ -74,15 +74,15 @@ If you have already done the previous step (compile everything) and you want to
It will compile for x86_64 architecture. To compile for a different architecture, go to the corresponding directory, for example:
It will compile for x86_64 architecture. To compile for a different architecture, go to the corresponding directory, for example:
'$ cd $FLAIR_ROOT/flair-build/build_armv5te/project_path'
`$ cd $FLAIR_ROOT/flair-build/build_armv5te/project_path`
or
or
'$ cd $FLAIR_ROOT/flair-build/build_armv7a_neon/project_path'
`$ cd $FLAIR_ROOT/flair-build/build_armv7a_neon/project_path`
or
or
'$ cd $FLAIR_ROOT/flair-build/build_cortexa7thf_neon_vfpv4/project_path'
`$ cd $FLAIR_ROOT/flair-build/build_cortexa7thf_neon_vfpv4/project_path`
*project_path* depends on what you are compiling:
*project_path* depends on what you are compiling:
...
@@ -103,54 +103,50 @@ You can generate your own project where you want, and compile it. Yet, you need
...
@@ -103,54 +103,50 @@ You can generate your own project where you want, and compile it. Yet, you need
The following assumes that your project is in *$FLAIR_ROOT/<path_to_my_project>* and you want to built it in *$FLAIR_ROOT/flair-build/<mywork>/<myproject>*
The following assumes that your project is in *$FLAIR_ROOT/<path_to_my_project>* and you want to built it in *$FLAIR_ROOT/flair-build/<mywork>/<myproject>*
Then when your program crashes, it will generate a "core" file. Use gdb with your binary as the first parameter (again, compiled in debug mode) and the core file as the second parameter (use your cross compiled gdb in case of cross development, arm-poky...-gdb for instance to debug an arm code from your PC).
Then when your program crashes, it will generate a *core* file. Use gdb with your binary as the first parameter (again, compiled in debug mode) and the core file as the second parameter (use your cross compiled gdb in case of cross development, arm-poky...-gdb for instance to debug an arm code from your PC).
It should load your program symbols. Then the "bt" command will show the backtrace, which is the sequence of function calls that resulted in the crash, allowing you to know exactly where is the problem.
It should load your program symbols. Then the *bt* command will show the backtrace, which is the sequence of function calls that resulted in the crash, allowing you to know exactly where is the problem.
## Full framework
=== Full framework ===
If you want to debug the framework itself, you may find beneficial to compile the full framework in debug mode you need to edit the file
If you want to debug the framework itself, you may find beneficial to compile the full framework in debug mode you need to edit the file
{{{
$ /opt/robomap3/<version>/<arch>/toochain.cmake
`$ /opt/robomap3/<version>/<arch>/toochain.cmake`
}}}
and add "-g -O0" to the CMAKE_CXX_FLAGS variable. As of this writing, and for an x86 architecture, the file to edit is "/opt/robomap3/2.1.3/core2-64/toolchain.cmake".
and add "-g -O0" to the CMAKE_CXX_FLAGS variable. As of this writing, and for an x86 architecture, the file to edit is */opt/robomap3/2.1.3/core2-64/toolchain.cmake*.
Then you shall rebuild the whole framework with a call to flair_compile_all.
Then you shall rebuild the whole framework with a call to flair_compile_all.
=== Flair based app ===
## Flair based app
If you want to debug your flair based application code, but don't need to debug the framework itself, you need to edit the file
If you want to debug your flair based application code, but don't need to debug the framework itself, you need to edit the file *<app>/build/CMakeFiles/<app>.dir/flags.cmake* and add the command add_definitions("-g -O0").