This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


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

Re: problem in excuting the system calls from flash



You cannot sleep in cyg_user_start() because it is executed before the

scheduler is started.


yes got it.

> the control. Now i doubt whether those system calls are excuted

> successfully or no. is there any link between running the programs =

from

> the flash and the excution of the system calls. I guess there should =

not

> be.

But you are right, there should not be any difference between ROM =

startup

and RAM startup in terms of the behaviour of (correct) code.

How do you mean "run from flash"?  You have linked using ROM startup and

programmed the image into the base of flash, overwriting RedBoot, or =

what?

yes i have erased the redboot from the flash, changed the =

CYG_HAL_STARTUP

from RAM to ROM to ecoss.ecc. now the following shows a fragment of the

ecos.ecc.

# <

# Memory layout

#

cdl_component CYGHWR_MEMORY_LAYOUT {

    # Calculated value:  (CYG_HAL_STARTUP =3D=3D "RAM") ? "arm_e7t_ram" =

:

"arm_e7t_rom"

    #     CYG_HAL_STARTUP =3D=3D ROM

    # Flavor: data

    # Current_value: arm_e7t_rom

};

# >

# Memory layout linker script fragment

#

cdl_option CYGHWR_MEMORY_LAYOUT_LDI {

    # Calculated value:  (CYG_HAL_STARTUP =3D=3D "RAM") ?

"<pkgconf/mlt_arm_e7t_ram.ldi>" :

    #

"<pkgconf/mlt_arm_e7t_rom.ldi>"

    #     CYG_HAL_STARTUP =3D=3D ROM

    # Flavor: data

    # Current_value: <pkgconf/mlt_arm_e7t_rom.ldi>

};

# Memory layout header file

#

cdl_option CYGHWR_MEMORY_LAYOUT_H {

    # Calculated value:  (CYG_HAL_STARTUP =3D=3D "RAM") ?

"<pkgconf/mlt_arm_e7t_ram.h>" :      "<pkgconf/mlt_arm_e7t_rom.h>"

    #     CYG_HAL_STARTUP =3D=3D ROM

    # Flavor: data

    # Current_value: <pkgconf/mlt_arm_e7t_rom.h>

};

Now i build ecos, build my application. in my board, 01820000 is the =

address

where pc jumps after startup. if i see the sumbols in my application =

binary i

see that __exception handler is located at 01820000 and i see all the =

symbols

and system calls also.=20

If you want to type "go 0x50080000" (for example) at RedBoot, to run =

your

application in place, in Flash at 0x50080000, then you must select ROM

start *and* edit the linker scripts to link at that ROM address.  Simply

placing a RAM or ROM startup in Flash somewhere without changing the

addresses to match the "somewhere" will not work - eCos apps are not

relocatable.

yes that is right. that is what i have done. the addresses of the =

symbols are

the evidence for that as i have given above. when i power up the board, =

the

pc jumps to 01820000 and the application starts. redboot is not present =

in

the board now, in the same address my application is sitting. with this

configuration, i am able to run a hello world program but when it comes =

to

using a system call like thread creation, it is not working as expected. =

any help is appreciated.

regards,

/Ravi



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