OpenCores
no use no use 1/1 no use no use
program the external spi flash
by rill_zhen on Jun 21, 2013
rill_zhen
Posts: 15
Joined: Aug 18, 2012
Last seen: Mar 10, 2015
hi all:
i am trying to program the orpsoc.rbf and orpmon.or32.sizebin to the exteranal flash.i run the commonds mentioned in the Running_SW_on_FPGA_board.txt.but i does not work,there is nothing output from the picocom.any advice or information�thanks in advance!
===========================================================
Programming external SPI-flash
===========================================================
The external SPI flash contains both the FPGA programming file
and a bootloader (orpmon).
Below are information on how to program the SPI with these two files:


1. Download an FPGA-programming file that just connects the
FTDI JTAG signals to the SPI flash IOs.
$ cd ~/program-spi-flash
$ jtag ./program_spi.jtag

2. Erase the SPI flash before programming it:
$ ./spiflash/spiflash-program -e


3. Program the SPI flash with an FPGA programming file (rbf-format):
$ ./spiflash/spiflash-program -p /home/openrisc/fpga_dev_board/ordb2a-ep4ce22/output_file.rbf

4. Program the SPI-flash with OpenRISC SW application (select only one):

4a. Program OpenRISC Linux (requires a large SPI flash):
$ ./spiflash/spiflash-program -a 0xc0000 -P /home/openrisc/program-spi-flash/vmlinux.sizebin


4b. Program OpenRISC bootloader (orpmon)
$ ./spiflash/spiflash-program -a 0xc0000 -P /home/openrisc/program-spi-flash/orpmon.or32.sizebin


Unplug the board and connect it again to load the new flash contents.


Steps 2-4 can also be combined like so (directory paths omitted for brevity):
spiflash-program -e -p output_file.rbf -a 0xc0000 -P orpmon.or32.sizebin

Sizebin files are produced from binary memory dumps using bin2binsizeword:
~/soc-design/orpsocv2/sw/utils/bin2binsizeword ~/soc-design/orpmon/orpmon.or32.bin ~/program-spi-flash/orpmon.or32.sizebin


Good luck and welcome to the OpenCores OpenRISC community ;-)
RE: program the external spi flash
by PBalazs on Jul 8, 2013
PBalazs
Posts: 2
Joined: Jun 7, 2011
Last seen: Jul 19, 2013
Hi!

I have run into the same problem!
Have you been able to find a solution to this problem?
RE: program the external spi flash
by rill_zhen on Jul 9, 2013
rill_zhen
Posts: 15
Joined: Aug 18, 2012
Last seen: Mar 10, 2015
yes!i have solved this problem.
the reason is:by default the size of external flash on the ordb2a board is 8Mbit,however the spiflash-program.c is for the size 64Mbit.so if the size of your flash is 8Mbit(1Mbytes),you must modify spiflash-program.c. the file after i modified is as follows,re-compile it use gcc. good luck!



RE: program the external spi flash
by PBalazs on Jul 9, 2013
PBalazs
Posts: 2
Joined: Jun 7, 2011
Last seen: Jul 19, 2013
Thx for the answer!
no use no use 1/1 no use no use
© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.