Loading RTEMS application on MVME162 - 522A

AJAI KUMAR MEDHAVI akmedhavi at rrcat.gov.in
Mon Jan 17 07:02:16 UTC 2011


I have built up RTEMS 4.9.1 with sample applications "Hello" and
"Ticker",for M68040 processor and MVME162 BSP using MinGW/RTEMS4.9 Tools
for Windows.

I had downloded following the sample applications

1.	Hello.ralf
2.	Ticker.ralf

on MVME162-522A VME CPU Board. After this when I execute, my MVME162 CPU
gets immediately failed and nothing is appearing on host monitor. The same
is happening with reduced size of Hello.exe/ Ticker.exe (reduced size
using command m68k-rtems4.9-strip )

Please note that :

1. While building up, I have given following configuration options :

../rtems-4.9.1/configure    --target=m68k-rtems4.9

2.  The on board memory configuration of MVME162-522A

Type of memory		Base Address 			Length

DRAM			Ox0000 0000			8 MB
SRAM			OxFFFE 0000			512 KB
FLASH/PROM		OxFF80 0000 / 0xFFAO 0000	1 MB

3. The file linkcmds in
.\rtems-4.9.1\c\src\lib\libbsp\m68k\mvme162\startup folder has following
setting :

/*_RamBase = DEFINED(_RamBase) ? _RamBase : 0x20000 */;
_RamBase = DEFINED(_RamBase) ? _RamBase : 0x00000;
_RamSize = DEFINED(_RamSize) ? _RamSize : 8M;
_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x10000;       /* 64 KB    */
_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;     /*  4 KB    */

    ram  : org = 0x00000000,   l = 8M       /* Length changed from 8MB  
Medhavi  */
    rom  : org = 0xFF800000,   l = 1M	      /* FLASH MEMORY  Added by
Medhavi */
    sram : org = 0xFFE00000,   l = 512K     /* Added by Medhavi */
	ram : {
		. = .;
	} >ram

         * Text, data and bss segments
        .text : {

4. Bspstart.c has following code :

oid bsp_start( void )
  m68k_isr_entry       *monitors_vector_table;
  int                   index;
  extern void          *_WorkspaceBase;
  extern void          *_RamSize;
  extern unsigned long  _M68k_Ramsize;

  _M68k_Ramsize = (unsigned long)&_RamSize;  /* RAM size set in linker
script */

   *  162Bug Vectors are at 0xFFE00000
   *  162Bug Vectors on LX are at 0x00000000

#if defined(mvme162lx)
  monitors_vector_table = (m68k_isr_entry *)0x00000000;
  monitors_vector_table = (m68k_isr_entry *)0xFFE00000;

  m68k_set_vbr( monitors_vector_table );

  for ( index=2 ; index<=255 ; index++ )
    M68Kvec[ index ] = monitors_vector_table[ 32 ];

  M68Kvec[  2 ] = monitors_vector_table[  2 ];   /* bus error vector */
  M68Kvec[  4 ] = monitors_vector_table[  4 ];   /* breakpoints vector */
  M68Kvec[  9 ] = monitors_vector_table[  9 ];   /* trace vector */
  M68Kvec[ 47 ] = monitors_vector_table[ 47 ];   /* system call vector */

  m68k_set_vbr( &M68Kvec );

   *  You may wish to make the VME arbitration round-robin here, currently
   *  we leave it as it is.

  /* set the Interrupt Base Vectors */

  lcsr->vector_base = (VBR0 << 28) | (VBR1 << 24);


  Configuration.work_space_start = (void *) &_WorkspaceBase;

I have not found specific reasons for MVME162-522A CPU Board getting
failed immediately. I feel there is either Board Firmware configuration
problem or problem with Board Initialization part of RTEMS BSP code. But
not sure about the exact problem and how to locate.

Kindly requested to provide your suggestions / comments / solution
specially for following points (for RTEMS 4.9.1 on MVME162-522A) :

1. After building RTEMS 4.9.1 with Sample applications, The size of
Hello.exe and Ticker.exe comes approximately 1.31 MB and 1.5 MB and Size
of hello.ralf and Ticker.ralf comes about 50 KB and 63 KB

The size of hello.exe is more than 1 MB flash/PROM, so it can not to
loaded into Flash memory.  When I reduced size of Hello.exe with
m68k-rtems4.9-strip command, size of hello.exe comes about 54 KB.

Now my query is :

-	Which file is actually downloadable binary (hello.exe or hello.ralf ) ?
-	If both hello.exe/hello.ralf not downloadable binary, how to get/convert
hello.exe or hello.ralf into downloadable binary.

The 162Bug requires pure binary.

2.  Whether board's RAM must be mapped starting at address Ox00000000 or
    Or at some other address. Whether download and execution address would
be same
    (using ‘niot’ command )as Board’s RAM address.

3. Whether we have run RTEMS application alongwith 162bug. When I transfer
my downloaded application into flash, there would not be 162bug in Flash.

4. After downloading RTEMS application into RAM, what will be precise
procedure (using niot, nbo etc.) to run downloaded application.
5. Any specific RTEMS/BSP configuration for using MVME712 Transition board
serial port 1 to see anything (like printf statements) on my terminal.

6. Whether 162bug firmare uses lowest 64KB / 512 KB block of RAM for its
internal data and this may conflicts with RTEMS’ needs. How to avoid this
confliction and instruct 162bug to use another area for its internal data.

7. The file mvme16x_hw.h  defines MVME16x board IO definitions. In this
file I have found that PCCchip2 structure is not exactly matching with VME
MC2chip structure provide in MVME162 manual. The Memory controller MC2chip
structure consist of critical parameters of MVME162 board.

Whether this may create problem. If yes, how to avoid.

8. Whether there are bugs in networking driver of RTEMS BSP for MVME162.
If yes, what type of bugs and how to eliminate them.

9. Whether there is any debugger which may be used with RTEMS/MinGW tools,
so that I may execute RTEMS application line by line.

10. Whether there is any organisation/group/person(s) who has loaded RTEMS
on MVME162-522A/512A CPU board. They may please try and download my RTEMS
4.9.1 sample Applications on there MVME162 CPU board. I would send my
sample applications.

11. Any other specific information you feel.

Kindly reply with your suggestions/solution/comments enabling me running
RTEMS Application on MVME162 at the earliest .

Best regards

PH. 91-731-2488054
Email : akmedhavi at rrcat.gov.in , akmedhavi at rediffmail.com

More information about the users mailing list