Poor Newbie with linkcmds :-)

Cedric Aubert cedric_aubert at yahoo.fr
Thu Aug 7 11:27:29 UTC 2003


hi,

I found some solution to my problem and I post my
result
if someone have or will have same problem with ld.
I solve my problem by using AT(..) and ABSOLUTE(...)
functions.

         .text : AT(0) {	// Now is correctly
positionned in the output at
0x0
 		LONG(__end_of_ram)
 		ABSOLUTE(LONG(start)) // Now is correctly address
with absolute adress
(offset of text + start)
                 *(.text)
 		     .
                 .
                 .
         } >rom
         .data : AT(SIZEOF(.text)){

         } >ram
         .bss : AT(ADDR(.data) + SIZEOF(.data)){ //
Better

         } >ram

But I still have now another problem. I make my prom,
and that's boot
coorectly and
in the RTEMS initialisation, in
boot_card()->rtems_executive_initialize_early (or
something like that)
they are a initialisation at 0 of the workspace zone
wiht a "for". But it
start at the correct
address (positionned at the end of bss in the linkcmds
script) but the size
show to be to big.
It reset all the rest of memory (4M) until bus error.
The parameter are in
the BSP_configuration
structure. Start Address is initialize in my BSP
(based on efi68k) but not
the size. I have found
that the size should be initialize by defaut
parameters in the toolkit sapi
module. So I don't
understand why the size is wrong. If someone kwnon
where I make my mistake
... :-)

Thanks for all


Cedric



> -----Original Message-----
> From: Cedric Aubert [mailto:cedric_aubert at yahoo.fr]
> Sent: Tuesday, August 05, 2003 5:50 PM
> To: rtems-users at oarcorp.com
> Subject: Poor Newbie with linkcmds :-)
>
>
> Hi
>
> All my BSP succesfully compile and hello_word to.
>
> Now I have some trouble to have a coorect image for
> my PROM.
>
> I don't have any monitor on my board, so I had to
> insert
> some correct vector in my prom image.
>
> My memory map is this one :
>
> RAM : 0x00000008 to 0x00400000 // 4MB
> ROM : 0x00800000 to 0x00A00000 // 2MB
> But for a correct boot, from 0x00000000 to
0x00000008
> is mapped to the adress from 0x00800000 to
0x00800008
>
> So my board should can boot with a correct image.
>
> I do this :
>
> MEMORY
> {
>   rom	  : ORIGIN = 0x0800000, LENGTH = 2M
>   ram     : ORIGIN = 0x0000008, LENGTH = 4M
> }
>
> _VBR = 0x00000008;
> __end_of_ram = 0x400000;
> _copy_data_from_rom = 1;
> _RamBase = DEFINED(_RamBase) ? _RamBase :
0x00000008;
> _RamSize = DEFINED(_RamSize) ? _RamSize : 4M;
> _HeapSize = DEFINED(_HeapSize) ? _HeapSize :
0x10000;
> _StackSize = DEFINED(_StackSize) ? _StackSize :
> 0x1000;
>
> SECTIONS
> {
> 	ram : {
> 		. = .;
> 	} >ram
>
>         .text : {
> 		LONG(__end_of_ram)
> 		LONG(start)
>                 *(.text)
> 		.
>                 .
>                 .
>         } >rom
>         .data : {
>
>         } >ram
>         .bss : {
>
>         } >ram
>
> And I am disappointed because text section was at
> 0x80000008 in my image (don't what I want) and my
> boot vector (0x2) is 0x00000008 or it should be
> 0x80000008.
>
> I really mised somethink !!! :-)
>
> If someone can help, thanks a lot
>
> =====
> AUBERT Cedric
> SDEL Controle Commande
> rue Nungesser & Coli
> 44860 St Aignan de Grand Lieu
>
> E-mail : cedric_aubert at yahoo.fr
> Http : http://www.controle-commande.sdel.fr/
>
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site
design software
> http://sitebuilder.yahoo.com


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com



More information about the users mailing list