[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [microblaze-uclinux] Still searching SystemACE bug



Claudio wrote:
you can use Xilinx impact utility to prepare the system ace CF card.

John wrote:
The system ace controller gets very unhappy if there's not a valid
system ace image (xilinx.sys and all the recommended structure) on the
CF card - it needs to be more than just an MSDOS partition on there.

Also, find the error string "JTAG controller couldn't read configuration
from the CompactFlash" in the adapter.c, then trace it back into the
Xilinx level 0/1 drivers - try to work out what situation causes this
error -  there might be a clue there.


Claudio,  John,
thank you for answering.

I am definitely puzzled.
I have a working ACE bitstream already stored into PROM.
And a custom bootloader in Compact Flash FAT16 formatted.
Into my CF I only have image.bin file.

At boot time bitstream is ready and bootloader (see code below) loads
image.bin from CF to RAM, then jumps to kernel address and linux is
successfully executed.

#define DDR_BASEADDR	0x10200000	     // start ram per uclinux
#define KERNEL_SIZE_MAX	0x400000	     // image length max uclinux = 4 M
kbyte
#define DDR_ENDADDR	DDR_BASEADDR+KERNEL_SIZE_MAX

int copy_uclinux(void)
{
  SYSACE_FILE    *fps;
  void *ddr_ptr;
  unsigned int ris;

    xil_printf("Copying kernel image uClinux from CF....\r\n");

    fps = sysace_fopen("a:\\image.bin","r") ;
    if (fps==0){
        xil_printf ("\r\n file open image Error \r\n");
        return(0);
    }

    ddr_ptr = (void *)DDR_BASEADDR;
    while (ris = sysace_fread(ddr_ptr,1,512,fps)) { /* read 1 sector */
            ddr_ptr+=ris;
            if ((unsigned int)ddr_ptr > DDR_ENDADDR)
                    break;
    }
    fclose (fps);
    ris = (unsigned int)ddr_ptr - DDR_BASEADDR;
    xil_printf("letto %d byte\n\r" , ris);
    return(1);
}

int main(void)
{
    unsigned int *ddr_start;

    //Enable cache
    microblaze_enable_icache();
    microblaze_enable_dcache();

    copy_uclinux();

    void (*ram_addr_)();
    ram_addr_ = (void*)DDR_BASEADDR;
    xil_printf ("\r\nExecuting from RAM starting at address: %x ",
(unsigned int)ram_addr_);
    (*ram_addr_)();
    xil_printf ("\r\nLinux boot failed !!! ");
}

I also tried storing into CF both xilinx.ace and image.bin deleting bitstream from PROMas explained into DS080.pdf page #9 you read

"If no xilinx.sys file exists in the root
directory of the ACE Flash device, a single .ACE file in the
root directory is used by System ACE as the active design."

Following are rules for the System ACE directory structure:
• System ACE configuration files must reside on the first
partition of the CompactFlash device.
• The System ACE partition must be formatted as FAT12
or FAT16.
• A xilinx.sys or single .ACE file must be in the root
(project) directory. An .ACE file is used only if the
xilinx.sys file cannot be found in this directory.
• Only one .ACE file should exist in the ROOT and/or
design directories. This directory structure allows the
Configuration controller to be able to use the .ACE file
to program the FPGA target system correctly."

In all cases SystemACE NEVER works when trying mounting CF filesystem.

Hints will be greatly appreciated.
TIA
--
Marco Cavallini
Koan s.a.s. - Bergamo - ITALIA
Embedded and Real-Time Software Engineering
www.koansoftware.com    |    www.klinux.org

___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/