Difference between revisions of "Contiki"
PulkoMandy (Talk | contribs) m (→Other Operating Systems for the CPC) |
|||
(16 intermediate revisions by 8 users not shown) | |||
Line 1: | Line 1: | ||
− | |||
− | |||
== What is Contiki? == | == What is Contiki? == | ||
+ | |||
+ | (Text copied from the official Contiki website.) | ||
[[Image:contikic64.jpg|right|thumb|250px|Contiki running on the Commodore 64]] | [[Image:contikic64.jpg|right|thumb|250px|Contiki running on the Commodore 64]] | ||
Line 14: | Line 14: | ||
[[Image:contikicpc.jpg|right|thumb|250px|Contiki running on the Amstrad CPC]] | [[Image:contikicpc.jpg|right|thumb|250px|Contiki running on the Amstrad CPC]] | ||
− | Previously there have been attempts to port Contiki to the CPC. The | + | Previously there have been attempts to port Contiki to the CPC. The first successful port was done by [[Kevin Thacker]]. |
− | 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. | + | This was accomplished by: |
+ | # Modifying the linker so that it could generate binary files with relocation data | ||
+ | # Modifying the optimiser rules to reduce the program size. | ||
+ | # 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. | A key feature of Contiki is its ability to access networks. | ||
− | + | Two reasons prevented this in the Amstrad port: | |
+ | # 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 | ||
+ | # 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. | ||
+ | |||
+ | === Later updates === | ||
+ | |||
+ | In 2014, and later in 2023, PulkoMandy updated the port to use a newer version of SDCC. The code generation has improved a lot, and some issues with the drawing code were solved to make it a lot less slow, and almost usable. | ||
+ | |||
+ | To free more RAM, the kernel code was moved to an expansion ROM, leaving a lot more RAM for applications to be loaded. This should allow resuming the effort on porting the network applications. But there is still no driver for any CPC hardware to use with it for now. | ||
− | + | This version is based on the latest version of Contiki 1.2, with several updates that never made it into an official release of Contiki. The version 1 of Contiki is no longer developped, and version 2 has no desktop and windowing system. | |
== Weblinks == | == Weblinks == | ||
− | * [http://www.sics.se | + | * [http://www.sics.se/contiki/about-contiki.html Official site of Contiki] |
− | * [ | + | * [https://pulkomandy.tk/_/_/_Keeping%20Contiki%201.x%20alive New version 1.3 and 1.4] |
+ | * [http://www.cpctech.org.uk/download/contiki12.zip Contiki source code for Kevin Thacker's CPC version] | ||
+ | [[Category:CPC GUI]] | ||
[[Category:Operating System]] | [[Category:Operating System]] |
Latest revision as of 13:53, 8 May 2023
Contents
What is Contiki?
(Text copied from the official Contiki website.)
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
Previously there have been attempts to port Contiki to the CPC. The first successful port was done by Kevin Thacker.
This was accomplished by:
- Modifying the linker so that it could generate binary files with relocation data
- Modifying the optimiser rules to reduce the program size.
- 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:
- 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
- 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.
Later updates
In 2014, and later in 2023, PulkoMandy updated the port to use a newer version of SDCC. The code generation has improved a lot, and some issues with the drawing code were solved to make it a lot less slow, and almost usable.
To free more RAM, the kernel code was moved to an expansion ROM, leaving a lot more RAM for applications to be loaded. This should allow resuming the effort on porting the network applications. But there is still no driver for any CPC hardware to use with it for now.
This version is based on the latest version of Contiki 1.2, with several updates that never made it into an official release of Contiki. The version 1 of Contiki is no longer developped, and version 2 has no desktop and windowing system.