SlamTec RPLidar A1 Knowledge Base: Difference between revisions
imported>Jacob mNo edit summary |
imported>Jacob mNo edit summary |
||
| (12 intermediate revisions by the same user not shown) | |||
| Line 2: | Line 2: | ||
Creating the static Library in Eclipse | ====Creating the static Library in Eclipse==== | ||
Choose New C++ project as project typ choose static library. | Choose New C++ project as project typ choose static library. | ||
Disable debug configuration press advance configurations. | Disable debug configuration press advance configurations. | ||
In both Cros GCC and G++ compiler make the following changes | In both Cros GCC and G++ compiler make the following changes.<br> | ||
Under preprocessor add: | Under preprocessor add: | ||
_MACOS | * _MACOS | ||
_NDEBUG | * _NDEBUG | ||
* Bulleted list item | |||
NDEBUG | NDEBUG | ||
Under includes add: | Under includes add: | ||
${workspace_loc:/${ProjName}/include} | * ${workspace_loc:/${ProjName}/include} | ||
${workspace_loc:/${ProjName}/src} | * ${workspace_loc:/${ProjName}/src} | ||
Under optimization choose: | Under optimization choose: | ||
Optimize more (-O2) | * Optimize more (-O2) | ||
Under Miscellaneous select: | Under Miscellaneous select: | ||
Verbose | * Verbose (-v) | ||
Position Independent Code Under other flags have: | * Position Independent Code (-fPIC) | ||
-c -funsigned-char | Under other flags have: | ||
* -c -funsigned-char | |||
The all option field for Cross GCC and G++ compiler should look similair like this: | The all option field for Cross GCC and G++ compiler should look similair like this: | ||
-D_MACOS -D_NDEBUG -DNDEBUG -I"/Users/jacob/Dropbox/_9RPLidar/crossLidar/rplidar_sdk-v1.10.0/include" -I"/Users/jacob/Dropbox/_9RPLidar/crossLidar/rplidar_sdk-v1.10.0/src" -O2 -Wall -c -funsigned-char -v -fPIC | -D_MACOS -D_NDEBUG -DNDEBUG -I"/Users/jacob/Dropbox/_9RPLidar/crossLidar/rplidar_sdk-v1.10.0/include" -I"/Users/jacob/Dropbox/_9RPLidar/crossLidar/rplidar_sdk-v1.10.0/src" -O2 -Wall -c -funsigned-char -v -fPIC | ||
For Cross GCC Assembler also add the includes under general. | For Cross GCC Assembler also add the includes under general. | ||
${workspace_loc:/${ProjName}/include} | * ${workspace_loc:/${ProjName}/include} | ||
${workspace_loc:/${ProjName}/src} | * ${workspace_loc:/${ProjName}/src} | ||
The all option field for Cross GCC Assembler: | The all option field for Cross GCC Assembler: | ||
-I"/Users/jacob/Dropbox/_9RPLidar/crossLidar/rplidar_sdk-v1.10.0/include" -I"/Users/jacob/Dropbox/_9RPLidar/crossLidar/rplidar_sdk-v1.10.0/src" | -I"/Users/jacob/Dropbox/_9RPLidar/crossLidar/rplidar_sdk-v1.10.0/include" -I"/Users/jacob/Dropbox/_9RPLidar/crossLidar/rplidar_sdk-v1.10.0/src" | ||
When create import the include and source directory. Using file system | When create import the include and source directory. Using file system | ||
Then remove the not used architecture directories, i.e. on a Mac remove win32 and linux | Then remove the not used architecture directories, i.e. on a Mac remove win32 and linux | ||
====Creating new program in Eclipse==== | |||
Use the above settings.<br> | |||
Add in Cross G++ Linker under Libraries, in the libraries (-l) sections | |||
* rplidar_sdk | |||
In the Library search path (-L) | |||
* ${workspace_loc:/rplidar_sdk/Release} | |||
Latest revision as of 08:45, 21 June 2019
The SlamTec RPLidar A1 needs a driver which can be downloaded from: https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers
Creating the static Library in Eclipse
Choose New C++ project as project typ choose static library.
Disable debug configuration press advance configurations.
In both Cros GCC and G++ compiler make the following changes.
Under preprocessor add:
- _MACOS
- _NDEBUG
- Bulleted list item
NDEBUG Under includes add:
- ${workspace_loc:/${ProjName}/include}
- ${workspace_loc:/${ProjName}/src}
Under optimization choose:
- Optimize more (-O2)
Under Miscellaneous select:
- Verbose (-v)
- Position Independent Code (-fPIC)
Under other flags have:
- -c -funsigned-char
The all option field for Cross GCC and G++ compiler should look similair like this:
-D_MACOS -D_NDEBUG -DNDEBUG -I"/Users/jacob/Dropbox/_9RPLidar/crossLidar/rplidar_sdk-v1.10.0/include" -I"/Users/jacob/Dropbox/_9RPLidar/crossLidar/rplidar_sdk-v1.10.0/src" -O2 -Wall -c -funsigned-char -v -fPIC
For Cross GCC Assembler also add the includes under general.
- ${workspace_loc:/${ProjName}/include}
- ${workspace_loc:/${ProjName}/src}
The all option field for Cross GCC Assembler:
-I"/Users/jacob/Dropbox/_9RPLidar/crossLidar/rplidar_sdk-v1.10.0/include" -I"/Users/jacob/Dropbox/_9RPLidar/crossLidar/rplidar_sdk-v1.10.0/src"
When create import the include and source directory. Using file system Then remove the not used architecture directories, i.e. on a Mac remove win32 and linux
Creating new program in Eclipse
Use the above settings.
Add in Cross G++ Linker under Libraries, in the libraries (-l) sections
- rplidar_sdk
In the Library search path (-L)
- ${workspace_loc:/rplidar_sdk/Release}