There are two binary files in the ChorusOS operating system bootable image that you must consider when porting the debug agent:
dbgAgent contains generic and processor specific debug agent code. It is platform independent.
dbgBsp contains serial line device driver and board reset functions.
The interface between dbgAgent and dbgBsp is described in include/chorus/bki/dbgBsp.h.