From: David E. <d.a...@du...> - 2002-10-12 21:21:46
|
Hi all. I'm still plodding along! I've implemented much of the serial communications, which wasn't too easy. I had to learn a lot about sockets in Unix, so it took a while. The system now uses a communications protocol to accept commands from outside the system. I've only implemented one or two messages - enough to get things running. So far I can send a message to put a byte into the serial receive register, a message to set the state of a port, and one to write byte data to a supplied memory location. However, it means that stepping through the code instruction by instruction isn't really possible now. I poll for incoming messages every 250 instructions, and time out after a short (10ms) period. This doesn't seem to slow the system down too much. So I now need a method of debugging, so I'm attempting to build a breakpoint system. Breakpoints will be handled using the communications protocol. I'm working this way so that an external interface can be written (I'm going to use Java) to act as a debugging environment. I've hacked the firmware download code (rcx_comm.c and rcx_comm.h) from lejos to allow a whole message to be sent to the emulator. When each byte is sent the appropriate interrupt is dispatched, but from there it's difficult to work out what is happening (because I can't step through yet). In theory, a transmit interrupt should be dispatched but it isn't being. I'll know more about why when I can step through. That's about it for now... You've been a great audience! Dave. PS I'm thinking about using a WikiWeb for the RCXEmul website. Anyone have any experience setting one of these up? |