Compile libcivil for ARM architecture - arm

i coded a java applications that takes the pictures of a webcam that is attached to the pc. For that i use the lti-civil java-api. It works fine! This api uses a shared library -libcivil.so- for jni access to several native libs. The libcivil.so exists for linux 32/64bit osx and windows. But i want the application to run with raspberry pi which has arm-architecture.
My question is: is it possible to recompile the libcivil - shared lib for arm-architecture? iam not familiar with c++ so i don't know if it is possible in any way.

i found a way to obtain webcam images with java on a raspberry pi. I use the v4l4j library. It's a jni wrapper for the v4l2 api. It handles direct access to the /dev/video interface under linux. There is a way to compile it for the raspbian linux-port and it works great. But the raspberry seems to be too slow (5-8 fps and hight latency - about 300-500ms). But this is another thing. Now iam waiting for the hackberry or gooseberry... =)
compile v4l4j on raspberry pi how-to:
https://code.google.com/p/v4l4j/wiki/GettingStartedOnRPi
greez
daniel

Related

Portable Linux environment for applications

Is there any application (maybe a VM) that run Linux compatible compiled programs (like a web service) on other platforms (like windows) like an native application?
for example executive a C coded web service that is compiled by that application like a native linux programming but with an extra layer.
I think it have to be an x86 VM like QEMU but that is so heavy and complicated.
my problem is that I coded an application in C for linux but not I want to run it on others platforms without rebuilding that or using Cygwin.
You could look into Docker. As far as I know, it is possible to run Docker images that were built on Linux on Windows.
I found an incomplete but best match solution to my problem:
flinix
I hope more contribution to this awesome project.
Softwares like wine have been made for linux to run Windows applications. You can try http://www.andlinux.org/ to run linux apps in Windows.
You can uses VirtualBox or VMWare and run a Linux VM or use Cygwin or MinGW (similar to cygwin). Maybe try with Babun which is really easy but I'm not sure this would run a linux app...

Can I use OpenGL GLES instead of full OpelGL on desktop?

I want to learn OpenGL to program a game in C language but I am a little confused about which library choose, the intention is to generate a C library with the game logic and using Android NDK to interface with the resources in phones.
I found an example that use GLESv2 library and this works well, I think I know that the GLES library was created because mobile devices can't use full OpenGL library.
but the real question is: Is GLES a subset of full OpelGL library in order that I can build and run my game app using GLES library on linux desktop?
Can you give me a clue if I'm going the right way with these library?
Is GLES a subset of full OpelGL library in order that I can build and
run my game app using GLES library on linux desktop?
No, it is not. OpenGLES is a separate spec.
That said, it's very close to being a subset of OpenGL. It would be a perfectly sensible approach to have shared OpenGL code that you compile into both your Linux and Android executables. You'd have to be careful to only use functionality supported by OpenGLES and you might find you need the odd #if to account for slight differences in the APIs, but 95%+ of the code could work across both APIs.
The alternative is to use the OpenGLES API on desktop. gzh's answer implies that Linux ships with GLES which would make life easy. But if it doesn't you could look at tools like PowerVR's emulator (pvrvframe) or Mali's emulator. My only experience is using pvrvframe on Windows, which worked very well for us - performance was noticeably worse than non-emulated codepaths, but it still managed to run a demanding mobile game at playable framerates.
This depends on which OpenGL library you linked to your application. For OpenGL, you should link with libGL.so, but for OpenGLESv2, you should link with libGLESv2.so.
To use OpenGL:
header file directory: /usr/include/GL
library file: /usr/lib/libGL.so
To use OpenGLESv2:
header file directory: /usr/include/GLES2
library file: /usr/lib/libGLESvs.so
By the way, according to Andriod Dashboards, at present, above 60% android devices have converted to using OpenGLES v3.x. Maybe you'd better give a try to OpenGLES v3.x.

Use Azure IoT Plugin for C within Eclipse

Very new to C, Eclipse, and basically everything else I am trying to work with in this project. I have an Arduino Feather HUZZAH (ESP8266). I have flashed the firmware with the esp_iot_sdk and installed Eclipse on to machine through the unofficial Espressif Dev Kit in order to write the code for the board.
The code I wrote is working well but now I need to find a way to send the collected data to Azure's IoT Hub. I found this plugin for talking to the Azure IoT Hub but cannot figure out how in the world to get it installed using Eclipse.
Even if someone could show me how to get a simple POST request going in C, using a library or not, that would be awesome! Thanks for your help.
So you want to run azure-iot-sdk on ESP8266 with Tensilica Xtensa LX106 MCU.
The first thing you need to do is to port azure-iot-sdk C library to Xtensa platform, using the Espressif Dev Kit toolchain.
Normally, this is officially done by Microsoft. Unfortunately, Xtensa LX106 might not be on the list(roadmap?) yet.
So I think you can do some porting work yourself, following some tutorials from Microsoft. This link works for Linux host, but given that fact that Xtensa toolchain only supports windows for now, you might end up writing some cmd, bat or generic makefile/cmake file, in which you need to have the cross-compile toolchain(aka xtensa-lx106-elf-gcc) specified.
Hopefully, it's not complicated or cumbersome.
After you have done with this, you need some static or dynamic library assembly depending on your settings, the next step is to specify the library path in your eclipse project, and don't forget to include the azure-iot-sdk header folder to your project, as the snapshot shows.
You should be good to go after the above steps.

how to use CMUsphinx with ARM microcontrollers?

I just searched about an open-source library to use of my project to build a voice controlled robot and found CMUsphinx. but my robot will build on ARM based microcontroller and I have not Linux or Windows on it. Is it possible to use CMUsphinx on ARM based microcontrollers? How can I do it?
Is there any better options instead of using CMUsphinx on ARM uControllers?
Actually, you can use a variant of CMUSphinx, known as PocketSphinx, on ARM devices. Most resources focus on Raspberry Pi, as it's a very popular ARM target.
The instructions for installing on a Raspberry Pi are here:
http://cmusphinx.sourceforge.net/2016/06/should-you-select-raspberry-pi-3-or-raspberry-pi-b-for-cmusphinx/
There's a voice assistant for Raspberry Pi that uses CMUSphinx:
http://cmusphinx.sourceforge.net/2014/04/jasper-personal-assistant-for-raspberry-pi/comment-page-1/
And, there's a recent blog post about running on the Raspberry Pi here:
http://cmusphinx.sourceforge.net/2016/06/should-you-select-raspberry-pi-3-or-raspberry-pi-b-for-cmusphinx/
Is it possible to use CMUsphinx on ARM based microcontrollers?
No, it's not possible to use CMUSphinx on microcontrollers.
but my robot will build on ARM based microcontroller
Consider using more powerful CPU, it will help you with other tasks like navigation or network sync as well.

Building Source Code on Raspberry Pi

This is probably a stupid question, but I have been pouring over forums and google for hours and I can't figure this out.
I recently downloaded the mame4all source repository from here
https://code.google.com/p/mame4all-pi/
and made a few edits to the list of games that are available. Now I am having issues compiling/building the source. In the repository, there is of course the source code (Contained in an src folder). I cannot figure our how to build/install the source code now that I have edited it. In the main folder there is a makefile.rpi file, makefile.gp2x, and makefile.rpi.debug, I feel like there is something that I need to do with these but I am not entirely sure
I am not sure how to build/compile this source code to test the changes, I am on a raspberry pi using Raspbian Wheezy. I feel like I am missing something simple, any help is greatly appreciated!
You need build tools for ARM architecture installed within the Raspbian Wheezy. But compiling in Raspberry Pi is horribly slow and you might want to do it on your PC instead. If you have a Debian on Ubuntu installation on your PC, then get ARM tool chain that can 'cross-compile' from x86 to ARM. I am sure there is a version of GCC out there than can do this. A simple Google search might provide more details regarding that. Once you get the binary compiled, copy it to the raspberry pi either via SFTP or by connecting the SD card to your PC.
http://qt-project.org/wiki/RaspberryPi_Beginners_guide contains a lot of information and links to download tools for this purpose. In fact, Qt creator can automate most of the tasks and you can deploy compiled binary directly to the Pi from Qt creator.

Resources