This is the mail archive of the
mailing list for the crossgcc project.
Re: struct pointer initialization
- To: firstname.lastname@example.org
- Subject: Re: struct pointer initialization
- From: joel@OARcorp.com
- Date: Fri, 9 Jul 1999 08:46:55 -0500 (CDT)
- Reply-To: email@example.com
On 9 Jul 1999 firstname.lastname@example.org 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
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 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 email@example.com with the
text 'unsubscribe' (without the quotes) in the
body of the message.