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]

Re: Hello_eCos_World on iPAQ.




Gary Thomas wrote:

> How does this relate to your problem?  Can you send your 'hello' application (source)?
>
> I tried these steps with our sample 'hello' program and there had no problems.
>

Here is my 'hello':
#include <stdio.h>

int main(void)
{
  int i=23;
  printf("Hello, eCos world! %i\n",++i);
  ++i;
  return 0;
}


It seems that target console output do not pass through 'mangler'.
With the diagnostics output directed to the channel 0, the "$O..#" message, can be seen on the host.


#include <stdio.h>
#include <cyg/hal/hal_arch.h>           /* CYGNUM_HAL_STACK_SIZE_TYPICAL */
#include <cyg/hal/hal_if.h>

const char test_string[] = "$O5468697320697320612074657374206d657373616765210d0a#12";

int main(void)
{
  int i=23, cur;

  cur = CYGACC_CALL_IF_SET_CONSOLE_COMM(CYGNUM_CALL_IF_SET_COMM_ID_QUERY_CURRENT);
  CYGACC_CALL_IF_SET_CONSOLE_COMM(0);
  printf("%s\n",test_string);
  CYGACC_CALL_IF_SET_CONSOLE_COMM(cur);
  printf("%s\n",test_string);
  i++;
  return 0;
}
Target dies after the second printf.


>
> On 30-Apr-2001 Victor Tarasov wrote:
> >
> > Gary Thomas wrote:
> >
> >> On 26-Apr-2001 Victor Tarasov wrote:
> >> > Another question:
> >> > I try to debug Hello application through the unique serial port of iPAQ.
> >> >
> >> > Could you suggest any reason why writing to the /dev/ttydiag or to the /dev/haldiag kills the
> >> > target
> >> >>19        printf("Hello, eCos world %i!\n",i);
> >> >>(gdb) step
> >> >>Sending packet: $m20558,4#d1...Ack
> >> >>Packet received: 1730a0e3
> >> >>...........................
> >> >>Sending packet: $c#63...Ack
> >> > After that, I can get back RedBoot only reset of iPAQ.
> >>
> >> Tell us more about this, how you built it, which version of RedBoot you
> >> are using etc.  AFAIK we do this all the time.
> >
> > Host:
> > Linux 2.4.0 #5 Fri Mar 23 10:33:08 CET 2001 i686 unknown
> >
> > ARM development tools for Linux:
> > GCC core 2.95.2
> > GCC C++ 2.95.2
> > ecos-gcc-2952.pat
> > binutils-2.10.1
> > GDB 5.0
> >
> > I use anonymous CVS distribution version for 26.04.2001.
> > Install:
> >  % ecosconfig new ipaq
> >  % ecosconfig add fileio
> >  % ecosconfig tree
> >  % make
> >
> > RedBoot:
> >  % ecosconfig new ipaq redboot
> >  % ecosconfig import  redboot_Compaq.ecm
> >  % ecosconfig tree
> >  % make
> >
> > RedBoot version:
> > RedBoot(tm) bootstrap and debug environment - built 14:14:14, Apr 26 2001
> > Platform: Compaq iPAQ Pocket PC (StrongARM 1110)
> > Copyright (C) 2000, 2001, Red Hat, Inc.
> > RAM: 0x00000000-0x01fc0000, 0x0001f400-0x01f70000 available
> >
> > Hello-application compiled with:
> > arm-elf-gcc -mcpu=strongarm  -c -o hello.o -g -Wall -I/redboot/tmp_ecos/install/include
> > -ffunction-sections -fdata-sections hello.c
> > arm-elf-gcc -mcpu=strongarm  -nostartfiles -L/redboot/tmp_ecos/install/lib -Wl,--gc-sections -o
> > hello hello.o -Ttarget.ld -nostdlib
> >
> > Victor.
> >
> >


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