This is the mail archive of the ecos-discuss@sourceware.org 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]

"fis list" won't display RedBoot FIS directory entry


I've enabled the CYGOPT_REDBOOT_FIS_REDBOOT option and verified
that there is an entry for RedBoot in the FIS directory, but the
"fis list" command refuses to display it.  This is caused by
the following bit of code in flash.c:


   714	    last_addr = 0;
   715	    image_indx = 0;
   716	    do {
   717	        image_found = false;
   718	        lowest_addr = 0xFFFFFFFF;
   719	        img = (struct fis_image_desc *) fis_work_block;
   720	        for (i = 0;  i < fisdir_size/sizeof(*img);  i++, img++) {
   721	            if (img->u.name[0] != (unsigned char)0xFF) {
   722	                if ((img->flash_base > last_addr) && (img->flash_base < lowest_addr)) {
   723	                    lowest_addr = img->flash_base;
   724	                    image_found = true;
   725	                    image_indx = i;
   726	                }
   727	            }
   728	        }
   729	        if (image_found) {
                    [print entry]

The test at line 722 fails because RedBoot's img->flash_base
value is 0 (it's at the bottom of flash) which is not greater
than "last_address" which is initialized to 0. IOW, (0 > 0) is
false.

Two questions:

 1) Why the prohibition against displaying a file if it happens
    to be located at address 0 and is also the first one
    encountered in the FIS directory?

 2) What is the last_addr/lowest_addr stuff supposed to be
    accomplishing? Why doesn't "fis list" just index through
    the FIS directory entries and print them?

    Is this an attempt to print the entries sorted by base_addr?    

-- 
Grant Edwards
grante@visi.com



-- 
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]