Last modified on 17 September 2016, at 18:26

Contiki

Revision as of 18:26, 17 September 2016 by Polluks (Talk | contribs) (Efforts in porting Contiki to Amstrad CPC)

What is Contiki?

(Text copied from the official Contiki website.)

Contiki running on the Commodore 64

The Contiki operating system is a highly portable, minimalistic operating system for a variety of constrained systems ranging from modern 8-bit microcontrollers for embedded systems to old 8-bit homecomputers. Contiki provides a simple event driven kernel with optional preemptive multithreading, interprocess communication using message passing signals, a dynamic process structure and support for loading and unloading programs, native TCP/IP support using the uIP TCP/IP stack, and a graphical subsystem with either direct graphic support for directly connected terminals or networked virtual display with VNC or Telnet.

Contiki was designed with very low hardware requirements. And can run on a unexpanded Commodore 64. The portability is ensured by the core being written entirely in ANSI C.

Efforts in porting Contiki to Amstrad CPC

Contiki running on the Amstrad CPC

Previously there have been attempts to port Contiki to the CPC. The most successful port was done by Kevin Thacker.

This was accomplished by:

  1. Modifying the linker so that it could generate binary files with relocation data
  2. Modifying the optimiser rules to reduce the program size.
  3. Modifying the source so it produced smaller and better code for the SDCC compiler to work with.

The nature of Contiki (written almost entirely in C) and the poor Z80 optimisation by the SDCC compiler makes Contiki slow compared to other operating systems. The desktop routines in the Amstrad port relies on the slow firmware routines because it was quicker to make the port this way.

The Amstrad port runs in 64k. It doesn't make use of any extra RAM, this choice was taken so that a quick port could be done to proove it was possible.

A key feature of Contiki is its ability to access networks.

Two reasons prevented this in the Amstrad port:

  1. The compiled binaries for the webserver and other network programs were large, meaning that at runtime, both the binaries and contiki OS code could not fit into the 64K ram at the same time
  2. The networking hardware was not at a sufficiently developed stage.

The original plan was to implement CPC Booster support in Contiki. The CPC would be connected to the PC via a serial cable. On the PC would be Linux running Slip or PPP. The PC would be connected to the internet through a Broadband connection, with port 8080 opened for incomming connections.

The linux machine would effectively become a gateway and would pass information to/from the CPC through the serial connection.

However, because the Contiki programs could not all fit into ram, this plan was shelved.

The Amstrad version is based on Contiki v1.0.

Other Operating Systems for the CPC

Weblinks