w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Cross Compilation for C applications using Eclipse
You need a Linux -> Windows cross compiler. The MinGW tools would do the job, but, last I checked, they only provide binary downloads to run on Windows (i.e. not a cross-compiler). There are some (old) instructions for building your own here. The CodeBench compiler is probably exactly what you want, but it's not free (there is a free trial though). It's basically a professional build of the MinGW tools, and comes with it's own customized Eclipse so there's no fiddling about needed in that department. A quick google also comes up with these tools on sourceforge, but I've not tried them.

Categories : C

Beaglebone Black Serial c++
So I tried the same steps as you did. I downloaded and compiled the code from http://serialib.free.fr/html/classserialib.html and compiled with a warning about serialib.cpp: 337:40: warning: converting to non-pointer type 'unsigned int' from NULL [-Wconversion-null] (If you know how to fix this please let me know). But I ran the program with the Tx/Rx pins hooked up to an Arduino Mega Rx1/Tx1 pins. The program writes fine and I can see the Arduino read in the bytes. When I write from the Arduino to the Rx of the Beaglebone Black it times out and says no data was received. As far as I can tell, this is a problem with how the Rx pin is set. EDIT: So I just printed the Buffer that receives the data written to the port and it receives the data just fine. So the problem is with the v

Categories : C++

Duplicating identical BeagleBone Black setups
Copying your emmc Image back to a SD card is a bit tricky, since it will need to be formated in a certain way to get it to mount. Here are some tips to get that working: http://dev.gentoo.org/~armin76/arm/beagleboneblack/install_emmc.xml#expand What might be easier is using an USB thumb drive, or USB SD card reader. Note, currently there are some issues hot-plugging USB devices, so boot with it plugged in. You can copy your entire FS to the USB drive, then compress it. Create a new bootable linux sd image, and put your compressed FS on there and use one of the scripts Ottavio linked to to copy over the compressed image. you can make a systemd service to launch the script on startup.

Categories : Linux

USB Bluetooth Dongle isn't recognized by BeagleBone Black
In case you are running a 3.8 kernel: usb hotplugging seems to have issues. no. 1 recommendation is booting the BBB with the usb device plugged in already until hotplugging is fixed. the power adapter should be sufficient with 2.5 amps.

Categories : Misc

How do I auto-launch a custom webserver on BeagleBone Black?
The bbb uses systemd and service files to control how services start -- there's a README on your bbb in /etc/init.d that provides some info and links. There are also some good pages on systemd at http://fedoraproject.org/wiki/Systemd. There are many services configured by default. Try typing: systemctl list-units This will give you a list of services and some minimal status info. Each of the listed services is configured by (usually) simple service files that tell systemd how to start and these files are in /lib/systemd/system for the most part. I'm not entirely sure what you are asking in your first question, but it sounds like you want to get rid of the "built-in" webserver -- I'm pretty new to bbb myself, and I don't know the answer for sure, but if I find out more I'll post it here.

Categories : Misc

Object Counter in Opencv + BeagleBone Black Performance Issue
I think that the best option is to use profiler(Very sleepy is quite easy to use, but still enough powerful for me, but i'm not sure whether there is linux version) and check in which part of your code there is a problem - take a look at this discussion What can I use to profile C++ code in Linux? (accepted answer may not be good option in your situation, so look carefully at other answers too). Also you may just try to decrease sleep time, it should increase fps and CPU usage.

Categories : C++

Change hearbeat led on beaglebone black with device tree overlay
There's a systemd service, leds.service, that overrides the device tree settings for this one led (who knows why). To see the status of the service, run root@beaglebone:~# systemctl status leds.service which gives the output leds.service - Angstrom LED config Loaded: loaded (/lib/systemd/system/leds.service; enabled) Active: active (exited) since Sat 2000-01-01 18:33:24 UTC; 13 years 7 months ago Process: 125 ExecStart=/usr/bin/led-config start (code=exited, status=0/SUCCESS) CGroup: name=systemd:/system/leds.service By looking at the "Loaded" field you can see that the service script is located at /lib/systemd/system/leds.service, and the "Process" field says the this service runs the command "/usr/bin/led-config start". Looking at this file

Categories : Misc

cron job to send ip of BeagleBone Black (at every reboot) to my email is not firing
I had the same problem and found It will only work on a default install only if you leave your terminal open. For whatever reason Ti did some weird changes to the Linux system that automaticity kills any background processes when your terminal is closed. Google beaglebone nohup as there are some settings you have to change to prevent the killing of your processes on exit. You will also have problems trying to get custom services started on boot up and corn does not work as you would expect it to. Welcome to the wild west of Linux

Categories : Python

OpenCV linking issue on BeagleBone Black and Ubuntu 12.04 (Precise Pangolin)
Your link command has: -lopencv_core -lopencv_highgui -lm opencv_test.c This is the wrong order of arguments. To understand why, read this. If I give this command to my existing ubuntu x82 machine, It compiles very nicely... You mean "it links very nicely". That's happening by coincidence, not because your link command is correct.

Categories : Opencv

Application boost::thread stuck on mutex lock when compiled for ARM running on BeagleBone Black
Looks like an upgrade of boost to version 1.54 fixes the issue. Took some time to get the right packages because Debian Wheezy's boost stable release is 1.49, so I had to manually upgrade my cross-compilation platform. The app can now run up to 380 threads without any problems, this is more than enough for me.

Categories : C++

Cross compilation : jdk1.6 on jdk 1.7
That might not be enough. First of all, besides setting target to 1.6, you should also set source to 1.6: <javac source="1.6" target="1.6" srcdir="src"> to let the Java compiler know that it should interpret your code as 1.6-compatible source code. But a bigger problem is that this does not prevent you from using classes, interfaces and methods which are new in the Java 7 standard library. If you use Java 7-only classes, interfaces or methods, it will compile, but you'll get errors like NoSuchMethodError when you run it on Java 6 and you're calling a method that didn't exist in Java 6. The safest way to ensure that your code is compatible with Java 6 is installing JDK 6 and using that to compile your code. (Note: There's no problem with having multiple versions of the JDK insta

Categories : Java

Javac Cross-Compilation with 1.7
You cannot have a newer version of source and lower version of target. For example, In Java 5, a number of new features were added to the language, such as generics, autoboxing and you cannot expect a JVM 1.4 to understand it. So, you must tell the compiler that your source code is Java 1.4 source code. This explains the results you have. The default for -target depends on the value of -source: If -source is not specified, the value of -target is 1.7 If -source is 1.2, the value of -target is 1.4 If -source is 1.3, the value of -target is 1.4 If -source is 1.5, the value of -target is 1.7 If -source is 1.6, the value of -target is 1.7 For all other values of -source, the value of -target is the value of -source. For more info refer to http://docs.oracle.com/javase/7/docs/technotes/too

Categories : Java

Adapt Makefile for cross-compilation
An easy way to solve this would be: ALL_CFLAGS += -L$(PREFIX)/lib If you really want to install your lib in the toolchain, you should look for the usr/lib directory, usually the path is TOOLCHAIN_DIR/TOOLCHAIN_PREFIX/sysroot/usr/lib Check other binaries in the $(PREFIX)/lib directory, you will notice that they were compile to run in you host, and not in your target. The files the compiler need to check dependencies, link, and execute in your target, are installed in the sysroot directory.

Categories : C

Cross compilation to embedded system
A quick google search indicates that chip has an ST40 cpu core. Another google search turned up this link which has all of the instructions you need.

Categories : C

Groovy Java cross compilation instanceof
instanceof GroovyObject? I created the following Java class: import groovy.lang.GroovyObject; public class A { public static void main(String[] args) { B b = new B(); if (b instanceof GroovyObject) { System.out.println("b is a groovyobject"); b.yeah(); } else { throw new RuntimeException("b is not a groovyobject"); } } } And the following Groovy class: class B { def yeah() { println "hell yeah" } } With the following result: $ javac -cp ~/groovy/embeddable/groovy-all-2.1.3.jar:. A.java $ java -cp ~/groovy/embeddable/groovy-all-2.1.3.jar:. A b is a groovyobject hell yeah

Categories : Java

Error in linux cross compilation u-boot
The distclean target is used to undo/clear any changes made to the local working directory by selecting any board/device-specific config. The error System not configured -see readme Error[1] indicates that the current u-boot working-directory is NOT yet configured for any device/board and hence the distclean target to make is redundant at this point.

Categories : Misc

Using cross-compilation tools in kernel-build
Answer to your first question is - No. You don't need cross compilation tools if you're building the kernel on the same computer that it'll run. Host compiler toolchain will do the work for you. Answer to the second question - two ways you can do it: a) using existing cross compilation tools (already build), you can download it via Software Center of any popular distro like Fedora, Ubuntu. Cross compilation will be prefixed with platform name i.e if you need arm tool chains it will be something like arm-linux-gnueabi-gcc. b) You can build your own cross compilation tool chains from the source of GCC. It's quite difficult and time consuming stuff. But, you can avoid all the above steps and can use tools like buildroot, openembedded etc. Which will ease all the task for you and help

Categories : Linux

cross compilation application qt from Windows to ubuntu
You cannot cross-compile to "Linux", because that's not an OS. Certain system-level libraries and interfaces differ from distribution to distribution, making it nearly impossible to get a one-binary-covers-all. Setting up a cross-compiler is generally a pain in the... nuts, and for Linux->Windows, there is no free alternative (a Windows license isn't free). For Windows->Linux, you can install the distribution you are targetting and compile it natively (perhaps in a virtual machine). This guarantees compatibility with the OS you're targetting and is much more reliable than cross-compiling.

Categories : Qt

Python cross compilation to Windows with Nuitka failing
This might help (from Nuitka documentation): The resulting filename will be program.exe on all platforms, that doesn't mean it doesn't run on non-Windows! But if you compile program we wouldn't want to overwrite it, or be unsure which one is the compiled form, and which one is not.

Categories : Python

Is there a cross platform way to detect debug mode compilation?
For many or most compilers, "debug" mode is a multifaceted concept that includes several orthogonal settings. For example, with gcc, you can add debugging symbols to the output code using -g, enable optimizations using -O, or disable assert() macros using -DNDEBUG (to define the NDEBUG macro). In my work, we have deployed production code with many combinations of these enabled or disabled. We have left -g on in order to attach to running processes and troubleshoot them using gdb (in which case we usually have to fight with the spaghetti -O produced), left assertions on to get more information about persistent errors across releases, and disabled optimizations for legacy codebases written under a more permissive interpretation of "undefined behavior" (until we could fix/replace it). Sin

Categories : C++

Incompatible libc.so.6 Found During Cross-Compilation of Qt5 OpenGL Test for i.MX6
It seems that you are compiling against the wrong libc. The location of the correct libc should be: /home/Desktop/poky-dylan-9.0.0/build/tmp/deploy/images/mountpoint/lib/ Can you check that? Run in that folder: file libc.so.6 Have a look if the architecture is fine. I do not have the sources in front of me, so please give feedback if things are going wrong. Your application is compiled in a chroot environment (see man chroot). The folder /home/Desktop/poky-dylan-9.0.0/build/tmp/deploy/images/mountpoint acts as the new rootfolder for your application. This is configured in the -sysroot option of your configure script. This is not valid for gcc, because the -no-gcc-sysroot is on. So the linker is looking to your native /lib/ folder to find the libraries. They are not there of course.

Categories : Linux

Apache Cross Compilation Error ./gen_test_char: cannot execute binary file
I searched and searched and found several tries to patch but none of them worked. Most of these were patches suggested directly from the Apache dev group. But I finally came across this Apache mail list. It suggests a straight forward solution that the patches could not provide. Compile the gen_test_char app before trying to cross-compile Apache. So I did. And followed the suggestions and it worked like a charm. instead just compile gen_test_char.c 1st with something like: gcc -Wall -O2 -DCROSS_COMPILE gen_test_char.c -s -o gen_test_char then run it and put its output into the include folder (or where its placed normaly); and after this compilation run it to get the desired output with: ./gen_test_char > test_char.h

Categories : C++

FTDI D2XX library works with ubuntu. but shows error on ezsdk cross compilation
Kernel versions are different.. arm926 built for kernel version 2.6.32 Ezsdk 6.0 for beagleboard XM uses kernel version 3.3.7 I think, need to use open source library (http://www.intra2net.com/en/developer/libftdi/)

Categories : Linux

GWT compilation fails in eclipse
From the log I can't say for sure but I can guess that in your RequestContext definitions you are declaring the service implementation. You should declare the service interface instead. EDIT: If a member of the Steering Committee says my answer is not clear it is probably true. Apologies and I'll try to be more explicit. From the log looks like there is some server class (i.e. a class that is executed on the application server; given that the log shows an error from the RequestFactory I presume we are in the middle of some client-server communication here) which is declared in the RequestFactory definition file: ApplicationRequestFactory.java. In particular, I would expect that some parameter in some method of the interface SearchRequestContext is of type FilterConfiguration. This is wron

Categories : Gwt

Compilation hitting virtual memory limitation in g++ 4.7.1?
In 32-bit application (including compilers), you typically get somewhere between 2 and 3GB that is available for usermode in virtual space. This is caused by a combination of memory space being reserved, memory space fragmentation (there is virtual memory available, just not a big enough chunk to hold whatever size block that new or malloc is requesting), and "memory reservation", where process has allocated a fairly large chunk of memory, but it's not actually using all of it, so it's not "populated". Any particular reason you can't use a 64-bit GCC to generate 32-bit code - using -M32? That would be my solution.

Categories : C++

Find memory leak using Eclipse memory analyzer
Did you try to compare 2 hprof file in MAT ? There is an option "Compare to another Heap Dump" in histogram view. It will show you the difference between 2 hprof file, and then it will be easier to find out your memory leak

Categories : Android

Unresolved compilation problems with signed APK using Eclipse and AndroidAnnotations
It seems that the generated classes was not bundled in the apk. Could you check your project configuration in "Java build path" / "Order and Export". The output directory for generated classes (usually apt_generated) should be checked.

Categories : Android

library compilation error for TESS4J ( tesseract ) with eclipse
You need to either use an older version of JNA (<3.5) or revise the structure definitions to include the (now required) getFieldOrder() method.

Categories : Java

Eclipse reports compilation errors on codes using generated classes
Don't know if you solved your problem, but just in case: I faced the same situation after re-installing Eclipse IDE and figured out that "Annotation Processing" was disabled for the project. Right click on the project -> Properties -> Java Compiler -> Annotation Processing Check enable and specify a generated source directory. This did the trick for me. No more complaints from Eclipse and autoComplete on foo_.whatever worked again.

Categories : Maven

How does JIT compilation in Java load dynamically compiled instructions into memory?
In Linux, a memory segment can be set up to be writable and executable (and can be later changed on its protections). Look at the mmap(2) and mprotect(2) syscalls. The JVM will probably produce machine code in memory, without using any disk files. Its JIT machinery probably just write bytes in executable memory. Notice that the JVM might not want to change the generated machine code protection (it probably could generate all the machine code inside writable and executable memory segments), because since it is generating itself that code, it can be made sure to not doing nasty things (read about proof-carrying code). Read the Just-in-time compilation and HotSpot and Virtual Memory wiki pages, and try strace-ing some java process... Some JVMs are free software (e.g. the one inside OpenJd

Categories : Java

Eclipse - set custom color theme and now when highlighted things turn black
This option is can be modified under the Annotations section of the Preferences dialog (as shown below).

Categories : Java

php shared memory cross browser
If sharing memory is really what you want to achieve use the APC extension. 01.php <?php $bar = 'SOME VALUE'; apc_store('myuniquekey', $bar); 02.php var_dump(apc_fetch('myuniquekey')); EDIT: There's another way i wasn't aware of - without using apc: http://php.net/shmop. It is little more complex and ugly as you have to allocate space and stuff, but it is more likely that the shmop extension is available without beeing required to install it manually. $shm_id = shmop_open(0x123, 'c', 0644, 250); shmop_write($shm_id, "Data in shared memory", 0); $value = shmop_read($shm_id, 8, 6);

Categories : PHP

Compilation of the access modifiers
After compilation to IL, the information is preserved. A compiled module (DLL) can be referenced by other code and then private/public/protected do matter. After compilation from IL to native machine code, there is no difference. Is there any check during runtime whether one can access the member or not? I'm not totally sure but I would think this is part of the Type-loader. Code that (w/o Reflection) accesses a private variable that it shouldn't know about has to break a rule somewhere.

Categories : C#

Cross compiler prefix and path in eclipse
If you are using a Mac, you can select MacOS GCC instead of Cross GCC. If you are on Windows, you will have to install a C++ compiler. I recommend you install Cygwin, try following the directions here. http://www3.ntu.edu.sg/home/ehchua/programming/howto/eclipsecpp_howto.html Once you've installed the C++ compiler, restart Eclipse and try to create the project again. Hope this helps.

Categories : C++

how to compile projects with cross referencing packages in eclipse
Yes, it is allowed but discouraged. This is called cycle dependency between packages. To compile it you compile whole source directory and compiler takes care of these dependencies.

Categories : Java

Eclipse : To activate this refactoring, please select a set of compilation units, packages, source folders or Java projects"
You haven't told Eclipse enough about your sources for it to do a correct refactoring. As it mentions, it needs a Java project (a specific term in Eclipse for a project it creates, not just a collection of folders somewhere on your hard drive). http://www.vogella.com/articles/Eclipse/article.html#firstjava_project

Categories : Eclipse

cross memory attach. Not able to send the remote address using pipes
In the parent it should be: printf("The address of the rcvd buffer : %p ", (void *) readbuffer); as a pointer value (an address) shall be printed not the "string" it's pointing to. Also the code does not make sure that sizeof(readbuffer) bytes were received, not even that the call to read() did not fail. Update: As also mentioned by Peter in his answer, to read/write the value of readbuffer it is necessary to pass its address to write()/read(): write(fd[1], &readbuffer, sizeof(readbuffer)); ... nbytes = read(fd[0], &readbuffer, sizeof(readbuffer));

Categories : C

Eclipse gtkmm cross-compiling for Raspberry Pi, can't find file ft2build.h even though it does exist
I created a new project, set up for cross-compiling as before. I then installed gtkmm on my Raspberry Pi, before copying the /usr/ and /lib/ folders from the Pi's SD card to my laptop. Once this was done I went to (project)Properties->C/C++ Build->Settings. I then added all of the includes listed by pkg-config gtkmm-3.0 --cflags to Cross G++ Compiler->Includes, and all of the libraries listed by pkg-config gtkmm-3.0 --libs to Cross G++ Linker->Libraries - BUT I changed the paths to point to the Pi's library files. As before, I had to disable freetype fonts in cairo. It still didn't build though, because the included libraries have others they depend on in turn. So the final step was to find and include all of the listed libraries in the Pi files I had copied over. The simple gtkmm

Categories : Linux

Cannot Access Memory Adress at error when trying to access a shared data array with pthreads
*data[i]->array = *array; just copy the first element. you may use struct a { int* array; } and then, just copy the pointer. data[i]->array = array;

Categories : C++

Access PHP File Cross-Domain
I've not used it yet so can't give an example but I'm going to need to do the same soon. Try researching "symbolic links". That is if your using UNIX. If IIS you can use "virtual directories" Essentially both methods are creating faux folders that seem as if they are in your directory structure to a web user.

Categories : PHP



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.