Hello World Error...

Joel Sherrill joel.sherrill at OARcorp.com
Tue Jun 17 16:10:47 UTC 2003



Madhu Raju wrote:
> 
> Hi,
> Whats the order in which the files are executed whenever any application is
> executed on the board?

It is technically a matter of the loader since it can transfer control
to a symbol or offset inside the executable.  But in general, execution
starts with the first file in the executable image.  On RTEMS systems,
this usually corresponds to the file start.S in the BSP.  The "Board
Initialization" section of the "BSP and Device Driver Development
Guide" walks through the sequence from board reset through 
the post-driver initialization user hooks.  Here is a URL:

http://www.oarcorp.com/rtemsdoc-current/html/bsp_howto/bsp_howto00042.html

There is a bit more going on before the context switch to the 1st task
but I think that covers more than you are asking.

--joel

> Thanking you,
> Madhu
> 
> >===== Original Message From Till Straumann <strauman at SLAC.Stanford.EDU> =====
> >AFAIK, the 603e has no hardware TLB replacement,
> >so the pte121 implementation for using the page
> >hash table and the TLBs doesn't work. The pte121
> >"driver" I contributed only can be used on 604 and up.
> >(And software reloading the TLBs is perhaps not
> >really wise on a RTOS anyways).
> >
> >The easiest way is using the BATs. Load up your
> >BATs to get mappings for everything you need
> >prior to doing _CPU_MSR_SET()
> >
> >(You need IBAT and DBAT mappings for your
> >physical memory and more DBAT mappings for
> >all the devices, PCI space and VME space
> >you want do access. Since you only have
> >4 DBATs, you might have to rearrange your
> >PCI configuration etc.)
> >
> >Look at the motorola_powerpc (under libbsp/powerpc/shared)
> >BSP how they do it...
> >
> >
> >HTH
> >
> >-- Till
> >
> >Madhu Raju wrote:
> >> Hi,
> >> How do I initialize the MMU and let the RTEMS config know where it is?
> >>
> >> Thanks for helping,
> >> Madhu
> >>
> >>
> >>
> >>>===== Original Message From Till Straumann <strauman at SLAC.Stanford.EDU>
> =====
> >>>Hmm - I do not know that BSP at all.
> >>>However, a look at 'bspstart.c' reveals
> >>>
> >>>
> >>>void bsp_start( void )
> >>>{
> >>>  unsigned char *work_space_start;
> >>>  unsigned int  msr_value = 0x2030;
> >>>
> >>>  /*
> >>>   * Set BSP to initial value. Note: This value is a guess
> >>>   * check how the real board comes up. This is critical to
> >>>   * getting the source to work with the debugger.
> >>>   */
> >>>
> >>>  _CPU_MSR_SET( msr_value );
> >>>
> >>>
> >>>Probably, your MMU is not initialized and reading the
> >>>instruction following CPU_MSR_SET() (which enables the MMU)
> >>>crashes for lack of a valid address translation.
> >>>
> >>>HTH
> >>>-- Till
> >>>
> >>>Madhu Raju wrote:
> >>>
> >>>>===== Original Message From Joel Sherrill <joel.sherrill at oarcorp.com>
> =====
> >>>>Madhu Raju wrote:
> >>>>
> >>>>Hi,
> >>>>I have configured RTEMS for dmv177 bsp for powerpc.I did that
> succesfully.I
> >>>>downloaded a hello world application onto SVME/DMV-177 PowerPC 603e Single
> >>>>Board Computer using minicom.When i try to execute the application, I get
> >>>>
> >>>
> >>>the
> >>>
> >>>
> >>>>following error:
> >>>>
> >>>>Exception 0400:  Instruction Access Exception
> >>>>     SRR0(pc) 00041A10   SRR1(msr) 10002030
> >>>>
> >>>>
> >>>>I found out from Hello.num and hello.dump that the instruction is
> >>>>
> >>>>000419ec T bsp_start
> >>>>
> >>>>Could anyone please help me solve this problem?
> >>>>
> >>>>I have no guesses but recommend using powerpc-rtems-objdump -da to find
> >>>>out
> >>>>what instruction is at 00041A10.  That would give a clue as to what
> >>>>happened.
> >>>>
> >>>>One thing I do see is that the linkcmds assumes 32M of RAM.  If this
> >>>>doesn't
> >>>>match your board, it could be accessing non-existent memory.
> >>>>
> >>>>I haven't heard a report on this BSP in a long time.  Please keep us
> >>>>posted.
> >>>>
> >>>>
> >>>>Thanks,
> >>>>
> >>>>Madhu
> >>>>
> >>>
> >>>
> >>>The instruction at 41A10 is
> >>> 41a10:      80 87 00 04     lwz     r4,4(r7)
> >>>
> >>>Can the problem be guessed using this instruction information?
> >>>
> >>>Thanks,
> >>>Madhu
> >>>
> >>>
> >>>
> >>
> >>



More information about the users mailing list