Issue with iostream-based hello world example with 4.6.2 release on PSIM BSP

Karel Gardas kgardas at objectsecurity.com
Mon Jan 10 15:23:10 UTC 2005


Hello,

I've copied hello_world_c example to hello_world_cxx and moved test.c to
test.cc and changed it to:

/*
 *  Simple test program -- simplified version of sample test hello.
 */

#include <bsp.h>

#include <iostream>

using namespace std;

rtems_task Init(
  rtems_task_argument ignored
)
{
  cout << endl << endl << "*** HELLO WORLD TEST ***" << endl;
  cout << "Hello World" << endl;
  cout << "*** END OF HELLO WORLD TEST ***" << endl;
  exit( 0 );
}

/* configuration information */

#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER

#define CONFIGURE_RTEMS_INIT_TASKS_TABLE

#define CONFIGURE_MAXIMUM_TASKS 1

#define CONFIGURE_INIT

#include <confdefs.h>

/* end of file */


as I've already written I've added make-cxx-exe rule and also modified
example's Makefile so build output now looks:

/mnt/karel/downloads/RTEMS/build/tools/examples-4.6.2/hello_world_cxx$ make
test -d o-optimize || mkdir o-optimize
powerpc-rtems-g++ -B/mnt/karel/rtems-ppc//powerpc-rtems/psim/lib/ -specs
bsp_specs -qrtems   -g -Wall  -g     -mcpu=603e -D_OLD_EXCEPTIONS
-Dppc603e     -c   -o o-optimize/test.o test.cc
powerpc-rtems-g++ -B/mnt/karel/rtems-ppc//powerpc-rtems/psim/lib/ -specs
bsp_specs -qrtems   -g -Wall  -g     -mcpu=603e -D_OLD_EXCEPTIONS
-Dppc603e          -o o-optimize/hello.exe   o-optimize/test.o
/mnt/karel/rtems-ppc//powerpc-rtems/psim/lib/no-dpmem.rel
/mnt/karel/rtems-ppc//powerpc-rtems/psim/lib/no-event.rel
/mnt/karel/rtems-ppc//powerpc-rtems/psim/lib/no-msg.rel
/mnt/karel/rtems-ppc//powerpc-rtems/psim/lib/no-mp.rel
/mnt/karel/rtems-ppc//powerpc-rtems/psim/lib/no-part.rel
/mnt/karel/rtems-ppc//powerpc-rtems/psim/lib/no-signal.rel
/mnt/karel/rtems-ppc//powerpc-rtems/psim/lib/no-timer.rel
/mnt/karel/rtems-ppc//powerpc-rtems/psim/lib/no-rtmon.rel
powerpc-rtems-nm -g -n o-optimize/hello.exe > o-optimize/hello.num
powerpc-rtems-size o-optimize/hello.exe
   text    data     bss     dec     hex filename
 332616   65588   23381  421585   66ed1 o-optimize/hello.exe
/mnt/karel/downloads/RTEMS/build/tools/examples-4.6.2/hello_world_cxx$


The problem is that when I try this example in PSIM, I always get:

/mnt/karel/downloads/RTEMS/build/tools/examples-4.6.2/hello_world_cxx$ psim o-optimize/hello.exe
core_find_mapping() - access to unmaped address, attach a default map to handle this - addr=0xfffffff4 nr_bytes=0x4 processor=0x4013b008 cia=0x44754

/mnt/karel/downloads/RTEMS/build/tools/examples-4.6.2/hello_world_cxx$


Is there anything I've done wrong?

Thanks,
Karel
--
Karel Gardas                  kgardas at objectsecurity.com
ObjectSecurity Ltd.           http://www.objectsecurity.com




More information about the users mailing list