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]
Other format: [Raw text]

Booting problem with Flash Routines


Bootloader    : eCos
OS            : eLinux
ARM board     : S3C2410 Samsung
Flash Device  : AM29LV128


--------------------------------------------------------

Case 1: * compiling the eCos with the HAL flash routines
	  commented, (meaning *without* them). 

        * and using inline assembly/C code instead to 
	  copy the kernel image to the ram.


Result: The bootloader *boots* up.
        It brings the eLinux kernel up.
        eLinux kernel runs fine.

--------------------------------------------------------

Case 2	* compiling eCos with the HAL flash routines as 
	  it is without any changes.
	* uses cyg_io_bread, cyg_io_write ..... in my 
	  flash APIs for flash services.
	* uses diag_printf for debug.

Result:	Booting *Fails*.

	Messaged at the minicom:

	In1 the function cyg_io_init _init value 0
	In2 the function cyg_io_init
	Init device '/dev/ttydiag'
	Init device '/dev/haldiag'
	Init device '/dev/flash1'

------------------------------------------------------

Case 2:	In flash_am29xxxxx.inl with:
               
        //void flash_query(void* data) __attribute__ 
		((section (".2ram.flash_query")));
	//using flash instead of RAM
	void flash_query(void* data); 

        In flash.c.inl with:
        void
        flash_dev_query(void* data)
        {
             typedef void code_fun(void*);
             code_fun *_flash_query;
             int d_cache, i_cache;
       diag_printf("In flash_dev_query function\n");

             _flash_query = 
		(code_fun*) __anonymizer(&flash_query);
  
             /* using flash */
             flash_query(data);
        }


Result: flash_read() *fails*
               
        In flash_hwr_init(), flash_query returns 
	values as: 

             id[0] = 0xe
             id[1] = 0xea00 <-- device_id
             id[2] = 0xf018
             id[3] = 0xe59f

        Hence, FLASH_ERR_DRV_WRONG_PART is returned.
        Which finally fails at flash_init()
        And the flash_read finally fails.

------------------------------------------------------
NOTE:

** No problem with MMU enable/disable.
** No problem in reading the flash device id(0x227e) 
   using BDI.
** Flash device(AM29LV128) is *not* in write protected
   mode.

-----------------------------------------------------


Gary/Thomas/Mike...
I just entered the eCos world, and this is my first 
eCos project. I tried variuos ways, but I am stil stuck.
My mail and the way I describe above may be vague. 
But still I am writing, hoping you would give some 
guidance, since you are the authors, and knows 
the code inside out (apologies for taking ur time)
Thanks an advance. 

- Ringo

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


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