ELLCC Bare Metal ARM Update

An update to the ELLCC bare metal experiment last reported here


  • Targets the vexpress-a9 Cortex-A9 based evaluation card.
  • SP804 timer supported.
  • PL011 Serial port supported for the system console.
  • Fully interrupt driven operation for the timers and serial port.
  • Vectored interrupts supported using the ARM Generic Interrupt Controller.
  • The scheduler now supports multiple thread priorities, with the number of priorities from 1 to N specified at compile time.
  • Round robin scheduling supported.
  • Tick-less kernel scheduling: no timer interrupts occur unless specifically required for time-slicing.

An example of some tests and commands:

../../bin/qemu-system-arm -M vexpress-a9 -m 128M -nographic -kernel kernel.bin
audio: Could not init `oss' audio driver
kernel started. Type "help" for a list of commands.
kernel % thread1
thread started foo
kernel % thread2
thread2 started
kernel % thread3
unhandled system call (175) args: 1, 1216308, 0, 8, 8, 0
thread3 started
kernel % thread4
thread4 started
kernel % thread5
thread5 started
kernel % thread2 still running
unrecognized command: is
kernel % ts
     TID  STATE        PRI NAME       
 0x28d58: RUNNING        1 kernel     
 0x2cd98: IDLE           3 idle0      
 0x2f550: MSGWAIT        1 thread1    
 0x305b0: TIMEOUT        1 thread2    
 0x31670: READY          1 clone1     
 0x326e0: SEMWAIT        1 thread4    
 0x33740: SEMTMO         1 thread5    
kernel % thread5 running
thread2 still running
thread5 running
thread2 still running
thread5 running
thread2 still running
thread5 running
thread2 still running
thread5 running
thread2 still runningindepenent
thread5 running
thread2 still running
kernel % date
Thu Jan  1 00:00:02 1970
kernel % help date
                date: show/set the system clock.
                      The argument used to set the time, if given,
                      is in the form [MMDDhhmm[[CC]YY][.ss]].
kernel % date 050408272014
kernel % date
Sun May  4 08:27:48 2014
kernel % 

The ARM specific source code is available here and the processor independent code is here.

If you want to try this out at home, everything you need except QEMU is packaged as a binary download from ftp://ellcc.org/pub/ choose the tarball appropriate for your host system, untar it, go into the ellcc/baremetal/arm directory and type “make run”.

Make sure you have QEMU installed on your system, as I am not currently able to cross make it for all the hosts.

One thought on “ELLCC Bare Metal ARM Update

  1. Marty

    Hi All;
    Rich, where DO You have Qemu installed on Your system, so that — when first doing the BareMetal/Arm make Run, it knows where to find the Qemu files ??
    I have the following —
    I have Your Prebuilt 86_64 files in my /Ellcc folder, which include baremetal, bin, and libecc files..
    I have Qemu in the Qemu folder..
    I have Musl in the Musl Folder..

    THANK YOU Marty


Leave a Reply

Your email address will not be published.