Cross Compile for the NAO robot / Naoqi OS - nao-robot

Are there a package manager for naoqi os if you want to add tools to the Linux naoqi-os.
Or are there any instructions howto cross-compile for naoqi os?

The Linux package manager is not open, and there is no root access on most robots.
You can extend the functionalities with the NAOqi PackageManager, and add the libraries you want to use alongside the programs you install on the robot.
You will need to cross-compile the libraries for the robot to do so.

Related

Installing linux library in C

I am a beginner with linux and C and wanted to learn how to successfully install external libraries.
Therefore, I have a recent project to aid my understanding of my MacOS usb ports, I am taking steps into: The Linux-USB Host Side API. This mentions the package is the the following:
<linux/usb/ch9.h>
I found this on the linux github: linux-usb.
How do I successfully install this onto my MacOS to use within Visual Studio Code?

Build C executable for Raspberry Pi on Windows or Linux

I have to design a C executable (no GUI) that is supposed to run on Raspberry PI. I'm familiar with design using IDE like Visual Studio or Eclipse (with CDT plugin). If i use Raspberry PI as a design machine, I think I have no chance to use a standard IDE. I should use makefiles and gcc compiler only.
Is there any chance to develop Raspberry PI executable using Visual Studio (for Windows) or Eclipse (for both Windows and Linux).
You can specify to eclipse projects with Makefiles. You can also specify a compilation toolchain.
So yes, you can develop and compile for Raspberry Pi or for other plateforms using Eclipse.
For getting toolchain and other tools for Rasp Pi you can find things here.
In Eclipse, you create a new or import a project choosing Makefile Project with Existing Code then add your toolchain.
If you have a newer Pi like the 4, you should be able to run eclipse directly from the Pi desktop. You can download via:
sudo apt-get install eclipse
This will be a stripped-down version and will likely run quite slow, so I agree compiling on a more powerful remote machine is better...
Is there any chance to develop Raspberry PI executable using Visual Studio (for Windows) or Eclipse (for both Windows and Linux).
Yes, this is called cross-compiling. You can set up a cross-compile toolchain for the raspberry pi on windows or linux and configure your Eclipse CDT project to build with the toolchain. You can even set up remote debugging.
This website has good information and a step-by-step guide for windows using cygwin.
This looks like a good guide for linux.
Edit:
Just realized you asked for Visual Studio on Windows. I don't think there is Visual Studio support for this. The example I pointed to sets up cygwin so you have an emulated linux environment. You could also set up a VM using free VM software and install a linux environment that way, and run eclipse CDT from there. This is what I did when setting up a cross compiling environment for the Raspi.

Switch C project configuration in Eclipse between Windows and Linux

I installed Eclipse with CDT plugin. I created a simple TCP client software that runs on Windows. I can open the project on Ubuntu also. I'd like to change build configuration in order to create Linux executable. Is it possible to create executable for the operating system that the project is compiled. I mean if I compile the project on Ubuntu, there should be Linux executable and if I compile the project on Windows, there should be Windows executable. Is it possible?
It is possible. When you are creating a Project in Eclipse, you are provided with two build options. One debug and one release. The release build will create the executable for the OS in which it is run.
Good Luck!

Compile file in linux and run in windows

I start to learn c and c++ programming and I write it in Linux.
Can I make binary file with g++ and run it as exe in window 7? or i need to compile the code in windows again?
You can use a mingw cross compiler to build windows binaries in linux. In Ubuntu (and I guess other Debian variants as well) the package is called mingw32. You then have a cross compiler under the name i586-mingw32msvc-g++ (or similar). For building simple command line programs without library dependencies this is an OK solution.
If you need more then this I'd recommend you use MXE (M cross environment). MXE installs its own cross compiler and can build many libraries for you so you don't need to care about how to build the library dependencies.
For example the OpenSCAD project (a 3D CAD program that is using Qt for its GUI) is using MXE for building the Windows releases. See this page on the OpenSCAD wiki for a description of the build process.

Issue with opencl on linux

I have a desktop with a linux and a nvidia gforce 5200. The graphics card does not support opencl programming. Hence, I installed AMD APP SDK v.2 to program opencl on the CPU.
However, when I execute after compilation I get the following:
FATAL: Module fglrx not found.
fgrlx is the module of kernel for the ATI proprietary driver. Why is this module required?
Fglrx is a proprietary, Linux binary-only driver for ATI graphic chips with support for 3D acceleration. You can read about it here
For installing AMD App SDK the following system requirements needs to be satisfied
http://developer.amd.com/tools/heterogeneous-computing/amd-accelerated-parallel-processing-app-sdk/system-requirements-driver-compatibility/
Basically an AMD CPU as the bare minimum.
Basically you need to install ATI drivers. Here is a tutorial which talk about the procedure
For RPM based linux (like Fedora)
http://gofedora.com/how-to-install-ati-catalyst-fglrx-98-drivers-fedora-11/comment-page-1/
For Debian based Linux (like Ubuntu)
https://help.ubuntu.com/community/BinaryDriverHowto/
A blog talks about how to install AMD App SDK
http://blog.markloiseau.com/2012/05/install-opencl-sdk-ubuntu/

Resources