Jul 30, 2011

Why virtual machine for in-mobile applications ?


Why mobile phones, tablets, etc.. runs Java applications ? Okey, Java is good for web development, but why they are preferring Java for in-mobile applications ?
When we think about virtual machine what comes to our mind is Java or Java Virtual Machine. It has the advantage of 'compile once' and use it on any computer architecture without compilation, i.e platform independent. That is good from developer point of view, but what ever these Java guys claims, it is slower than any direct executable applications developed in C/C++.


Consider the case of Android running devices like Tablets, Mobiles. With the release of android each and every mobile manufacturers are now migrating to Android OS. A very good OS, I could say. But all applications on the android are running  on android on the top of Dalvik Virtual Machine (Just another virtual machine like JVM). 
This is a very good business model. Because any one can write application for android and that will run on any android based mobile devices independent of hardware. So the popularity of Android OS increases and that is what the OS vendors want. From the user point of view, he can install and run any applications on mobile, but it will be slow. This is the problem, the applications will be horribly slow.

Make applications fast is very simple. Say bye to this virtual machine methodology in in-mobile apps. Get the plain GNU/Linux as it is and port it into the tablet PC. It is not as easy as I said, I know :). But if H/W vendors collaborate with Linux to port it into Tablet PC, then open source applications can run directly on the top of Linux running in the mobile/Tablet. May be we would have to compile the source to install applications on the PC. May be it is cumbersome, but in the long run what matters is the speed. Wouldn't it be nice to be able to run applications in Tablets in Desktop speed.
There are cases in which java/virtual machine based systems are inevitable. For example: web applications, where platform independent codes has to co-exist together. A solution to this is an integrated system in PDAs where java and direct executable binaries  ( which developed in C ) work together.
With broad range of mobile phone vendors' count, I know that it is not going to be easy to make this possible but vendors like Apple or Blackberry can think of it as they have very limited number of hardware verities available.
When I browsed for this topic I came across a tablet PC developed by India. I think a collaboration with manufacturers like them can bring up research on this field and come out with applications runs directly on Linux based Tablet.

References:
Java Trap by Richard Stallman : http://www.gnu.org/philosophy/java-trap.html
India unveils Tablet PC : http://www.youtube.com/watch?v=lj4Cb3Jya2Q

Jul 7, 2011

Cross compile gcc source for arm-cortex-m3 (I am using LPC1343) in Ubuntu/BOSS

This post includes methods to cross compile gcc source against ARM-Cortex-M3 target and use it to compile a program to blink LED in an LPC1343 board. The environment I used is Ubuntu 10. It may work with other platforms also. I tested this in Ubuntu lucid lynx and BOSS-2.6.22-3-486 ( Bharat Operating System Solutions ). This I tried referring this blog post.

For Web Developer

  open -a "Google Chrome" --args --disable-web-security