Starting out with RTX
The one thing I did do before I took my creative break was start getting to grips with the RTX real-time kernel that is supplied royalty-free as part of the RealView Microcontroller Development Kit. From what I can see, it has pretty much all of the standard resources and features you would expect to find in a modern day real-time kernel. I started out playing with some of the examples and then quite unlike my normal hackish behavior, I started to write an RTX-based application from scratch.
My simple 4-task application built just fine, but when I ran it I discovered that it sat in the SWI handler forever. I took the source of one of the RTX examples and pasted that into my project, and found that that, too, got stuck in the SWI handler. "Curiouser and curiouser," I thought. I now had exactly the same configuration and the example code in my project and yet it didn't work. Conclusion: Something was not the same. So I "diffed" every file in the example directory against every file in my applications directory and there in the example startup code were the following lines...
; IMPORT SWI_Handler
Undef_Handler B Undef_Handler
;SWI_Handler B SWI_Handler ; Handled by RTL
My application did not comment out the SWI handler code. I checked the documentation and the Knowledge Base and could find nothing on this requirement. I finally decided to check in with Reinhard Keil and found that this was indeed a weakness in the documentation. Reinhard quickly put together a Knowledge Base article here that explains what to do.
Now my example works just fine, so it's on to the next phase of the project.



0 Comments:
Post a Comment
<< Home