How to say 'hello' on EVB7045F? (gensh2)

Radzislaw Galler rgaller at ET.PUT.Poznan.PL
Fri Jan 5 14:36:27 UTC 2001


I need some hint how to put 'hello.exe' sample on the evaluation board
EVB7045F. Looking into the sources seems that the SH2 BSP development
was done on this particular board. But when I download the file to the
board and nothing happens.

Here are steps I have done:

1. build tools for target sh-rtemself on Linux (RH 7.0) (success)
2. build RTEMS 4.5.0-beta3a with no POSIX, no C++, no networking etc.
3. modified init.c of 'helo' sample so it should turn off green LED on
the EVB (I know that console is not ready for this BSP) (success)
4. the FLASH memory of the processor is programmed with 'gdbstubs'
( - I am able to debug some simple selfmade
programs with it. (success)
5. loaded the compiled sample into the EVB (success)
6. runnung the sample (failure)

Here is modified init.c:
/*  Init
 *  This routine is the initialization task for this test program.
 *  It is called from init_exec and has the responsibility for creating
 *  and starting the tasks that make up the test.  If the time of day
 *  clock is required for the test, it should also be set to a known
 *  value by this function.
 *  Input parameters:  NONE
 *  Output parameters:  NONE
 *  COPYRIGHT (c) 1989-1999.
 *  On-Line Applications Research Corporation (OAR).
 *  The license and distribution terms for this file may be
 *  found in the file LICENSE in this distribution or at
 *  $Id: init.c,v 2000/05/05 12:58:06 joel Exp $

#include "system.h"
#include <stdio.h>
#include <rtems/score/iosh7045.h>
#include <rtems/score/sh_io.h>

rtems_task Init(
    rtems_task_argument ignored
    printf( "\n\n*** HELLO WORLD TEST ***\n" );
    printf( "Hello World\n" );
    printf( "*** END OF HELLO WORLD TEST ***\n" );
    exit( 0 );

and here is my gdb session:
~/prog/projects/rtems/tests/hello$ sh-rtemself-gdb o-debug/hello.exe 
GNU gdb 5.0
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
welcome to change it and/or distribute copies of it under certain
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
This GDB was configured as "--host=i586-pc-linux-gnu
(no debugging symbols found)...
(gdb) target remote /dev/ttyS0
Remote debugging using /dev/ttyS0
0x0 in CPU_Interrupt_stack_high ()
(gdb) load
Loading section .text, size 0x12250 lma 0x444000
Loading section .rodata, size 0xa70 lma 0x45624c
Loading section .data, size 0xaf0 lma 0x456d34
Loading section .comment, size 0x1ee0 lma 0x0
Loading section .line, size 0x15280 lma 0x0
Loading section .debug_s, size 0x3870 lma 0x0
Loading section .debug_s, size 0xa980 lma 0x0
Loading section .debug_a, size 0x25e0 lma 0x0
Loading section .debug_p, size 0x3d60 lma 0x0
Loading section .stack, size 0x10 lma 0xfffffec0
Start address 0x444000 , load size 257616
Transfer rate: 62452 bits/sec, 156 bytes/write.
(gdb) c


I can see here two strange things:
1. The debugger couldn't find debug symbols
2. There are some sections loaded at address 0x0 which is unaccesible on
this EVB (RAM starts from 0x400000). The sections overlap each other.

What should I do?


Radzislaw Galler

More information about the users mailing list