Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tcf-dev] TCFLaunch.onConnect() and other steps

Hi!

So far I am able to program a controller using the communication chain Eclipse -> TCF -> ControllerServer. My problem now is that I am not sure how to run this program. I don't understand how the original agent did that. I see that it subscribes to some streams e.g. "Processes",  "ProcessesV1", .. then did a few reads and at some point command_start() from processes.c gets called.

It is clear to me that I will have to replace this whole part. There is onConnect() in TCFLaunch. As far as I can see this method does a lot of things I won't need in for my agent. Should I override that method too and subscribe to my own channel(s) for any further communication? Unfortunately I am not quite sure at the moment what those streams are exactly needed for..

Right now I think about doing it this way:

After programming the device, another command is sent that tells my ControllerService to run that program until one of the breakpoints are hit e.g. runUntil(byte[] bpAdressArray).

As a breakpoint gets reached, my agent will somehow have to be noticed. I am thinking of another thread - since runUntil() is blocking - that waits for this event. As it receives the address of the hit breakpoint I can pass all remaining information to the Eclipse easily.

And of course I hope that I can manage it somehow to integrate all debug information such that in the end my agent just remaps the address to a filename:row pair such that stepping actually works without having to reinvent stuff that the original agent is capable of already.


If anyone has some hints or pointer for me I'd be very happy!

Thank you and best regards,
Stefan Falk



Back to the top