Noob Hello World sparc/leon2 console not working

Jiri Gaisler jiri at gaisler.com
Sat Jan 7 13:59:33 UTC 2006


Check the amount of memory you have on the board, and the
stack pointer as set by grmon. You need around 200 Kbyte
to run hello.exe.

Jiri.

Ralph Preston wrote:
> Hello,
> 
> I just installed RTEMS 4.6.5 and am trying to run the example Hello
> World on a Sparc/Leon2 board.  The problem is there is no console
> output, the program hangs.  Is there a compile option/define/or anything
> I need to set in order to get console output?  The makefile includes
> "Managers=io".
> 
> Following is the output from the compile and gdb.
> 
> % make
> test -d o-optimize || mkdir o-optimize
> sparc-rtems-gcc --pipe -B/opt/rtems/sparc-rtems/leon2/lib/ -specs
> bsp_specs -qrtems   -g -Wall  -O2 -g     -mcpu=cypress -msoft-float
> -c   -o o-optimize/test.o test.c
> sparc-rtems-gcc --pipe -B/opt/rtems/sparc-rtems/leon2/lib/ -specs
> bsp_specs -qrtems   -g -Wall  -O2 -g     -mcpu=cypress -msoft-float
> -o o-optimize/hello.exe
> o-optimize/test.o   /opt/rtems/sparc-rtems/leon2/lib/no-dpmem.rel 
> /opt/rtems/sparc-rtems/leon2/lib/no-event.rel /opt/rtems/sparc-rt
> ems/leon2/lib/no-msg.rel /opt/rtems/sparc-rtems/leon2/lib/no-mp.r
> el /opt/rtems/sparc-rtems/leon2/lib/no-part.rel /opt/rtems/sparc-
> rtems/leon2/lib/no-signal.rel /opt/rtems/sparc-rtems/leon2/lib/no-
> timer.rel /opt/rtems/sparc-rtems/leon2/lib/no-rtmon.rel
> sparc-rtems-nm -g -n o-optimize/hello.exe > o-optimize/hello.num
> sparc-rtems-size o-optimize/hello.exe
>    text    data     bss     dec     hex filename
>   92368    2868    4956  100192   18760 o-optimize/hello.exe
> 
> % sparc-rtems-objcopy -O srec o-optimize/hello.exe o-optimize/hello.srec
> 
> I then run GRMON, target it with gdb and load the srec.  The program
> hangs, so I kill it and produce this output:
> 
> Program received signal SIGINT, Interrupt.
> 0x40002cdc in _Internal_error_Occurred (the_source=4210657,
> is_internal=0,
>     the_error=5)
> at ../../../../../../rtems-4.6.5/cpukit/score/src/interr.c:57
> 57        _CPU_Fatal_halt( the_error );
> (gdb) bt
> #0  0x40002cdc in _Internal_error_Occurred (the_source=4210657,
> is_internal=0,
>     the_error=5)
> at ../../../../../../rtems-4.6.5/cpukit/score/src/interr.c:57
> #1  0x40001cac in console_initialize (major=0, minor=0, arg=0x0)
> 
> at ../../../../../../../../../rtems-4.6.5/c/src/lib/libbsp/sparc/leon2/console/console.c:328
> #2  0x400031c4 in rtems_io_initialize (major=0, minor=0, argument=0x0)
>     at ../../../../../../rtems-4.6.5/cpukit/sapi/src/io.c:268
> #3  0x40002fb4 in _IO_Initialize_all_drivers ()
>     at ../../../../../../rtems-4.6.5/cpukit/sapi/src/io.c:97
> #4  0x40002ae4 in rtems_initialize_executive_early (
>     configuration_table=0x400174ac, cpu_table=0x40017484)
>     at ../../../../../../rtems-4.6.5/cpukit/sapi/src/exinit.c:263
> #5  0x40001ac0 in boot_card (argc=0, argv=0x0, envp=0x0)
> 
> at ../../../../../../../../../rtems-4.6.5/c/src/lib/libbsp/shared/bootcard.c:115
> #6  0x400010dc in zerobss ()
> 
> I've also used GRMON to step through the assembly and it looks like the
> offending function is rtems_io_register_name() -> mknod(), but that's as
> far as I've gotten, and I figured there must be something simple I'm
> missing.  Any assistance would be greatly appreciated.
> 
> Thanks,
> 
> Ralph Preston
> The MITRE Corporation
> 202 Burlington Road MS E095
> Bedford, MA 01730
> 
> .
> 



More information about the users mailing list