Archive

Posts Tagged ‘eclipse’

CoAction Hero – Low Cost ARM Cortex-M3 Board Running Open Source CoActionOS RTOS

April 29th, 2013 6 comments

CoAction Hero is a tiny board based on an ARM Cortex-M3 micro-controller (NXP LPC1759), that makes use of  CoActionOS ecosystem that includes the hardware, but also an open source RTOS allowing multiple app to run concurrently, and a graphical interface to communicate with the board.

CoAction_Hero

First, let’s have a look at the hardware specs:

  • Micro-controller – NXP LPC1759 ARM Cortex-M3 processor @ 120MHz with 64kB RAM and 512kB  Flash ROM.
  • Storage – 1MB serial flash chip (pre-loaded with CoActionOS)
  • Expansion port
  • micro USB connector.
  • 40 I/O pins are available on both sides of the board, and the board can be inserted in a breadboard.

CoAction_Hero_Block_Diagram
You can currently connect 2 modules to the board: Bluetooth and LCD device boards.

CoActionOS RTOS will come pre-loaded on the board, and if you don’t want to, you don’t even need to know it’s there, and it’s use will be transparent. But let’s have a quick look at this real-time OS, which allows multitasking on Cortex M3 MCU, supports an unnamed filesystem, and they also provide a C/C++ library to help with hardware peripherals (GPIO, ADC, SPI, UART,…) programming.

coactionos-firmware-architecture

Documentation, source code, and tutorials are available on CoActionOS website.

The desktop development environment, based on Qt 4.8 and GCC, currently runs on Windows and MacOS, with Android and iOS support coming once Qt 5.x is available for those mobile OS. Linux may also be supported at a later stage. The board connects to your computer via its micro USB port, and CoActionOS Link software allows you to browse the board’s filesystem, provides terminal access, install programs, re-flash the kernel, and monitor running processes. They recommend using Eclipse for compiling programs.

CoActionOS-Link

Several example projects are showcased on their kickstarter page such as driving a 1.8″ LCD, a DC Motor with PWM and PID, and an LED strip.

You can pledge as low as $29 to get the CoAction Hero board with a USB cable, and with a $99 pledge, you can add the Bluetooth and LCD expansion boards. Devkits should ship to backers in July 2013.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

Using ARM Development Studio 5 (DS-5) Streamline with MK802II mini PC

April 24th, 2013 1 comment

MK802-II is an Android 4.0 mini PC powered by AllWinner A10 (ARM Cortex A8) with 1GB RAM and 4GB flash. Instructions are also available to run Ubuntu, or other Linux distributions. ARM Development Studio 5 (ARM DS-5) is software development tool suite for ARM processors that can be used for both Linux and Android debugging, and available in 2 versions: professional edition and community edition, the latter being free of charge. I’m writing about both today, because Bob Peng, Technical Marking Engineer for ARM China, recently wrote a blog post in Chinese [Update: An English version is now available] showing how to use MK802-II, preloaded with the required drivers and daemon, with DS-5 Streamline Performance Analyzer with is part of both versions. The community edition may be missing some features of Streamline however.

Streamline Performance Analyzer allows you to:

  • Find out which modules or functions to take up most of the CPU, in order for you to optimize the affected code to speed up code execution speed.
  • Monitor power, current and voltage in real-time, so that you can optimize the CPU tasks to achieve the best performance at the lowest power consumption.
  • Analyze and optimize ARM Mali GPU in real-time, monitor CPU & GPU cache usage, and system memory usage.

Before using DS-5 Streamline Performance Analyzer, you normally need to setup your hardware development environment, and manually compile DS-5 gator driver for Streamline daemon. If you’re just an application developer, it can be a pain because you don’t usually care about low level stuff like compiling the kernel and modules, and your application is (mostly) hardware independent. That’s why, the ARM team in China, as chosen MK802-II as as low cost (about $35) development platform, and pre-built all you need to get going with DS-5 Streamline.

The trick seems you need to buy Rikomagic MK802II mini PC from a specific Aliexpress shop, and ask them to install DS-5 gator driver during the purchase, and you’ll also find ARM DS5 Streamline starting guide and USB driver in /home/ARM-DS-5 directory according to the shop. Sorry, I could not find a link to download the binaries and USB driver (USBDriver_MK802ii.zip) if you already have such device… Let me know if it’s available somewhere. I assume they decided to proceed this way to avoid having to handle different firmware versions, and if you want to use an existing device you should be able to build this yourself.

The instructions to configure the TV Dongle and your computer (Windows, Linux or Mac), install ARM DS-5 (PE or CE) are explained in details in the post, but I’ll skip that, and write directly about the things you can do with Streamline and MK802-II.

Once all is configured properly, you can start ARM DS-5 to analyze your application:

  1. Timeline view – CPU performance analysis
    DS-5_AllWinner_Dongle_CPU_TimelineThe part you want for the CPU usage analysis in the screenshot above is the linux Scheduler, branch, and clock section, but this view also include GPU vertex and fragment and Disk IO, and other GPU parts shown in the figure below.
  2. Timeline View – Mali GPU Performance Analysis
    DS-5_AllWinner_Dongle_GPU_Timeline
    Scrolling down the Timeline View, you’ll find more details about GPU usage such as geometry statistics and GPU vertex processor activity, but you’ll also get information about memory usage, interrupts and more.
  3. Call Paths View
    DS-5_AllWinner_Dongle_Call_PathsThe call paths view is supposed to show how functions are called, but since they just used the Android Browser for testing it mainly shows the libraries which have been called and the CPU usage.
  4. Functions view
    DS-5_AllWinner_Dongle_FunctionsAgain, the example above is not optimal because they used a release binary, but it still shows you which libraries takes the most CPU usage.
Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

ARM MCU Development in Linux with Energy Micro’s Simplicity Studio, Eclipse, and CodeSourcery Toolchain

January 31st, 2013 7 comments

Quite a few months ago, I received an Energy Micro EFM32 Tiny Gecko Starter Kit, but I haven’t done much with it. But recently I saw a tweet from EnergyMicro about Simplicity Studio supports for Ubuntu, and I know it can be problematic to find proper tools for ARM MCU development in Linux, so I decided to give it a try. The first part is about Simplicity Studio, and energyAwareTools which are specific to Energy Micro, but the second part deals with setting up Eclipse and CodeSourcery ARM toolchain for MCU development which should be reusable for other MCUs from vendors such as Texas Instruments, NXP and STMicro. I’ve used a PC running Ubuntu 12.04 64-bit with the instructions below.

Installing Simplicity Studio and energyAwareTools in Ubuntu

Simplicity Studio is part of the 4 steps of the getting started guide with EFM32 MCUs. It has been available for Linux for a few months, here’s how to install it in a terminal window:

  • Create a directory where you want to install the tools, e.g.:
    mkdir ~/edev
    cd ~/edev
  • Download and extract Symplicity Studio for Linux (This will create energymicro directory automatically):
    wget http://cdn.energymicro.com/dl/packages/studio_linux.tar.gz
    tar xzvf studio_linux.tar.gz
  • Run Simplicity Studio:
    ./energymicro/studio.py

That’s it. It’s very easy and it worked “out of the box” for me.

Simplicity Studio Ubuntu

Then click on Add/Remove to install the required documentation,  firmware and samples. I went the “brutal” way and just installed everything. It just took 15 minutes.

Energy Micro tools are not integrated (yet) with Simplicity Studio for Linux, but you can download the latest version on Energy Micro download page.

I first used the current stable version of the tools (eACommander, eAProfiler and eADesigner), and then installed the latest beta (2.72) for energyAwareCommander:

cd ~/edev
wget http://cdn.energymicro.com/dl/packages/energyAwareTools_25052012.tgz
tar xzvf energyAwareTools_25052012.tgz
cd energymicro
wget http://cdn.energymicro.com/dl/packages/energyAwareCommander_linux_pkg_2.72-beta.tar.gz
tar xzvf energyAwareCommander_linux_pkg_2.72-beta.tar.gz
cp eACommander/eACommander bin
cp eACommander/JLinkExe bin
cp eACommander/JLinkGDBServer bin
cp eACommander/libjlinkarm.so.4 lib/libjlinkarm.so.4

Since the binaries are build for Linux 32-bit, you may have to install a few i386 packages such as:

sudo apt-get install libreadline5:i386

Don’t try to install “libicu48:i386″ even if you see a warning, this will mess up your system. First I did not pay attention, blindly answered “Y”, and it removed 991MB from my installation include libreoffice, gimp and unity support…).

To be able to access the USB device as a standard user, you need to add a file for udev, and change some permissions:

sudo cp doc/45-jlink-NEW.rules /etc/udev/rules.d/
sudo groupadd plugdev
sudo usermod -a -G plugdev <username>

Restart your system. And you can try energyAware Commander:

cd ~/edev/energymicro
./eACommander.sh

energyAware Commander in Ubuntu

It can connect via J-Link, and detect the board but trying to update the firmware resulted in the error “Failed when asking kit to reset”. I’ve also tried to run the demos without success. Anyhow, let’s move to the next step that is building our own app in Linux, and run them on the target.

Installation Eclipse in Ubuntu for Energy Micro Gecko Starter Kits

I knew I wanted to use an IDE in Linux to build and debugging the code, but among the list of third party tools listed on Energy Micro website, I was not too sure where to go. Luckily, somebody asked for the “Recommended IDE on Ubuntu” on Energy Micro forums, and the answer seems to be Eclipse + CodeSourcery ARM EABI toolchain. There’s also an application note to do just that for Windows, and I’ll use that to write  instructions for Ubuntu or other Linux distributions.

First download and install Sourcery CodeBench Lite for ARM EABI and eclipse:

wget https://sourcery.mentor.com/GNUToolchain/package10926/public/arm-none-eabi/arm-2012.09-63-arm-none-eabi-i686-pc-linux-gnu.tar.bz2
tar xjvf arm-2012.09-63-arm-none-eabi-i686-pc-linux-gnu.tar.bz2 -C ~/bin
sudo apt-get install eclipse

Now start eclipse, and install some plugins by going to “Help->Install New Software”, and add http://download.eclipse.org/releases/indigo to “Work With field”. Then browse to “Mobile and Device Development”, and select “C/C++ GDB Hardware Debugging”. Press the Next > button, and follow the instructions.

Eclipse GDB Hardware Debugging

Repeat the same instructions with http://embsysregview.sourceforge.net/update to install Embsys Regview (Optional, and I haven’t tried it yet).

We can now start a new project using some sample code. I’ve tested it with blink and lightsense samples, and write the steps with blink sample below.

First go to File->New->Project-C/C++->C Project, and click Browser to navigate to blink sample project we’ve downloaded with Simplicity Studio (the path is energymicro/kits/EFM32TG_STK3300/examples/blink for my starter kit). Select Empty Project and “Linux GCC”, and click Finish.
Energymicro_Eclipse_Blink_Project
Then click on Project->Properties, and do the following modifications:

  • C/C++ Build: Modify build directory to ${workspace_loc:/blink/codesourcery}.
  • C/C++ Build->Discovery Options: Uncheck the Automatic discovery of paths and symbols checkbox.
  • C/C++ Build->Settings: Check the GNU Elf Parser checkbox.

Click the OK button. In blink/codesourcery, copy Makefile.bli

nk to Makefile, and change LINUXCS to the path you’ve installed CodeSourcery toolchain, e.g.:

LINUXCS    ?= ~/bin/arm-2012.09/

We can now build the code. Select Project->Build Project, and within a few second you should see the build is successful in the Console tab.

Let’s configure the debugger. First run J-Link gdb server in a terminal window:

cd ~/edev/energymicro
./gdbserver.sh

In Eclipse, click on Run->Debug Configuration, Highlight GDB Hardware Debugging, right-click to select New, and do the following modifications:

  • Main tab: Click the Select other… link on the bottom where it says Using GDB (DSF) Hardware Debugging Launcher and select the Standard GDB Hardware Debugging Launcher instead, and apply by clicking the OK button.EnergyMicro_Eclipse_Debug_Configuration
  • Debugger tab: Enter the full path to arm-none-eabi-gdb in the GDB command field. (e.g. /home/jaufranc/bin/arm-2012.09/bin/arm-none-eabi-gdb)
  • Debugger tab: Make sure  Use remote target is checked, with Generic TCP/IP JTAG Device and localhost as Host name, and set 2331 as Port number.
  • Startup tab: In the Initialization Commands text box, enter:
    set tdesc filename target-m3.xml
    mon speed 4000
    mon endian little
    mon flash download = 1
    mon flash device = EFM32TG840F32
    mon reset 1
  • Startup tab: Check the Set breakpoint at: checkbox in the Runtime Options frame, and write main in the textbox.
  • Common tab: Check Debug checkbox in the Display in favorites menu frame.

Now click on Debug in the same Debug Configuration Window to start the program, the Eclipse display should change to Debug mode as shown below.

Eclipe Ubuntu Energy Micro Blink Debug

Eclipse Debug Window In Ubuntu with “Blink” Sample Running in Energy Micro Starter Kit (Click to Enlarge)

Now click on Resume (or press F8) to run the program (the USER LED should blink on the board), or add breakpoints, monitor variables as needed.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

Yocto Project Overview and Update – ELCE 2012

January 17th, 2013 No comments

Last post about ELCE 2012 videos

David Stewart, manager of the Yocto Project team within the Open Source Technology Center at Intel, gives an introduction to the Yocto Project, as well as a status update at ELCE 2012.

Abstract:

Yocto Project LogoThe Yocto Project is a joint project to unify the world’s efforts around embedded Linux and to make Linux the best choice for embedded designs. The Yocto Project is an open source starting point for embedded Linux development which contains tools, templates, methods and actual working code to get started with an embedded device project. In addition, the Yocto Project includes Eclipse plug-ins to assist the developer. This talk gives a walk-through of the key parts of the Yocto Project for developing embedded Linux projects. In addition, features will be described from the latest release of the Yocto Project, v1.3. The talk will include demos of some of the key new features such as the Build Appliance and Hob.

At the end of the talk, developers should be able to start their own embedded project using the Yocto Project and use it for developing the next great embedded device.

The slides do not appear to be available, but those should be very similar to the slides used for the Yocto Project Overview and Update presentation at the Embedded Linux Conference 2012 (US).

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

Canonical Announces Ubuntu for Phones

January 3rd, 2013 4 comments

Canonical has just announced the Ubuntu for Phones platform that will allows users to have similar experience on desktops (Ubuntu Desktop),  TVs (Ubuntu TV) and smartphones, avoiding the need to learn 2 different platform for the desktop and mobile devices.

Ubuntu for PhonesThe user interface replaces the “Lock screen” with the “Welcome screen”  (As shown in the middle of the picture above), which shows notifications and user data as you turn on your device. The user interface mostly eliminate buttons, and you can access features by swiping the edge of the phone. A swipe on the left edge will show the dash bar, giving access to most used apps and dash search, a swipe on the right edge will cycle through your opened apps, a swipe at the top will give access to notifications and allow changing settings right from there, and a swipe at a button will allow you to customize controls. Global search is also part of the OS, as a single search will bring local and network search results.

The best way to experience the OS is to watch the virtual keynote by Mark Shuttleworth. In the first 5 minutes or so, he discusses they key milestones reached by Ubuntu on 2012, but the real discussion about Ubuntu for Phones takes place between 5:10 and 13:40.

I found this mobile OS pretty neat. From 13:40 onwards, some industry testimonies are shown, and some information is provided for developers. Ubuntu for Phone will support both Web/HTML5 apps and native apps written using QML/Javascript/C++ in Eclipse giving access to OpenGLES runtime. He explains that porting Web apps running in Android or iOS to Ubuntu should be straight forward. For native apps, you’ll need to install Qt 5 and Ubuntu QML toolkit preview. Developers can get further information on Ubuntu for Phones developers page.

Marc Shuttleworth said the platform would be truly open with the development following the processes used for Ubuntu desktop. There are 2 key markets for this new phone OS:

  • Enterprise. As companies may want to streamline their operations by using a single device to be used as a phone, thin client and desktop. Management should also be easier.
  • Consumer. For those who want a different user experience.

One last very interesting point brought by Marc Shuttleworth is that Ubuntu for Phones can work with Android kernel and drivers, which means if your phone can run Android, it can also run Ubuntu for Phones.

Arstechnica reports that although no carriers and handset makers were announced, Canonical is aiming for a phone to be released in Q4 2013/Q1 2014. If you have a Galaxy Nexus (based on TI OMAP 4460), you’ll be able to test Ubuntu for Phones on your device within a few weeks. Ubuntu 14.04 will be one image that works across phones, tablets, and desktops.

There will be several other Linux based mobile platforms (Tizen, Sailfish OS and Firefox OS) coming out this year, so we’ll have to see how this will pan out, but it should be pretty interesting.

Via: Liliputing

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

Installing Android SDK on Ubuntu 12.04

July 14th, 2012 5 comments

The official instructions to install Android SDK do not appear to be really up-to-date for Ubuntu 12.04, so I’ll post how I’ve installed the Android SDK and Eclipse on Ubuntu 12.04.

First download and decompress Android SDK for Linux:

wget http://dl.google.com/android/android-sdk_r20-linux.tgz
tar xzvf android-sdk_r20-linux.tgz

on 64-bit Ubuntu:

apt-get install ia32-libs

Sun Java is not part of Ubuntu packages anymore, so you’ll need to use openjdk instead

apt-get install openjdk-6-jdk

Now install the SDK

cd android-sdk-linux/tools
./android sdk

Android SDK Manager should show up.

Android SDK Manager in Ubuntu 12.04

Use the default recommended packages and platforms, as well as any extra packages you may need, and click on Install x packages, accept all licenses and after installation is complete, the Android SDK is installed.

Eclipse IDE is optional, but it’s the most widely used IDE to develop Android apps. You can install Eclipse as follows:

sudo apt-get install eclipse-jdt

Once both Android packages and platforms, and eclipse are installed, start eclipse:

eclipse

Then in the top menu, click on Help->Install New Software, then click on Add and enter “ADT Plugin” for the Name and the following URL for the Location:

https://dl-ssl.google.com/android/eclipse/

Click on OK, and Check “Developer Tools” and click Next, and complete a few more easy steps until the installation completes.

The final step after you’ve installed ADT and restarted Eclipse, is to set the location of the Android SDK directory. Select Window->Preferences…, select  Android and click on Browse to set the location of your Android SDK directory (android-sdk-linux), then click on Apply and you should see a list of Android SDK targets.

Click on OK. That’s it, you’ve now installed and configured the Android SDK and Eclipse in Ubuntu, and are ready to get started with App development.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

Android SDK Tools and ADT Revision 17 with VM Acceleration for x86 Emulator

March 22nd, 2012 3 comments

Google has released revision 17 of the SDK Tools and the Eclipse plugin. This release brings new features and bug fixes in for Lint static checker, the build system, and the emulator among other things.

Here’s what’s new for Lint in r17:

  • Lint API Check – Added check for Android API calls that require a version of Android higher than the minimum supported version. You can use the @TargetApi annotation to specify local overrides for conditionally loaded code.
  • New Lint Rules – Added over 40 new Lint rules for a total of over 80, including checks for performance, XML layouts, manifest and file handling.
  • Ignoring Lint Warnings – Added ability to suppress Lint warnings in Java code with the new @SuppressLint annotation, and in XML files with the new tools: namespace prefix and ignore attribute.
  • New Eclipse Lint UI – Improved HTML and XML reporting and Eclipse integration.

Improvements to the build systems for Eclipse and Ant:

  • Better dealing with dependencies in Android projects – Added strict dependency support for 3rd party Jar files.
  • Support for custom views with custom attributes in libraries. Layouts using custom attributes must use the namespace URI http://schemas.android.com/apk/res-auto instead of the URI that includes the app package name. This URI is replaced with the app specific one at build time.
  • Run some code only in debug mode. Builds now generate a class called BuildConfig containing a DEBUG constant that is automatically set according to your build type. You can check the (BuildConfig.DEBUG) constant in your code to run debug-only functions such as outputting debug logs.

Emulator improvements:

  • Virtual Machine Acceleration for x86. The emulator now supports running x86 system images in virtualization mode on Windows and Mac OS X. This allows the emulator running at near native speed. The drivers are available through the SDK Manager. This is an experimental feature.
  • Multi-Touch input emulation. After adding webcam support and sensor emulation, Android added experimental support for Multi-Touch input through a tethered Android device.

Android also released an updated Support Library with the following improvements:

  • ShareCompat provides easy helper classes for both sending and receiving content for social sharing apps.
  • NavUtils and TaskStackBuilder provide cross-version support for implementing the Android Design guidelines for navigating within your app including the action bar’s “Up” button.
  • NotificationCompat.Builder provides a compatibility implementation of Android 3.0′s Notification.Builder helper class for creating standardized system notifications.
  • A new Library Project adds support for GridLayout back to API level 7 and higher.

You can get further information on Android r17 changes in the SDK Tools Release Notes and ADT Release Notes.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter