public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* Re: [ECOS] Question about Hello World eCos example
@ 2001-07-25  7:52 rob.wj.jansen
  0 siblings, 0 replies; 6+ messages in thread
From: rob.wj.jansen @ 2001-07-25  7:52 UTC (permalink / raw)
  To: sebastien.andre; +Cc: ecos-discuss

Andre,

> i execute the program i receive on the HYPER-TERMINAL this :
> $O48656C6C6F2C2065436F7320776F726C64212035200A#BB

This is clearly GDB output.
During build it is decided that your output will always go via your GDB channel.
The reason why printf does not return is because you need to acknowledge this
packet (with a "+").

Same thing happened on my target. Try to remove the GDB stub and rebuild eCos.
If this fails, then search for the point where it is decided that your diagnostics output
has to be via GDB packets. I forgot where this was defined but I somewhere found
that GDB packetized output is done if you have either GDB stubs OR if you use
the RAM memory map (they forgot about JTAG debugging pods).

The diagnostics output is done from packages/hal/arm/pid/current/src/hal_diag.c.
Just place a breakpoint on the hal_diag_write_char() function and you will see.

Regards,

     Rob Jansen

Software Engineer
Competence Center Platforms
BU Mobile Communications
Meijhorst 60-10, 6537 KT Nijmegen, The Netherlands
Tel: +31-24-353-6329
Fax: +31-24-353-3613
mailto:Rob.WJ.Jansen@philips.com



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ECOS] Question about Hello World eCos example
  2001-07-25  7:16 ` [ECOS] Question about Hello World eCos example Andre Sebastien
  2001-07-25  7:38   ` Robin Farine
@ 2001-07-25  9:11   ` David Airlie
  1 sibling, 0 replies; 6+ messages in thread
From: David Airlie @ 2001-07-25  9:11 UTC (permalink / raw)
  To: Andre Sebastien; +Cc: ecos-discuss

GDB debugging ... there is an option for mangling output in the .ecc, set
this to none..

Dave.

On Wed, 25 Jul 2001, Andre Sebastien wrote:

> Hi everybody
> 
> I build Hello example et run it on an PID board !!!
> 
> I use GCC 2.95.3 for arm-lib and eCos
> 
> For load the ELF i use a LAUTERBACH and JTAG link !!!
> The software is T32
> 
> I connect the serial port A on a PC with an HYPER-TERMINAL
> configured with 38400 bauds, 8bits,NO PARITY,NO CONTROL
> 
> i execute the program i receive on the HYPER-TERMINAL this :
> $O48656C6C6F2C2065436F7320776F726C64212035200A#BB
> 
> if we interprets it as HEX CODE it be :
>           $0
>            0x48 0x65 0x6C 0x6C 0x6F 0x2C 0x20  = Hello,  (+ a backspace)
> 
>            0x65 0x43 0x6F 0x73 0x20 = eCos     (+ a backspace)
>            0x77 0x6F  0x72 0x6C 0x64 0x21 0x20 = world!  (+ a backspace)
> 
>            0x35 0x20 0x0A  = 5 \n
>            #BB
> 
> It s exactly that i try to print : printf("Hello, eCos world! %d \n",5);
> 
> PS: what is $0 and #BB at the beginning and the end of output ?
> 
> But never the program go out the function "printf", it seems to go in a
> infinite loop !!!!!
> What does it wrong ?
> 
> best regards.
> 
> Seb.
> 

-- 
      David Airlie, Software Engineer, Parthus Technologies plc.,
       Mary Rosse Centre, National Tech Park, Limerick, Ireland.
   t: +353-61-508116 / f: +353-61-508101 / David.Airlie@parthus.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ECOS] Question about Hello World eCos example
  2001-07-25  8:14     ` Andre Sebastien
@ 2001-07-25  8:45       ` Robin Farine
  0 siblings, 0 replies; 6+ messages in thread
From: Robin Farine @ 2001-07-25  8:45 UTC (permalink / raw)
  To: Andre Sebastien; +Cc: ecos-discuss

Andre Sebastien <sebastien.andre@sxb.bsf.alcatel.fr> writes:

[...]

> How can i know the behaviour of these components ?

Start from your generated ecos.ecc, search for keywords, read the comments and
when you find something interesting, search the eCos CDL files in the "packages"
directory until you find the CDL file that define the interesting
component/option. Then look at the header & source files of the corresponding
package to see how the component/option parameterizes the package.

[...]

Robin

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ECOS] Question about Hello World eCos example
  2001-07-25  7:38   ` Robin Farine
@ 2001-07-25  8:14     ` Andre Sebastien
  2001-07-25  8:45       ` Robin Farine
  0 siblings, 1 reply; 6+ messages in thread
From: Andre Sebastien @ 2001-07-25  8:14 UTC (permalink / raw)
  To: egcs; +Cc: ecos-discuss

Thanks a lot Robin Farin and Rob Jansen !!

So now it s work nice !!! but Robin Farin what is exactly this component
CYDBG_HAL_DIAG_TO_DEBUG_CHAN ???
it seems to disable the GDB PROTOCOLS for the SERIAL ports ?


How can i know the behaviour of these components ?

thx.


Sebastien.


Robin Farine wrote:

> Andre Sebastien <sebastien.andre@sxb.bsf.alcatel.fr> writes:
>
> [...]
>
> > It s exactly that i try to print : printf("Hello, eCos world! %d \n",5);
> >
> > PS: what is $0 and #BB at the beginning and the end of output ?
>
> Not $0, but $O (O packet). The GDB protocol uses such packets to output text
> non-related to GDB itself (e.g. your printf). The protocol also appends a
> checksum to every packet, the #BB in your case.
>
> > But never the program go out the function "printf", it seems to go in a
> > infinite loop !!!!!  What does it wrong ?
>
> It's waiting for an ack from the remote side of a GDB connection !!!!!
>
> Try to set the option below in your ecos.ecc:
>
>     cdl_component CYGDBG_HAL_DIAG_TO_DEBUG_CHAN {
>         user_value 0
>     };
>
> [...]
>
> Robin

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ECOS] Question about Hello World eCos example
  2001-07-25  7:16 ` [ECOS] Question about Hello World eCos example Andre Sebastien
@ 2001-07-25  7:38   ` Robin Farine
  2001-07-25  8:14     ` Andre Sebastien
  2001-07-25  9:11   ` David Airlie
  1 sibling, 1 reply; 6+ messages in thread
From: Robin Farine @ 2001-07-25  7:38 UTC (permalink / raw)
  To: Andre Sebastien; +Cc: ecos-discuss

Andre Sebastien <sebastien.andre@sxb.bsf.alcatel.fr> writes:

[...]

> It s exactly that i try to print : printf("Hello, eCos world! %d \n",5);
> 
> PS: what is $0 and #BB at the beginning and the end of output ?

Not $0, but $O (O packet). The GDB protocol uses such packets to output text
non-related to GDB itself (e.g. your printf). The protocol also appends a
checksum to every packet, the #BB in your case.

> But never the program go out the function "printf", it seems to go in a
> infinite loop !!!!!  What does it wrong ?

It's waiting for an ack from the remote side of a GDB connection !!!!!

Try to set the option below in your ecos.ecc:

    cdl_component CYGDBG_HAL_DIAG_TO_DEBUG_CHAN {
        user_value 0
    };

[...]

Robin

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [ECOS] Question about Hello World eCos example
  2001-07-25  6:09 [ECOS] question about stack assign for interrupt service routine Tony Ko
@ 2001-07-25  7:16 ` Andre Sebastien
  2001-07-25  7:38   ` Robin Farine
  2001-07-25  9:11   ` David Airlie
  0 siblings, 2 replies; 6+ messages in thread
From: Andre Sebastien @ 2001-07-25  7:16 UTC (permalink / raw)
  To: egcs; +Cc: ecos-discuss

Hi everybody

I build Hello example et run it on an PID board !!!

I use GCC 2.95.3 for arm-lib and eCos

For load the ELF i use a LAUTERBACH and JTAG link !!!
The software is T32

I connect the serial port A on a PC with an HYPER-TERMINAL
configured with 38400 bauds, 8bits,NO PARITY,NO CONTROL

i execute the program i receive on the HYPER-TERMINAL this :
$O48656C6C6F2C2065436F7320776F726C64212035200A#BB

if we interprets it as HEX CODE it be :
          $0
           0x48 0x65 0x6C 0x6C 0x6F 0x2C 0x20  = Hello,  (+ a backspace)

           0x65 0x43 0x6F 0x73 0x20 = eCos     (+ a backspace)
           0x77 0x6F  0x72 0x6C 0x64 0x21 0x20 = world!  (+ a backspace)

           0x35 0x20 0x0A  = 5 \n
           #BB

It s exactly that i try to print : printf("Hello, eCos world! %d \n",5);

PS: what is $0 and #BB at the beginning and the end of output ?

But never the program go out the function "printf", it seems to go in a
infinite loop !!!!!
What does it wrong ?

best regards.

Seb.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2001-07-25  9:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-25  7:52 [ECOS] Question about Hello World eCos example rob.wj.jansen
  -- strict thread matches above, loose matches on Subject: below --
2001-07-25  6:09 [ECOS] question about stack assign for interrupt service routine Tony Ko
2001-07-25  7:16 ` [ECOS] Question about Hello World eCos example Andre Sebastien
2001-07-25  7:38   ` Robin Farine
2001-07-25  8:14     ` Andre Sebastien
2001-07-25  8:45       ` Robin Farine
2001-07-25  9:11   ` David Airlie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).