Jump to content
bjbance

CCSv4 vs Energia

Recommended Posts

Even though I use native mspgcc, I've experimented with CCS a bit on Linux over the past year and a half, and I've never found it to be slow...  And my main desktop is 6 years old, although it was high end when I built it.

 

I've never understood all of this Java hate.  I've found it give good for its purpose:  Writing cross-plaform code for virtual machines that run on just about everything.  Was it slow on a p200?  Sure.  That was like 15 years ago.

 

I haven't tried Energia yet, but I will have to give it a shot.

Share this post


Link to post
Share on other sites
I've been using CCSv4

 

Is there some reason you are using that vs CCS v5? With version 5 they dumped some of the custom plugins they had developed that seemed to cause crashes and slowness in version 4.  When I originally tried out CCS v4 I was amazed how far removed from the latest version of Eclipse it was.  The CCS v4 version didn't even do source code formatting.  The kind of source code formatting that happens with a right click and allows you to pick a variety  coding styles K&R, BSD, AT&T or  even a version with your own custom code style features.

 

With Energia I really miss the source code inspection feature that automatically scans your source and provides hover help and function argument autocomplete.  I tend to do most of my coding in Eclipse using this feature. CCS v5 feels more like standard Eclipse than version 4 does.

Share this post


Link to post
Share on other sites

I've never understood all of this Java hate.  I've found it give good for its purpose:  Writing cross-plaform code for virtual machines that run on just about everything.  Was it slow on a p200?  Sure.  That was like 15 years ago.

1). it can be slow.

2)  it can be a security hazard.

3)  it can cause system instabilities.

 

Granted, all of these problems can exist in any program made with any language. However, java being so easy to use without having to understand how it *should* be used is a big problem by its self. Grace, and code composer studio are two prime examples. Now if you do not think CCS is slow, go watch the MSP430 launchpad workshop videos, and watch how the guys from TI sit and wait for the IDE to catch up on many occasions. This is similar to my own experiences, and Grace is far worse( stand alone app ). My laptop is less than a year old too. Technology wise, less than 3-4 years old.

 

Anyway, there are far better ways to make applications cross platform. Many language cross over between platforms too. Personally I feel that Mono is a prime example, but if that does not work for you. You have Python, Perl, GTK+ wxWidgets, MAF, etc. Not to mention newer technologies such as browser app technologies, and something I have been keeping an eye on once in a while, called monogame ( name is misleading ) Link, which can cross platforms with as much as 95% code reuse.

 

So when you ask the above question, I have to ask back. With so many different / better technologies out there, why even consider java ?

Share this post


Link to post
Share on other sites

I've never understood all of this Java hate.  I've found it give good for its purpose:  Writing cross-plaform code for virtual machines that run on just about everything.  Was it slow on a p200?  Sure.  That was like 15 years ago.

What's dumb about Java is that the premise it was designed towards is no longer relevant.  1990: dozens of active CPU architecture families.  2012: basically three: ARM-32, x86, PPC.   And PPC is a game-console industry phenomenon at this point, which is an industry that doesn't use Java.  So, practically just two architecture families.  

 

Moreover, the original motivation was to run a program on a coffee machine (hence, Java).  Java in embedded never really panned-out.  Remember ARM-926J?  That went the way of the Dodo.  I think the set-top box industry, once a Java stronghold, is now moving away.  There are so many GUI toolchains available now that the GUI kits Java includes are no longer critical features.  Qt is a shining example.

 

Some programmers like Java libraries and tools, and that's fine, but Java's immediate future is really in AoT (ahead of time) compilations rather than with bytecode.  That said, you can get the same safety features in Ada, which is everything Java should be minus the bytecode... and it has a similar performance profile as objective-C, which is to say a lot better than Java.  Now there's also "Go" which seems to be C with safety features.  My opinion is that no one should be trying to learn Java apart from occupational necessity.  If you already know it, great, just know it's this generation's Fortran.

Share this post


Link to post
Share on other sites

Energia > CCS in terms of cost, ease of use. CCS > Energia in terms of features.

 

Aside from that, they're basically capable of the same thing. As far as the ease of use goes, from the aspect of using the Energia framework. It comes at the cost of speed, and code size on the target. Granted you can minimize this somewhat by being careful as to how you use it, and what you use. And as with anything else there is always a learning curve.

 

Really though the only way you're going to know, is by picking it up, and using it. No one  else here knows what your priorities are. Or what *you* care about.

yes. i think i will give energia a whirl after i finish my current project.

 

Depends on which question is being asked.

 

Is the toolchain native? yes as I stated before we have pre compile binaries. There is a Win32, Linux and Mac OS version shipped with appropriate version of Energia.

 

Where is it located? The toolchain is stored as a zip file in the github build directory of each platform. When you use 'ant clean buid run', the zip file for the appropriate platform is extracted and placed in directory below the top level Energia directory and repacked with the compiled java classes and native jar files required by that platform.  look for msp430-gcc under the directory where you expand Energia.

 

If you are asking where the java runtime is? It depends on the platform.  With Windows the code is part of what gets built and packaged using launch4j. ( http://launch4j.sourceforge.net/ ) With Linux we expect you to supply the java.  With Mac OS I'm not sure. I mainly focus on the linux build.

 

The source code is all up on github.

 

-rick

i just wanted to know whether the energia executable we can download is a native application, or if it requires javaw.exe to be running. or does it come in two variants?

 

A common reason that java applications are slow is that anti virus programs will verify java and each of its jar file which can be quite large.  On my setup with linux  Energia starts up appears quickly as I'm not running any virus stuff.  The few times I've tried it on windows it also launched quickly ... seconds not 10s of seconds.  But then again I wasn't running any anti-virus. I just tried on a 2009 imac and it was ready to run in less than 4 seconds... again no virus program.

 

-rick

i've also given up on av software a long time ago. :grin:

 

Is there some reason you are using that vs CCS v5? With version 5 they dumped some of the custom plugins they had developed that seemed to cause crashes and slowness in version 4.  When I originally tried out CCS v4 I was amazed how far removed from the latest version of Eclipse it was.  The CCS v4 version didn't even do source code formatting.  The kind of source code formatting that happens with a right click and allows you to pick a variety  coding styles K&R, BSD, AT&T or  even a version with your own custom code style features.

 

With Energia I really miss the source code inspection feature that automatically scans your source and provides hover help and function argument autocomplete.  I tend to do most of my coding in Eclipse using this feature. CCS v5 feels more like standard Eclipse than version 4 does.

i believe its because v4 is the one with the code limited free version, if I am recalling correctly. if v5 has the same, please kindly share the link.

 

As someone who lives and breathes the JVM (which includes Java, Groovy, Scala, Clojure, JRuby, Jython, etc etc etc), the degree of ignorance in this thread is jaw dropping.

please enlighten us so that it can be reduced maybe to jaw slacking maybe. :grin: no, really. let's just share information without flaming

Share this post


Link to post
Share on other sites

A common reason that java applications are slow is that anti virus programs will verify java and each of its jar file which can be quite large.  On my setup with linux  Energia starts up appears quickly as I'm not running any virus stuff.  The few times I've tried it on windows it also launched quickly ... seconds not 10s of seconds.  But then again I wasn't running any anti-virus. I just tried on a 2009 imac and it was ready to run in less than 4 seconds... again no virus program.

 

-rick

 This could be what I am experiencing. I do run Microsoft security essentials, which for an A/V app is pretty minimal resource usage wise. On windows XP, I ran no A/V as I was very familiar with the OS where security was concerned. I knew which processes were running, and how many. As well as how to remove/spot any virus I did happen to run into. Which at  that time was always on customers systems ( I ran my own IT business for a short while ).  

 

With Windows 7 . . . Let me just say that I no longer have the time or energy to keep up with security as I once used to. Granted, 99% of the malware out there today is only successful because of social engineering, and I just find spending the time reading about such information takes up far too much of my life.

 

Oh and yeah Rick, CCS takes a long time to startup for me, but is not really what I am concerned about. I can live with long startup times. What bothers me is the sluggishness that happens while using it. Busy cursor, actions taking more than acceptable time to process, etc.

 

On another note, I never really paid much attention to how well / fast JRE apps run on Linux, but several years ago when I ran openSolaris, I found that java applications ran fairly well.

 

For Windows,  my experiences for the last 10+ years or so is where my bias comes from. Concerning JRE / JVM.

Share this post


Link to post
Share on other sites

i believe its because v4 is the one with the code limited free version, if I am recalling correctly. if v5 has the same, please kindly share the link.

 

 CCS v5.3 gives the same 16kb limitation as does CCSv4. For MSP430's. Search the CCS wiki, and eventually you'll run into the information. Or just download, install, and select 16kb unlimited licence. You'll need to install the MSP430 plugin stuff manually at install though I believe. Before this option shows up. Either way,the instructions are all listed on the CCS wiki.

 

Also for what it is worth. The Stellaris launchpad is board locked unlimited in CCS v5

Share this post


Link to post
Share on other sites

Again for what it is worth. I found that creating a new workspace directory makes CCS ask for licensing information again. The first time I selected the 90 day trial, and had some issues with CCS crashing, and what not. So I updated CCS, then Created a new workspace, *viola* CCS asked for licensing information again.

Share this post


Link to post
Share on other sites

 

i believe its because v4 is the one with the code limited free version, if I am recalling correctly. if v5 has the same, please kindly share the link.

 

please enlighten us so that it can be reduced maybe to jaw slacking maybe. :grin: no, really. let's just share information without flaming

 

Energia runs on the JVM - so it needs one in its path to run.

 

On Mac OS X up to Lion, one was provided by Apple already on the machine, with 10.8 (Mountain Lion) once you request to run an application that would use Java, it asks you if you want to download and install it. Apple has ceded control of the JVM back to the Open JDK - so now there is an open version which is always very up to date, and an Oracle version which has proprietary code in it. 

 

On Linux, Energia expects you to install the JVM yourself using whatever mechanism your flavour uses.

 

On Windows I'm sure he said that they bundle it, but you normally need a license for that so I'm not sure how thats happening.

 

Most Java IDEs are either Swing or SWT (which is what IBM invented for Eclipse, and ticked Sun off immensely). The IDEs have a tendency to be slow only because they are trying to do so much - its the Microsoft Word problem, the try and bundle more and more features and you spend so much time trying to turn them off. That said, a big reason for their success are their plugins - an IDE lives and dies by its plugins. The Processing IDE does not appear to support plugins - much of my searching turned up moving to Eclipse or Visual Studio.

 

The JVM is not much used on the client side any longer, only really in IDEs for JVM programmers and in scripting for DevOps (as opposed to Sysops who are more likely to use bash).

Share this post


Link to post
Share on other sites

My opinion is that no one should be trying to learn Java apart from occupational necessity.  If you already know it, great, just know it's this generation's Fortran.

 

???

So what's the language you'd learn?  You do realize that students are no longer taught C/C++ in school unless they take the OS design elective?  They all come out w/ Java skills because it's the "standard'....let by Android.

Bytecode compilers have gotten reallllly good...a lot are fast enough to run at the speed of native C/C++ code now...

Share this post


Link to post
Share on other sites

No way, the great drawback of Java is that the byte order (endianness) is designed for the Sun SPARC, which is different from the i386/amd64 architecture. This means that for every integer with a size greater than 1 byte, byte swap operations need to be done.

I would never want to program a low level microcontroller with a Java interface.

I agree that for high end applications (desktop or phone) you don't want to code in C. C++ is very useful for bare bone development (like OS design) on these platforms, thanks to its speed. For the actual applications, there are three reasonable frameworks;

  • Java (although I hear more and more people getting rid of JRE on their machines)
  • C#/oC (for Windows/Mac)
  • ECMAscript

What? ECMAscript, what's that? That's JavaScript, or actually, the standardised verion of it. For good order; Javascript is not in any way related to Java, they just happen to be built initially in the same company. Javascript is a Scheme implementation, which was required by managament to look like C, but isn't. It is actually very fast and efficient, but you need to be really aware of what you're doing, as it is not like C, it just tends to look that way.

 

The language you learn shouldn't be of that much importance, but I doubt Java will be around in ten years, maybe even five. A friend of mine if teaching programming in Haskell, though I'd rather not. I started out with Qbasic, then Pascal, C and C++.

Share this post


Link to post
Share on other sites

???

So what's the language you'd learn?  You do realize that students are no longer taught C/C++ in school unless they take the OS design elective?  They all come out w/ Java skills because it's the "standard'....let by Android.

Bytecode compilers have gotten reallllly good...a lot are fast enough to run at the speed of native C/C++ code now...

Why is bytecode important?  It doesn't matter if bytecode compilers are really good -- bytecode is a stupid idea in 2013.  Bytecode made sense in 1995 when there were dozens of architectures and software was distributed on CDs.  Now there are two architectures, and software is distributed dynamically via the internet. 

 

The fact that Android uses Java in the SDK (but not the NDK) is probably one of the reasons why Android phones typically seem to have energy problems compares to iPhones.  Java was a big mistake on Google's part.  They have Go now, they probably should have used that.  I wouldn't be surprised if one day Google does offer a Go-based SDK for Android, or at the very least starts emphasizing AoT compilation of Java apps.  Some of the embedded Java SDKs have AoT configuations.  Guess what, you can still get garbage collection and all that other stuff.

Share this post


Link to post
Share on other sites

Why is bytecode important?  It doesn't matter if bytecode compilers are really good -- bytecode is a stupid idea in 2013.  Bytecode made sense in 1995 when there were dozens of architectures and software was distributed on CDs.  Now there are two architectures, and software is distributed dynamically via the internet. 

 

I'd actually argue the opposite. Byte code actually makes more sense now, compared to the older hardware run in the 90's. We have more horsepower now than we'll ever need in computer based systems today. Speaking strictly from an interpreted language standpoint that is.

 

I can see the merits in languages such as Java, but I do not like how they're implemented, and how shoddily students are taught languages such as this in school. However, as a way to get projects working across different platforms, I think it is really hard to beat interpreted languages. On a personal level however, I think Mono deserves more attention than Java. Mainly because I like the implementation better, but also because while Mono being based on the Microsoft .NET framework, it holds no ties to any one given entity as Java, and .NET do.

 

Granted, on other levels, you have all kinds of frameworks out there now days that ease portability tremendously. One example that pops into mind immediately is Qt. Frameworks like this also demand language usage such as C or C++. Which IMHO means someone is actually going to have learn a proper language, thus, hopefully, learning to develop code properly. Instead of recklessly wielding a car around, like a drunken teen on prom night.

 

In the case of android however, yeah I am not sure how I feel about that. I really do like the software Architecture behind Android, yet have an extreme dislike for Java. The Android dev team claims that java code written for the Android devices is just as fast as, if not faster than Native code written for such devices(in many / most cases ). However, I am a bit dubious, and assuming this were true, I would have to question the underlying code of such a platform.  In either case, there is always native code possibilities for Android. . .

 

Anyway, I've beat this horse to death. Time to move on.

Share this post


Link to post
Share on other sites

I'd actually argue the opposite. Byte code actually makes more sense now, compared to the older hardware run in the 90's. We have more horsepower now than we'll ever need in computer based systems today. Speaking strictly from an interpreted language standpoint that is.

This is a bad argument for two reasons.  One, the extra computing speed benefits everything, not just VMs.  I argue that no longer is the build-run software model perceptibly different than the JIT model is, for testing, and for release it is superior (see Clang).  Two, more systems today are battery-powered than ever.  Batteries aren't getting better.  There is no shortage of quantifiable metrics that show how VM-based software burns energy prodigiously on modern CPUs (see Carat).  

 

To repeat the main argument, the features that people like about Java aren't necessarily due to the fact that it uses bytecode.  I don't see Java continuing as a predominantly VM/JIT technology.  In computing, trends do change and practices do change.  They happen as the market demands.  Battery-runtime is an important metric for marketing, now, and VM portability just isn't.  Maybe the legacy of Java and other VM languages is that they gave rise to Clang/LLVM.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×