[ECOS] printf

Fabrice Gautier Fabrice_Gautier@sdesigns.com
Thu Dec 7 10:30:00 GMT 2000

> -----Original Message-----
> From: Grant Edwards [ mailto:grante@visi.com ]
> Subject: Re: [ECOS] printf
> > 
> > The best way would be for eCos to use semihosting when using a
> > JTAG device... Does the soon(?)-coming ARM Integrator port plan
> > to suport that?
> I don't see how you could do semihosting when using JTAG.  

Multi-ICE, AXD (the new ARM Debugger) and the ARM C library do it very well.
This is done using a software interrupt. Somehow the debugger or the
multi-ICE catch the call in the swi handler (a breakpoint) then I guess that
the Multi-ICE should detect the parameter passed to the software interrupt,
execute the function on the host set the result in the target and then
restart the target.
> AFAIK, user code on the ARM has no access at all to the ICE
> macrocell, so there's no way for application code to send or
> get data from something at the other end of the JTAG port.

In fact it's more like the host loading the information from the target than
the target sending the information throught the JTAG. The target just has to
write his parameters in a well defined set of register.

> The
> Angel Debugging Protocol used by some JTAG interfaces has
> support for semihosting, but I think it's only used if you're
> using the Angel monitor (or other user SW) to process ADP
> packets on the ARM.

I guess the Multi-ICE and other ARM product also use ADP. (even ARMulator
support semihosting )

In the ARM debugger you have some options to enable or disable semihosting,
so probably your gdb would have to handle the call. I think the ARM debugger
has some DLL to do that. The easiest way to handle that with eCos would
probably to have some kind of translator program that catch and handle the
semihosted calls

Fabrice Gautier

More information about the Ecos-discuss mailing list