Tag: embedded

Nuttx on Linux

Posted by April 2, 2014

If you are also working with Nuttx, you will love the “sim” configuration. It will allow running a minimal version of Nuttx as a regular program on a linux machine (assuming 86x_64).

Before getting the sources and building anything you will need the 32-bit version of the GCC and the following libraries that can be installed like this:

sudo apt-get install -y gcc-multilib libc6-dev-i386 lib32z1-dev

After installing there is a final thing you need to fix on your own (see this launchpad ticket)

sudo ln -s /usr/include/x86_64-linux-gnu/zconf.h /usr/include

Now get the Nuttx sources using git like this:

git clone http://git.code.sf.net/p/nuttx/git nuttx.git

First thing after getting the sources is to run the configure script (a bit different from the well known ./configure) to setup the build directory for the target hardware. In our case the target will be the native machine for which the “sim” configuration has been created (see nuttx/configs/sim).

To configure the build setup for target “sim” with “nsh” as the application to run on start, run:

cd nuttx.git/nuttx/tools
./configure.sh sim/nsh
cd ..

Last step before building is the configure the image. This is done by calling

make menuconfig

There is at least one setting that needs to be enabled:

– System Type —> [*] Build 32-bit simulation on 64-bit machine

You are now ready to build the image

make

If there was no problem during the build you will find a “nuttx” file in the same directory. Just run it and you will see the NSH prompt.

./nuttx

Counter Project

Posted by July 20, 2013

20130720-145345.jpg

Project page in the labs wiki

lzoDSO – Firmware Documentation

Posted by June 12, 2013

oscilloscopeMoved form using Doxygen 1.7.1 (comes with Debian 6) to Doxygen 1.8.4 (build from sources) for the lzoDSO firmware documentation. Looks much nicer.

Still, there is a problem with the documentation (unrelated to doxygen). All code that is linked to the project repository using svn:externals properties is somehow not covered (still investigating). I think this is somehow related to the way the Bitten slave (build slave of my CI setup) does the automated build (in which doxygen gets executed).

If you ever had something similar, please let me know (via comment or Twitter).

lzoDSO – todo for today: timer driver

Posted by June 11, 2013

Will work on the timer driver code (legacy and fresh one) to allow selection of the actual hardware timer to use (the on-chip ones that are part of the ATmega series micro controllers).

When things are working, I’ll be able to finally enable the test signal output on the front panel controller board of the lzoDSO.

lzoDSO – Status Update

Posted by June 3, 2013

oscilloscopeWhat happened in the days past:

  1. moved prototype-a branch to trunk of our repository (finally!)
  2. registered lzoDSO project at Ohloh
  3. started moving legacy code out of the firmware to replace it with code that has been programmed test-driven
  4. created a minimal project homepage

lzoDSO – legacy firmware … evolving

Posted by May 22, 2013

oscilloscopeYeah! We have finally managed to fix some stupid things, related the the firmware used for our lzoDSO scope. There where files missing (which had been referenced by the Makefile but where outside of the projects repository) and loads of files in either the wrong place or simply cruft.

The files have now been added (which should allow anyone to build the firmware) and things have been cleaned up slightly. There is still much work, so be sure you will find spots in the source that have a smell. I have also documented the fuse-bits that are configured in the micro controller used.

Ah .. note, after having the missing files in the project, these “sub-projects” have their own dependency which is CppUTest in that case (this is a dependency to be proud of I think). So make sure you have CppUTest on your machine and your users environment set up with the corresponding variables (see the Software page in the lzoDSO wiki for details on how to setup the build environment).

lzoDSO – prototype demo

Posted by May 15, 2013

Demonstrates the (currently limited) capabilities of the lazlo labs digital storage oscilloscope (lzoDSO) prototype. The test probe of the scope is connected to a timer circuit in mono-stable astable configuration so that it produces a more or less defined test signal. There is also a test signal source inside the scope that we need integrate into the firmare to get it working.

Uses an ATmega644 at 16 MHz and the internal 10-bit A/D converter (only using 8 bits).

See the lzoDSO project page for more at labs.lazlo.de/trac/lzodso.

Agile for Embedded — Impossible!

Posted by May 3, 2013

A sarcastic collection of the typical lousy excuses people come up with for why “agile” can not be applied to their project

Watch end enjoy!

Inside the RT (Linux Kernel) Patch

Posted by April 19, 2013

Read “Stop Writing So Much Firmware”

Posted by April 17, 2013

Just read an very nice article by James Grenning titled “Engineers and Programmers, Stop Writing So Much Firmware” on software design with regards to embedded system and this piece of software embedded folks call firmware.

He makes the point that business logic must be decoupled from technological implementation dependencies very nicely. This wisdom is nothing new but still you don’t see it used very often in the real world (sadly).

My conclusions from this reading are basically:

  • firmware should be designed with a systems software aspect in mind (not application software)
  • decouple any business logic from implementation technology (okay, this is an obvious one)

I think especially the first point is one I’ll be able to apply to my  prototype scope firmware.