AvrX Real Time Kernel-En/Fa lang
AvrX Real Time Kernel-En/Fa lang
AvrX is a Real Time Multitasking Kernel written for the Atmel AVR series of micro controllers. AvrX contains approximately 40 API in the following Six categories:
[FONT=Arial, Arial, Helvetica]
Tasking[/FONT]
[FONT=Arial, Arial, Helvetica]
Semaphores[/FONT]
[FONT=Arial, Arial, Helvetica]
Timer Manageme[/FONT][FONT=Arial, Arial, Helvetica]
nt[/FONT]
[FONT=Arial, Arial, Helvetica]
Message Queue[/FONT][FONT=Arial, Arial, Helvetica]
s[/FONT]
[FONT=Arial, Arial, Helvetica]
Single Step Debugging support[/FONT]
[FONT=Arial, Arial, Helvetica]
Byte FIFO support with synchronization.[/FONT]
[FONT=Arial, Arial, Helvetica]
The Kernel is written in assembly. Total kernel size varies from ~500 to 700 words depending upon which version is being used. Since the kernel is provided as a library of routines, practical applications take up less space because not all functions are used.[/FONT]
[FONT=Arial, Arial, Helvetica]
RTOS's are nice in that the OS maintains state information for the programmer. So, instead of a complicated state machine for each task, running off an interrupt timer, the designer can write linear code (do this, wait for something, then do that... etc). In general the linear code is much easier to design, debug, understand and it is almost always smaller.[/FONT]
[FONT=Arial, Arial, Helvetica]
Since each task appears to have a complete CPU, it is also easier to develop independent modules that can be wired together later on. With the included debug monitor tasks can be paused, stepped and resumed at run time - useful for debug and calibration. Because the monitor is a separate, high priority, task, it almost always allows a working window into the system no matter how broken the user code is.[/FONT]
[FONT=Arial, Arial, Helvetica]
There are two versions of AvrX available:[/FONT]
[FONT=Arial, Arial, Helvetica]
AvrX v2.3 for the IAR assembler. This is a tiny version that is suitable for Assembly programming only. It makes very efficient use of RAM and takes very few cycles to service interrupts. See my Mini-Sumo for an example of a significant application written for the Atmel 2313 processor which only has 128 bytes of RAM.[/FONT]
[FONT=Arial, Arial, Helvetica]
AvrX 2.6 for the IAR Systems and GCC C compiler. This version of AvrX is written for a small memory model (16 bit pointers) and a native C interface. The code size is larger than the 2.3 version (~700 words vs. 500) and all registers need to be swapped with each context change, so it is somewhat slower and uses more SRAM. The SRAM issue can be mitigated by using as many register variables as possible at the top level of the task. As for speed, processing a system timer tick took 211 cycles in AvrX 2.3 but takes only 234 in AvrX 2.5. Interrupt handlers can be written in C. See the example code for details.[/FONT]
[FONT=Arial, Arial, Helvetica]I started a mailing list for AvrX support issues:
www.yahoogroups.com/group/avrx Just click over and register as a Yahoo member and you can join the group.[/FONT]
avrx یک هسته واقعی با قابلیت انجام چند کار در یک زمان ،برای سری avr میکروکنترلر های شرکت atmel می باشد. مثلا ATMEGA16
avrx از حدود 40 دستور (
api) تشکیل شده که در 6 دسته زیر گروهبندی می شود:
مدیریت تایمر
صف پیام
پشتیبانی از اشکالزدایی یک مرحله ای
بایت فیفو که پشتیبانی می شود با هماهنگ ساز
هسته ،به زبان اسمبلی نوشته شده.اندازه هسته به نسخه استفاده شده بستگی دارد و بین 500 تا 700 کلمه است.
RTOS's ها خیلی خوب هستند برای برنامه نویس ها.برنامه نویس می تواند در هر لحظه هر کاری که می خواهد کند ، مثلا فلان تایمر را نگه دارد ووو یا می توانند خطی اضافه کنند که شرطی داشته باشد مثل در صورت انجام این کار یا منتظر انجام آن کار با و یا منتظر چیزی باش.
AVRX در دو نسخه ارائه می شه:
AVRX V2.3 که برای کار های کوچیکه و فقط به زبان اسمبلی موجود است.
و با نرم افزار
IAR assembleR نوشته شده.
AVRX V2.6 که حجم بالاتری دارد و به زبان C نوشته شده.
وبا نرم افزار های
IAR assembleR و GCC نوشته شده است.