Hi,Dear friends,
After the discussions about the reentrant stack in Keilc http://www.keil.com/forum/docs/thread10048.asp#msg47666 ,I believe It really hit the spot. Thanks again!
But, There is another question, Why It is not recommended porting a OS(ucos) to c51?
If some one heared about this, Most of them will suggest the two points, One,It's ok for a study, but for a business. And the other is that if you really need ,pls switch to ARM or else.
If I have a enhanced fast C51, and there is about 5~7K RAM, It's about two/three clocks per machine cycle working on 40Mhz, which means about 50ns for single-cycle instruction, Is it powerful enough for a OS?
Is there any statistics about these things? It'll be very kind of you to let me know the details.
I have no choice except trying my best to finish it,Then the final decision is up to the upper.
Ah, the woes of the clueluess boss. Well, let's just hope you'll remember this episode when ever you get to the position to hand out assignments like this, and be prepared to accept technical feedback a little more openly than your boss appears to.
Could u tell me what's the quirks? Thanks.
In a nutshell: the stack is in the wrong memory space.
By consequence it's quite small, and near impossible to make any larger. This in turn practically forces C compilers to rely on static control flow analysis to allocate automatic variables and function arguments statically. Static control flow analysis and OS usage don't mix very well at all.
By the time workarounds for all this are in place, you end up with an 8051 emulating a CPU architecture crucially different from its own, and that wastes a lot of CPU resources.