Cross Compiling Boost C++ Libraries for ARM

Boost provides free peer-reviewed portable C++ source libraries. Ten Boost libraries are already included in the C++ Standards Committee’s Library Technical Report and will be in the new C++11 Standard. The Boost C++ libraries are already included in popular Linux and Unix distributions such as Fedora, Debian, Ubuntu and NetBSD and are used by projects such as Python, Xibo, Civilization IV, etc.. Here are the steps to cross-compile Boost C++ libraries for arm using arm-linux-guneabi-g++: Download the source code:

Extract the source code:

Bootstrap the code:

Modify the configuration file (project-build.jam) to use the ARM toolchain by replacing the line with “using gcc” by:

Install the python development package:

Build and install the boost libraries:

This was tested in Ubuntu 11.04 (natty) and 10.04 LTS with linaro g++ toolchain. Jean-Luc Aufranc (CNXSoft)Jean-Luc started CNX Software in 2010 as a part-time endeavor, before quitting his […]

Redirect all output to a log file

When you build a program or execute a shell command, the messages are often outputted to both standard output and standard error. If you want to send all ‘printf’ to a log file, use the following command: make > make.log 2>&1 “2>&1”  is the part that redirects standard error to standard out, allowing you to capture all messages. Jean-Luc Aufranc (CNXSoft)Jean-Luc started CNX Software in 2010 as a part-time endeavor, before quitting his job as a software engineering manager, and starting to write daily news, and reviews full time later in 2011. www.cnx-software.com

Summary of Google Devfest 2011 Chiang Mai, Thailand

I attended Google Devfest 2011 in Chiang Mai, Thailand last Saturday (24 September 2011) . This was really interesting and enlightening. So if are a developer, I really recommend to register to a Devfest if Google comes to your city. I was relatively surprised by the number of attendees which I estimate between 150 to 200. This Devfest focused on three main subjects: Android HTML5 (and Chrome) Google Analytics Please find the complete schedule below: Track 1 Track 2 09:00 – 09:30 Keynote 09:30 – 10:30 Android Market for Developers (Ankur Kotwal) 10:30 – 11:00 AM Break 11:00 – 12:00 Bleeding Edge HTML5 (Eric Bidelman) 12:00 – 13:00 Implementing Google Analytics (Vinoaj Vijeyakumaar) 13:00 – 14:00 Lunch 14:00 – 15:00 What’s New and Important in Android (Ankur Kotwal) Displaying Large Geographic Datasets: Google Fusion Tables (Luke Mahe) 15:00 – 16:00 These Aren’t the Site You’re Looking For: Modern HTML5 Web Apps (Eric Bidelman) Working Off the Grid: HTML5 Offline (Ernest Delgado) 16:00 – 16:30 PM Break 16:30 – 17:30 Insights […]

Learn How to Optimize Android Apps for Tablet

After India and the US last month, Google will organize Android Developer labs sessions in Europe to train developers to optimize their applications for Tablets. Registration is now open for the following European cities: Berlin — September 28 and 29. London — October 3 and 5. Paris — October 27 and 28. Sometimes late October…, but you can register now. This ADL series isn’t another set of introduction-to-Android sessions, nor any other kind of general overview like you may have at Google Devfest. It’s specifically aimed at optimizing Android applications for tablets, in particular creating high-quality tablet applications to provide a polished user interface and an enjoyable user-experience. Registration is open to anyone, but as Google can only accommodate a relatively small number of attendees, they will select attendees who already have an high quality Android app with the potential to be a top-tier tablet app. This series of labs will teach you: The best practices […]

Select an ARM MCU during Development with Atollic TrueSTUDIO for ARM

Atollic has released the latest version of TrueSTUDIO development tool for ARM, a C/C++ development tool for embedded developer that looks similar to Eclipse. It supports micro-controllers from a number of semiconductor manufacturers, making it possible to switch MCU supplier during the design process. This release of TrueSTUDIO supports several ARM MCU cores such as ARM7, ARM9, Cortex-M0, Cortex-M1, Cortex-M3 and Cortex-M4 processors. It also includes device-specific support for an extensive list of ARM processor-based micro-controller families, including: Atmel AT91SAM, EnergyMicro EFM32, Freescale Kinetis, Fujitsu FM3, STMicroelectronics STM32, Texas Instruments Stellaris and Toshiba TX. As well as an optimizing C/C++ compiler and a multiprocessor-aware debugger, the tool also has serial wire viewer tracing, graphical UML diagram editors for model-based design and architecture, performs code-quality analysis via TrueINSPECTOR and TrueANALYSER and features a test-automation toolbox (TureVERIFIER). There is also an ECLIPSE-based IDE with editor, x86 C/C++ build and debug tools for development of […]

OpenCL (Open Computing Language) Overview and SDKs

OpenCL (Open Computing Language) is a multi-vendor open standard for general-purpose parallel  programming of heterogeneous systems that include CPUs, GPUs and other processors. OpenCL provides a uniform programming environment for software developers to write efficient, portable code for highperformance compute servers, desktop computer systems and handheld devices. OpenCL standard is managed and defined by the Khronos Group. The latest version (OpenCL 1.1) was ratified by the Khronos Group on the 14th of June 2010 and adds significant functionality for enhanced parallel programming flexibility, functionality and performance including: Host-thread safety, enabling OpenCL commands to be enqueued from multiple host threads. Sub-buffer objects to distribute regions of a buffer across multiple OpenCL devices. User events to enable enqueued OpenCL commands to wait on external events. Event callbacks that can be used to enqueue new OpenCL commands based on event state changes in a non-blocking manner. 3-component vector data types. Global work-offset which […]

Faster JPEG decoding on ARM with libjpeg-turbo and NEON Instructions

libjpeg-turbo is based on libjpeg, but uses SIMD instructions (MMX, SSE2, etc.) to accelerate JPEG compression and decompression on x86 targets. On such systems, libjpeg-turbo is generally 2-4x as fast as the original version of libjpeg with the same hardware. ARM does not support MMX or SSE2 instructions, but it has its own SIMD instructions processed by the NEON Engine on ARM Cortex Core A5, A8, A9 and A15. ARM claims that “NEON technology can accelerate multimedia and signal processing algorithms such as video encode/decode, 2D/3D graphics, gaming, audio and speech processing, image processing, telephony, and sound synthesis by at least 3x the performance of ARMv5 and at least 2x the performance of ARMv6 SIMD.” Linaro worked on libjpeg-turbo and added NEON support to it. The code is available on launchpad at https://code.launchpad.net/~tom-gall/linaro/libjpeg-turbo Linaro has also provide benchmark result for libjpeg-turbo with a 12 Mpixel image on TI OMAP4 (Pandaboard) using the […]

Best Practices for Writing Safer C Code

Thomas Honold wrote an article published on EETimes giving 17 steps to safer C code. Not only this article provides tips to write safer C code, but I believe those steps are simply best practices when writing C code for embedded systems as they shorten the software life cycle by making it easier for a software team to write, debug and maintain code and by improving the software QA procedure. Here’s a summary of the 17 steps to achieve safer C code: Follow the rules you’ve read a hundred times: Initialize variables before use. Do not ignore compiler warnings. Check return values. Use enums as error types. Define an ENUM_MAX value at the end, so that the code to check the range does not have to be modified each time you add a new error code. Expect to fail Always assume there will be an error and set to default […]

EmbeddedTS embedded systems design