Hey,
I have a detail question.
When NXC accesses mailbox messages, does it send direct commands to FW, which in turn reply "to the NXT program", or is it an IO read/write process that doesn't need any direct command interaction with the FW?
Ricardo
NXC interaction with FW - mailboxes question
Re: NXC interaction with FW - mailboxes question
As far as I know, the direct commands (and I count "system commands" as a certain kind of direct commands) are only sent remotely, via USB or Bluetooth. You usually never invoke them locally. (An interesting observation is, that direct command handling is done by a firmware module and does not affect execution speed of "user space programs" (like NXC programs) which are being executed at the same time).
You can have a look at the NXCDefs.h file and other NXC source code files to see what SendMessage and ReceiveMessage really do. But it's very probable they just invoke some low level firmware commands, or directly write to fw registers/memory.
You can have a look at the NXCDefs.h file and other NXC source code files to see what SendMessage and ReceiveMessage really do. But it's very probable they just invoke some low level firmware commands, or directly write to fw registers/memory.
RWTH - Mindstorms NXT Toolbox for MATLAB
state of the art in nxt remote control programming
http://www.mindstorms.rwth-aachen.de
MotorControl now also in Python, .net, and Mathematica
state of the art in nxt remote control programming
http://www.mindstorms.rwth-aachen.de
MotorControl now also in Python, .net, and Mathematica
-
- Posts: 117
- Joined: 27 Dec 2010, 19:27
Re: NXC interaction with FW - mailboxes question
Thanks linusa!
Is this what you call low level firmware commands? Do we have access to this asm code? Because I've tried sometimes before to dig a little bit into NXC functions, but I never find any code..
I have asked that to myself as well. But how is that done? does it use a different processor?linusa wrote:An interesting observation is, that direct command handling is done by a firmware module and does not affect execution speed of "user space programs" (like NXC programs) which are being executed at the same time
The most I find is this:linusa wrote: You can have a look at the NXCDefs.h file and other NXC source code files to see what SendMessage and ReceiveMessage really do. But it's very probable they just invoke some low level firmware commands, or directly write to fw registers/memory.
Code: Select all
#define SendMessage(_queue, _msg) asm { __sendMessage(_queue, _msg, __RETVAL__) }
Who is online
Users browsing this forum: No registered users and 5 guests