Project

General

Profile

Critical link bit file

Added by John Mladenik about 14 years ago

Can you send me the bin and bit file for your FPGA. I am trying to debug the crash that happens when we program our FPGA. I think I have reproduced it on my system and I have confirmed it does no happens If I do not program the FPGA.

I attached a txt file with the console messages that happen after typing boot in uboot with our FPGA programed.

Everything is fine in uboot and I can read and write all of my internal FPGA registers but once I type boot it then does what is shown in the txt file attached.

I did make all the unused IO Float and this did not seem to fix the problem. I do have some outputs that are defined for our functions but they are all unused pins (I think).

Also can you send me the documentation that shows me how to program the FPGA in Uboot or during power up, or in Linux? I am currently only programming it with the Xilinx Program cable.

John


Replies (20)

RE: Critical link bit file - Added by Michael Williamson about 14 years ago

John. Quick question: which chip select space are you using to talk to the FPGA? We have wired all of them over to the FPGA. CS3 is reserved for the NAND interface. Please ensure that CS3, the EMA_D, and EMA_WAIT0 lines are tristated (='Z') when your chip select is deasserted.

Would it be helpful for us to provide an entire reference project to try (vhdl and ise settings, etc)? What version of the ISE are you using?

The Programming the FPGA wiki page should include the instructions for programming the FPGA via software. Let me know if further instruction is required.

-Mike

RE: Critical link bit file - Added by Michael Williamson about 14 years ago

Also, if you'd like to send me your project file (offline, if you'd prefer) we could arrange that. Then we can at least review it or try it here.

RE: Critical link bit file - Added by John Mladenik about 14 years ago

We only use CS2 and the IO_EMA_D bus is only driven when CS2 and OE are active.

I have the wait signals driven high so this may be the issue I am going to float them and retry thanks. If this doesn't work I will do the other recomendation you have given.

thanks

John

RE: Critical link bit file - Added by John Mladenik about 14 years ago

It looks like it works once I tri-stated the wait signals I can not reproduce the problem.

I sent a new file to our software guys to confirm they do not see a problem but I am confident the problem is fixed.

thanks for you help

John

RE: Critical link bit file - Added by John Mladenik about 14 years ago

When trying to load the FPGA through Uboot I get this error

T WARN: emac_send_packet: No link
T WARN: emac_send_packet: No link
T WARN: emac_send_packet: No link
T WARN: emac_send_packet: No link
T WARN: emac_send_packet: No link
T WARN: emac_send_packet: No link
T WARN: emac_send_packet: No link

I am using the prompt on the serial port and not using ethernet at all. I typed in the first command:

tftp 0xC0700000 c:/IndustrialIO.bin

and the messages above come back.

RE: Critical link bit file - Added by Michael Williamson about 14 years ago

This usually means that the network cable isn't plugged in or the other end isn't talking.

RE: Critical link bit file - Added by John Mladenik about 14 years ago

Why would I have q network cable plugged in and what to I plug it into? My home network? I am using the serial port to connect to the development station.

If I plug it to my home network how to I specify where the file is?

John

RE: Critical link bit file - Added by Michael Williamson about 14 years ago

Sorry, tftp is network transfer protocol. Didn't know you weren't on the network.

If you would like to transfer the data using a serial port, you should be able to a kermit transfer. To load the file via serial type:

loadb 0xC0700000

You should see a prompt telling you its waiting for the file. From your terminal program, initial a kermit transfer of the file, then follow the remaining steps from the wiki.

-Mike

RE: Critical link bit file - Added by John Mladenik about 14 years ago

OK I went through all of that and now my platform does not boot at all. no text coming across on the serial port.

John

RE: Critical link bit file - Added by Michael Williamson about 14 years ago

Do you have a text capture of the commands you typed?

You need to be careful executing commands that write to the NOR, you can correupt the bootloader code....

When you power cycle, do you see anything out of the serial port at all?

RE: Critical link bit file - Added by John Mladenik about 14 years ago

Nothing at all unless I hit both buttons and then I see BOOTME.

here is the console after doing the Kermit upload

U-Boot > loadb 0xc07000000
  1. Ready for binary (kermit) download to 0x07000000 at 115200 bps...
  2. Total Size = 0x00071544 = 464196 Bytes
  3. Start Addr = 0x07000000
    U-Boot > sf probe 0
    8192 KiB M25P64 at 0:0 is now current device
    U-Boot > sf erase 0x580000 0x80000
    U-Boot > sf write 0xc0700000 0x580000 &464196
    syntax error
    U-Boot > sf write 0xc0700000 0x580000 464196
    U-Boot > setenv bootfpga 'sf probe0; sf read 0xc0700000 0x580000 0x80000; loadfp
    ga 0xc0700000'

as you can probably tell i'm not a linux guy.

John

RE: Critical link bit file - Added by Michael Williamson about 14 years ago

Hi John,

Well, the bad news is that I think you whacked the bootloading code on the SPI FLASH.

The "sf write" command was expecting, I think, a hex arguement for the filesize, and you passed it the decimal equivalent. This told it to write to offset 5.5 MBytes for > 4 Mbytes, which likely caused the u-Boot code to "wrap around" the 8 MByte serial prom and erase stuff at the beginning (the boot code).

For future reference, in the wiki the "${filesize}" should have been left verbatim (the u-Boot program will interpret that as an environment variable and substitute the size of the last file transferred over)". So you should have typed:

sf write 0xc0700000 0x580000 ${filesize}

As for "un-bricking" your board, you have 2 options:

1) You can ship it back to us and we can re-flash it for you and shoot it back out.

2) We'll post a procedure (hopefully today) to allow you to reflash the boot code using the serial console with a PC utility while holding the second button (that got you the "BOOTME" prompt). You'll need to then follow a couple of extra steps to reset the configuration of the board.

I'm very sorry for the headaches. Working with the SPI-NOR flash is subtle and u-Boot gives you a nice big gun to point at your shoes if you're not careful.

Let me know how you would like to proceed.

-Mike

RE: Critical link bit file - Added by John Mladenik about 14 years ago

It was my fault not yours so no big deal. If you can post what it takes to re-flash the boot code. If this doesn't work I can ship it back to you.

I will make sure to type in verbatim what you show.

thanks

John

RE: Critical link bit file - Added by Michael Williamson about 14 years ago

Look at the Reprogramming a Dead Board wiki link. Let me know if you run into trouble.

-Mike

RE: Critical link bit file - Added by John Mladenik about 14 years ago

I ran this exactly how you said and I get the usage for the command here is what I typed in

sfh_OMAP-L138 -flash -c -p COM1 UBL_SPI_MEM.ais u-boot.bin

John

RE: Critical link bit file - Added by Michael Williamson about 14 years ago

Hi John,

I copied the instructions wrong from our factory programming instruations. Sorry. The "-c" option should have been a "-v" option.

The command should have read:

sfh_OMAP-L138 -flash -v -p COM1 UBL_SPI_MEM.ais u-boot.bin

I've also updated the wiki page.

-Mike

RE: Critical link bit file - Added by John Mladenik about 14 years ago

that worked I am backup and running.

thanks
John

RE: Critical link bit file - Added by John Mladenik about 14 years ago

it gets into uboot but once past uboot I get this

8192 KiB M25P64 at 0:0 is now current device
Wrong Image Format for bootm command
ERROR: can't get kernel image!

RE: Critical link bit file - Added by Michael Williamson about 14 years ago

Right. The procedure you just ran only reloads the bootloader images.

You will also need to reload the kernel image and the root filesystem to boot all the way up.

The binary kernel image (uImage) and the jffs2 image for the root file system are available on the files tab of the wiki.

To reflash the kernel to SPI-NOR, look at the Linux Kernel wiki page under "installing the kernel".

To reflash the root filesystem to NAND, look at the Linux Root File System wiki page under "Flashing Image to NAND".

-Mike

RE: Critical link bit file - Added by Michael Williamson about 14 years ago

Actually John,

you shouldn't need to reprogram the NAND/root filesystem. Only the kernel. The NAND should still be OK.

-Mike

    (1-20/20)
    Go to top
    Add picture from clipboard (Maximum size: 1 GB)