|
||||||||||||||||||||||||||||||||||||
|
From http://www.tnkernel.com: "TNKernel is a compact and very fast real-time kernel for the embedded 32/16/8 bits microprocessors. TNKernel performs a preemptive priority-based scheduling and a round-robin scheduling for the tasks with identical priority. The current version of TNKernel includes semaphores, mutexes, data queues, event flags and fixed-sized memory pools. The system functions calls in the interrupts are supported. TNKernel is a fully portable (is written mostly in ANSI C except the processor-specific parts), but the current version of TNKernel has been ported for the ARM, Microchip (r) PIC24/dsPIC and Freescale (r) HCS08 and ColdFire(r) microprocessors. TNKernel has been written "under the significant influence" of the µITRON 4.0 Specifications. µITRON 4.0 Specifications is an open realtime kernel specification developed by the ITRON Committee of the TRON Association. The µITRON 4.0 Specification document can be obtained from the ITRON Project web site (http://www.assoc.tron.org/eng/document.html ). TNKernel is distributed in the source code form, free of charge under the TNKernel has been created by Yuri Tiomkin, his page can be find here. Compared to the build from Yuri I made some small structural changes, which should alleviate the maintenance and creation of new ports. A new port is a new CPU family and not a CPU from this family itself. I tested only the ports where hardware was available, see hardware section. If your port is not available, take a look at the original TNKernel page. It is possible that you will find your port there (e.g. PIC24/dsPIC, HCS08, ColdFire). My structure of the software looks like:
The ARM port was tested with CrossWorks for ARM v2.0.3 and v1.7b21. For the Cortex-M3 port CrossWorks for ARM v2 is needed. The project files for the corresponding port can be found inside the prj directory. Inside the src directory you will find main.c and a hardware.c file. The tnkernel directory is now divided in several sub directories. The version and the source which is needed for TNKernel itself. The core part of TNKernel reside inside the source directory. Compared to the original structure, the following changes were made inside the source directory. The tn_port.c/h files was renamed to tn_arch.c/h, arch for architecture. At the same time the files was split in a general architecture file tn_arch.c and in the specific files like:
The tn_port name is now reserved for the port specific parts which can be found in the corresponding sub directories from the port directory itself. Currently ports exist for the following families:
If your port is not available, take a look at the original TNKernel page. It is possible that you will find your port there (e.g. PIC24/dsPIC, HCS08, ColdFire). The blinky example was tested on the following eval boards. If you have a different board check the file hardware.c, where you will find the setup for the LED.
To handle the new structure, some compiler defines must be set. For the architecture you must set one of the following:
And for the several ports set of the following:
|
|||||||||||||||||||||||||||||||||||