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 […]

LinuxCon 2011 Presentation: Hosting Open Source Projects at the OSUOSL

The second presentation entitled  “Hosting Open Source Projects at the OSUOSL” was presented by Lance “Ramereth” Albertson, Systems Administrator / Architect at OSUOSL (Oregon State University Open Source Lab) at LinuxCon 2011. Abstract: This presentation describes the hosting infrastructure (data centers, networking etc..) and human resources at OSUOSL, lists some famous customers (linux.org, xiph.org), explains how to request hosting for your open source project, lists the software tools used in the hosting servers and finally deals with funding and the future of open source hosting services at OSUOSL. If you want to download the presentation slides, please go to Hosting Open Source Projects at the OSUOSL and use the download button on top of the Slideshare presentation. If it does not work, you may also download a copy here. 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 […]

LinuxCon 2011 Presentation: Fundamentals of Open Source Development

I’ll post links to the LinuxCon 2011 presentations made available via slideshare by Oregon State University Open Source Lab. There will be 5 blog posts with LinuxCon presentations. The first presentation is the “The Fundamentals of Open Source Development” by  Leslie Hawthorn, Outreach Manager and Jeff Sheltren, Operations Manager of the OSD Open Source Lab. The actual presentation took place on the 16th of August 2011 at LinuxCon 2011. Abstract: This presentation deals with the definition of open source, which companies, projects and industries use open source software, how to get started, understanding the open source philosophy, communicating with other developers with mailing lists, IRC,…, using revision control system and general guidelines on how to get involved in open source project.   If you want to download the presentation slides, please go to Fundamentals of Open Source Development and use the download button on top of the Slideshare presentation. If it […]

Embedded Linux QA with Wind River Test Management 4.0

Wind River has just announced the release of Winder River Test Management 4.0, a test suite specialized in testing embedded devices and allowing the test teams to optimize the testing effort by focusing resources on high-risk areas and deliver a high-quality embedded software solution on time. New Features and Enhancements New preconfigured test suite generators: The following new test suite generation methods are available: Create a test suite based on coverage and execution time: Selects test case instances that will generate the maximum coverage given a fixed time constraint . Create a test suite based on execution results: Selects test case instances that have run with specific final status values. Create a test suite based on requirements: Selects test case instances that are associated with specific requirement records to ensure that all requirements have a test associated with them and are thoroughly tested. Create a test suite based on defect […]

Bootloader to OS with Unified Extensible Firmware Interface (UEFI)

Unified Extensible Firmware Interface (UEFI) is a specification detailing an interface that helps hand off control of the system for the pre-boot environment (i.e.: after the system is powered on, but before the operating system starts) to an operating system, such as Windows or Linux. UEFI aims to provides a clean interface between operating systems and platform firmware at boot time, and supports an architecture-independent mechanism for initializing add-in cards. UEFI will overtime replace vendor-specific BIOS. It also allows for fast boot and support for large hard drives (> 2.2 TB). There are several documents fully defining the UEFI Specification, API and testing requirements: The UEFI Specification (version 2.3.1) describes an interface between the operating system (OS) and the platform firmware. It describes the requirements for the following components, services and protocols: Boot Manager Protocols – Compression Algorithm Specification EFI System Table Protocols – ACPI Protocols GUID Partition Table (GPT) […]

Install Git for Windows XP, Windows 7

I’ve used TortoiseCVS and TortoiseSVN under Windows XP. However, nowadays many project are using Git instead. Luckily, there is also TortoiseGIT for that matter. You’ll need to install 2 components: TortoiseGit – Port of TortoiseSVN to TortoiseGIT MSysGit – Git for Windows MSysGit already has a graphical interface, so you would also be able to clone repositories, commit change, etc.. with MSysGit alone. The only reason to install TortoiseGit is if you are used to TortoiseCVS/TortoiseSVN and want to keep the same look and feel. I use the following version for installation on Windows XP: TortoiseGit 1.7.2.0 32-bit Git 1.7.4 First, I installed TortoiseGit with the default parameters (TortoisePlink SSH Client) . Finally, I installed Git by deselecting unnecessary components as shown below. We do not need Quick Launch or Desktop icons as we’ll use TortoiseGit instead. I’ve also disabled Windows Explorer Integration or you’d have two Git options in […]

How to Write and Submit a Linux Kernel Patch

Greg Kroah-Hartman has a very good tutorial about writing and submitting a patch to the Linux kernel. The video is over 1 year old but this is still relevant. The materials for this tutorial are available via git: git clone git://github.com/gregkh/kernel-tutorial.git Alternatively, you can also download a copy of the presentation slides. The actual presentation is divided into 6 parts: git basics (git branch, git clone…) Kernel coding style (Details can be found in Documentation/CodingStyle) Fixing a file (with scripts/checkpatch.pl scripts) Generating a patch (with git -diff) Email the patch (with scripts/get_maintainer.pl and git send-email) Q&A If you want to skip the git basics and kernel coding style parts (although I don’t recommend it), fast forward to 13:33. All patches by in the linux kernel are checked by at least 2 persons. Before submitting a patch, you’ll have to make sure of the following (Checklist): Kernel builds with patch applied […]

What is GENIVI ? A Software Standard for the Automotive Industry

I’ve recently read in the news that a few operating systems had achieved GENIVI compliance. So let’s see what Wikipedia says about the GENIVI Alliance: The GENIVI Alliance was founded on March 2, 2009 by BMW Group, Delphi, GM, Intel, Magneti-Marelli, PSA Peugeot Citroen, Visteon, and Wind River Systems with the goal of establishing a globally competitive, Linux-based operating system, middleware and platform for the automotive in-vehicle infotainment industry. Since then, the alliance has expanded to more than 100 members who are working together to deliver an open and globally consistent software platform based on Linux for use by the whole car industry. So the clear goal here is to have some set of software specifications and standards (Currently GENEVI 1.0)  in the automotive industry in order to speed time to market and reduce the cost of developing Infotainment applications. GENIVI comes from a concatenation of Geneva and IVI (In-Vehicle […]