|
发表于 2009-6-18 10:43:24
|
显示全部楼层
可以打开了
AvrX in C
AvrX is a real-time kernel for Atmel's AVR range of microcontrollers. It was written by Larry Barello and his original version in assembler can be found on his web site here.
I experienced problems when using AvrX in the Envirovalve project which I was convinced was caused by AvrX but turned out to be due to my code. Sorry Larry!
Larry had done a remarkable job squeezing the functionality he did into the much smaller AVR devices that were available at the time he originally wrote it. As a result of size limitations, and presumably for run-time speed, he wrote AvrX in assembler. I had tried several times to follow the code through to gain a bird's eye view of the inner workings of AvrX but it became more and more difficult to keep track of what was going on due to being written in a low level language.
As I could see no other cause in my own code for the strange behaviour and I needed to fully understand the inner workings of AvrX I decided to convert it into C to allow a higher level analysis. This proved to take a long time, but it was essential that I finish it to get to the bottom of the problems I was experiencing. It took 9 days solid to do the conversion.
There are one or two areas where a direct conversion wasn't possible due to the differences in the way C works compared with assembler. Also, a small section of code had to remain in assembler for similar reasons.
There are still a few rough edges to the code, but I thought it may be of use to others. I've almost completely removed IAR and single step support because I didn't need either and they just got in the way. I'm sure they could be added by someone else if they really need them.
Revision History
20051005 - Created
20080429 - Fixed bug that caused basic tests 3 and 4 to fail with recent versions of WinAVR. Updated Makefile to bring in line with sample Makefile from WinAVR-20071221.
AvrXinC (20080429).zip (80KB)
点击此处下载 ourdev_454226.zip(文件大小:80K) (原文件名:AvrXinC (20080429).zip) |
|