This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How can I use diag_printf() in ecos ram application? thanks


Qiang Huang wrote:
Thanks a lot Jonathan, but could you give me a little detail how I can use
the diag_printf(). I changed it to following:

void cyg_user_start(void)
{
	diag_printf("Hello everyone\n");
}

but still no output from the console window (in Insight)

but when I load the program via hyperterminal as:
load -m xmodem

go 0x040000


then I can see the output from the hyperterminal.  Did I miss anything for
the mangler?
The mangler requires no specific support as such. But if this is a new port you've been doing, you may have made a mistake in the definitions - perhaps your default CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL is different from CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL.

What I would guess is happening, one way or another, is that the output from your program isn't coming out in GDB format... instead it's coming out in plain text (as could be viewed by hyperterminal). However such output would be discarded by GDB.

You could see if this is the case by doing:

void cyg_user_start(void)
{
for(;;)
diag_printf("Hello everyone\n");
}

and after loading and continuing via GDB, then kill your GDB session (don't ctrl-c your app first - just kill GDB). Then connect via hyperterminal and see if the output is there.

Jifl
--
eCosCentric http://www.eCosCentric.com/ The eCos and RedBoot experts
--[ "You can complain because roses have thorns, or you ]--
--[ can rejoice because thorns have roses." -Lincoln ]-- Opinions==mine


--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]