Change Logs: 1) README.TXT updated on 12/01/2005 by nSr 2) First Application not need to be dummy call. It is now taken care by the Kernel Itself. 12/09/2005 nSr ver 0.02 13/ 09/ 05 3) Auto Makefile created. showing errors while linking.using Makefile now need software tool chain in one piece. 4) cup/kernel directory has a copy of assembler and linker CUP-OS README ------------------ The only target while trying to port the first version of uClinux to COFFEE was to make the kernel capable of multitasking, Interrupt Handling, Exception Handling and have some handful of system calls. This kernel is small that had inherited much knowledge from uClinux. To make it work properly there are some intial stuff that need to be taken care. 1) The addresses of all the tasks should be given to the kernel manually before the kernel starts in "/kernel/main.c" file. You will find all the structures initialized and given some values. What all you need is to just put the correct values in the #defines.This is also said in Limitations. /* The Below is not required anymore */ /* The first task(application) should be a dummy task that just loops itself, The address of this task should be kept in INIT's structure so that when the kernel wants to execute the INIT code it should run this first dummy program. (first application starting code address = &INIT->regs->LR first application psr value = &INIT->regs->spsr(recommended value 0x0019) */ 2) The usage of registers by the kernel is influenced by the conventions of the compiler on these registers. For example compiler uses r28 as STACK-POINTER, so does the kernel treats that register like that. 3) Many assembly and C macros were written but still not used in this version. One can efficiently use them or add more macros. If you want to add more, then please mail me how they were used so that they are updated here.(check the file /kernel/all_macros.h) 4) Do not use Makefile now, use if after the tool chain (Compiler + assembler + linker) are put together 5) all_header.c has full kernel codes in C(except boot code) .. after compiling them with the compiler the assembly boot code in file boot.x should be attached to the start of the file. Assembler is then run which would create coff formatted object file. Linking is then done. all_headers.c file will be here until the software tool chain is completely built and well tested. 6) request of Dynamic Memory is now supported by using malloc() function . freeing the dynamic memory not yet implemented. Limitations and known bugs of the CUP-OS-0.01(unstable) for this Version ---------------------------------------------------------------------- 1) SMP (Symmetric MultiProcessing) is not supported. 2) Only 32-bit instruction mode is used. 3) No concept of pages applied here, 4) SystemCalls like sys_exit() and sys_kill() were modified and their functionality can be known from the source codes. 5) Only one timer interrupt has been serviced through the line interrupt7. 6) At start, all the information related to the applications like its starting address,size of program and amount of static memory it requires should be given manually to the CUP-OS-0.01 in the /kernel/main.c file.More instructions of HOWTO-add a task to CUP-OS is given in documentation. 7) Static memory fences for each process is not checked, that is if the process uses more static memory than allocated initially then it will corrupt the memory space of its next process or worst case can even make the next process stop working. 8) even though disabling interrupts completely in kernel mode is not required(I think), all the kernel codes cannot be interrupted because of simplicity in testing it. 9) To use the simulator (ISS) for testing, the last few instructins in the kernel code should be nop. This will avoid over Indexing of the dissassembly window in the ISS. /* 08-12-2005 nSr */ For sure after having understood the CUP-OS source codes, you will have many ideas for improving its performance. This port is not part of the official uClinux developers, so please do not hassle by mailing to them. If you have any questions regarding the CUP-OS,Bug reporting or want to send suggestions please mailto : susheel.nuguru@tut.fi For better understanding the functionality of the processor dependent codes please visit http://coffee.tut.fi/documents.html and get familiar to the assembly mnemonics :-) . Nuguru Susheel Raj, OS Port Developer. 30.01.2005