Search by Tags

eCos® RTOS on the Cortex M4 of a Colibri VF61

Applicable for

Article updated at 29 Dec 2020
Compare with Revision

Note: This article documents the former V2.5 supported RTOS variant. For new designs, we recommend using the currently supported FreeRTOS.


The Colibri VF61 uses a NXP/Freescale Vybrid™ SoC which consists of two heterogeneous CPU cores: An ARM Cortex™ A5 and a Cortex™ M4. Linux makes use of the Cortex™ A5 CPU only. The Cortex™ M4 is a micro-controller core suited for application-specific Firmwares/RTOS. Antmicro, a partner of Toradex, ported eCos® RTOS for the Cortex™ M4 CPU. Starting with the V2.1 Beta 3 image for Colibri VF61 our image delivers all tools necessary to load a Firmware into the second CPU Core. This Article shows How To get started building and loading an eCos Firmware.

Development Environment

In order to build eCos, a Cygwin or Linux based development environment is required. We distribute a pre-configured virtual machine for Linux to get you started.

Using your Linux Distribution

As a development environment virtually any Linux distribution should work. We usually test the documented commands on Ubuntu 12.04 LTS release. Since the cross compiler toolchain is distributed in 32-Bit variant, 32-Bit run-time libraries are required even on 64-bit variants:

sudo apt-get install ia32-libs

Using the pre-built Virtual Machine

The Ubuntu 12.04 LTS based virtual machine is available in the open virtualization format (OVF). You can download the disk image and the descriptor file from our website:

  • (disk image, about 1.6GB)
  • (Virtual Machine descriptor file, ~14KB)

Nearly any recent visualization Software supports the OVF format. VirtualBox is a free Desktop visualization Software we can recommend.

You can Login using the following credentials: - Username: ant - Password: antmicro

This user is in the sudoers group, you can gain root access using "sudo su" and the same password.

Get the eCos® Source Code

eCos 3.0 for Colibri VF61 is available in source form through our Git Repository.

$ git clone git:// ecos-colibri-vf61/

When using the virtual machine, eCos for Colibri VF61 is already available (see the "ecos-from-scratch" folder). However, this source release might be out of date. To get the latest version, you can update the repository using git pull.

$ cd ~/ecos-from-scratch/ecos-colibri-vf61/
$ git pull

Note: We do not distribute binary releases for eCos Kernel since applications need to be linked against the eCos Kernel. Once the toolchain for eCos is setup, it can be used for eCos application development as well.

Get the documentation

Our partner Antmicro wrote a complete Manual which is part of the eCos release (see "doc" folder). You can use the make command to build the documentation in different formats. In the Virtual Machine, you can browse an HTML version of the documentation by opening Firefox.

Note: Instead of the now obsolete please use our repository at

Alternatively, you can download the documentation in PDF format from our doc server.

Build the Documentation

To update the documentation, use make:

$ cd doc/
$ make html

Note: Depending on the format and your Linux distribution different packages might be necessary (e.g. python-sphinx, texlive-latex-base and texlive-latex-extra).

Build an eCos® Firmware

For this step, please check the mentioned eCos Manual above.

Run an eCos® Firmware

There are several methods of how to start eCos on the Cortex M4, we again refer to the mentioned eCos Manual above.

However, from within Linux you can run the Hello World example in two easy steps:

$ modprobe mcc
$ mqxboot hello.bin 0x3f000400 0x1f000411

On the UART_B you should get the following string output (at a Baudrate of 115200):

Hello, eCos world!

Note: You can not run the firmware a second time since the Cortex M4 firmware is already running.

Newer Compiler: If you are using newer Linaro compilers, you need to extend LDFLAGS -Wl,--build-id=none to avoid the errors like:

ld: error: no memory region specified for loadable section `'

Webinar: Heterogeneous Multi-core Processing