Quote:
Originally Posted by yash101
It is sad that the VEX cortex does not support threading or tasks  . It would be nice to run tasks parallel to each other. Does anyone by chance know how to bypass RobotC and actually access C10 (I think that's what it runs)? We are doing VEX robotics in eng. class, but I want to do things that are a bit harder!
|
There's quite a bit of confusion here, let me try to clear it up:
There is no inherent support for Tasks native to any processor, really. Tasks are almost always implemented by an operating system running on top of the processor, which runs a scheduler to schedule tasks when they are ready (on embedded systems they are usually scheduled by time rate). This is not a function of the processor hardware. However, there are ways to do tasks without an OS. Many micros have timers, which can be used for a number of things, including generating an interrupt request when they expire. This can be used to create a task by running code in the interrupt service routine. I usually see this used for very fast tasks, such as the OS kernel, but in basic systems it can be used to run fast code directly.
The Cortex has an ARM Cortex processor, so naturally it would run ARM opcodes. There is no real 'language' assigned to opcodes except the assembly language, which just gives meaningful names to opcodes (e.g. load, store, ... operations). C is a high level language on top of that, with a compiler that takes the C code and compiles it into opcodes for the particular processor family (in this case, ARM opcodes). As long as you can find a compiler to generate the opcodes for your processor, the language is usable.
RobotC does not actually use C standard code, it's quite bad with it (but it's gotten a lot better over the years). RobotC compiles using an internal compiler to RobotC bytecode, which is then run on a virtual machine on the Cortex. So, on the Cortex, the RobotC bytecode (opcodes) is executed by the RobotC interpreter, which is written in some language which was compiled into ARM opcodes. RobotC itself does have tasks, you can have many parallel threads, but you can't control the task rate precisely.