Loading RTEMS application on MVME162 - 512A

Chris Johns chrisj at rtems.org
Tue Jun 15 23:45:31 UTC 2010


On 15/06/10 2:19 PM, Ajai Kumar Medhavi wrote:
>
>
> I have built up  RTEMS 4.9.1 with sample application "Hello" and "Ticker",
> for M68040 processor and MVME162 BSP using MinGW Tools for Windows.
>
>
> I downloded the sample application on MVME162-512A VME CPU Board. After
> this when I execute, my MVME162 CPU gets immediately failed and nothing is
> appearing on host monitor. The same this is happening with reduced size of
> Hello.exe and other application Ticker.half and Ticker.exe
>
> Please note that :
>
> 1. While building up, I have given following configuration options :
>
> ../rtems-4.9.1/configure    --target=m68k-rtems4.9
>                              --enable-rtemsbsp=mvme162
>                              --enable-cxx
>                              -–enable-itron
>                              --disable-rdbg
>                              --disable-posix
>                              --enable-networking
>                              --enable-tests=samples
>                              --prefix=/opt/rtems4.9

Why the ITRON API ? Are you using it ?

>
> 2.  The file linkcmds in
> .\rtems-4.9.1\c\src\lib\libbsp\m68k\mvme162\startup folder has following
> setting :
>
>
> /*
>   * Declare some sizes.
>   */
> _RamBase = DEFINED(_RamBase) ? _RamBase : 0x20000;
> _RamSize = DEFINED(_RamSize) ? _RamSize : 1M;
> _HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x10000;
> _StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
>
> MEMORY
> {
>          ram : org = 0x000000, l = 1M
> }
>
> SECTIONS
> {
>          ram : {
>                  . = .;
>          }>ram
>
>          /*
>           * Text, data and bss segments
>           */
>          .text 0x20000 : {
>                  *(.text*)
>
>                  /*
>                   * C++ constructors/destructors
>                   */
>                  *(.gnu.linkonce.t.*)
>
>
>
> 3. 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;
> #else
>    monitors_vector_table = (m68k_isr_entry *)0xFFE00000;
> #endif
>
>    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);
>
>    page_table_init();
>
>    Configuration.work_space_start = (void *)&_WorkspaceBase;
> }
>
>
>
> I have not found the reasons for CPU getting failed immediately. I feel
> there is some hardware configuration problem or problem with RTEMS
> BSP/Startup code. But not sure about exact problem and how to locate.
>
>
> I need technical help from those who have already ported RTEMS on MVME162
> VME CPU Board or similar board.
>

I have not played with a 162 but a 147 and 172. I currently have no 
valid hardware to perform any testing.

>
>
> Kindly provide me technical information/help in following :
>
>
>
> 1. Whether there is any organisation/group/person who has loaded RTEMS on
> MVME162-512A CPU board. They may please download my RTEMS 4.9.1 sample
> Applications on there MVME162-512A CPU board.  I would send my sample
> applications.
>
>
> If there is some different MVME162 CPU board like MVME162-522, please
> suggests me what kind of changes, if any, I have to make in my RTEMS
> source code.
>
>
> 2. Whether there is any debugger which may be used with RTEMS/MinGW tools,
> so that I may execute RTEMS application line by line.
>

If you have the dbug, the boot monitor you can set break points at 
critical points in the initialisation. You can also disassemble the 
loaded code to make sure everything is in the correct locations in 
memory. I "objdump -D --source" the executable to view what is in the 
executable.

>
> 3. What is starting point of code when RTEMS application run. Normally the
> sequence is kernel Initialiazation, Borad initialization, BSP/Drivers
> initialization and then passing the control to the application.
>
>
> Kindly let me know starting point of RTEMS and then precise sequence of
> code for  kernel Initialiazation, Borad initialization, BSP/Drivers
> initialization and how control is being passed to application task(s)
>

Control is passed to BSP specific boot code that manages low level 
issues often directly related to the processor, specific hardware and 
boot monitor. This is interrupts, buses and that kind of thing. The 
arena is set up such as coping initialised data from ROM to RAM (if 
required) and clearing the uninitialized data area (.bss). After that 
you get more shared things such as RTEMS configuration tables, heap etc 
set up plus libc. After this RTEMS is given control and initialise is 
driven from the configuration given to RTEMS.

>
>
> Kindly reply me on akmedhavi at rrcat.gov.in and akmedhavi at rediffmail.com
> I may send RTEMS sample applications for downloading MVME162-512A CPU board.
>

Please do not send me any application code as I do not have any hardware 
to run it on.

Chris



More information about the users mailing list