This is the mail archive of the crossgcc@cygnus.com mailing list for the crossgcc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: struct pointer initialization




On 9 Jul 1999 biguo@263.net wrote:

> hello,everyone!I find some problem in following statements :
>   the_block= (struct  Heap_Block *)0xdd800;
>   the_block->back_flag = 1;
>   the_block->front_flag = 0x22800;
>   the_block->next=(struct  Heap_Block *)0;
>   the_block->previous=(struct  Heap_Block *)0;

> In first statement,struct pointer the_block is pointed to address
> 0xdd800.But the four elements of struct the_block can't be
> initialized.Their contents all are 0xffffffff.The above initial
> statements has no effect on the content of four element.It result in
> failure in work space initialization.How to solve it?Thanks in advance
> for any help.

In case I am not the only one to recognize this code, it is from RTEMS. :)

More than likely, this indicates that:

1.  there is not really memory at 0xdd800  

2.  the memory controller is not properly initialized.

3.  If I recall correctly, you are on an i386ex, so you have to worry
    about the descriptor tables being setup correctly.  These writes
    could just be going off in the ether.

This is definitely during system initialization so any subtle HW
initialization or memory layout (linker script, etc) problem could cause
this.

hello world is a surprisingly difficult program to get running on an
embedded target. :)  Cables, development tools, linker scripts, device
drivers, hardware initialization, etc must all be right for you to print
that magic phrase.  After that, life is usually much easier.

--joel
Joel Sherrill, Ph.D.             Director of Research & Development
joel@OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985

  

_______________________________________________
New CrossGCC FAQ: http://www.objsw.com/CrossGCC
_______________________________________________
To remove yourself from the crossgcc list, send
mail to crossgcc-request@cygnus.com with the
text 'unsubscribe' (without the quotes) in the
body of the message.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]