Altera_Forum
Honored Contributor
21 years agoProblem of Porting Flash Programmer.
Hello Everyone,
I use Microtronix Cyclone Development Board(I think it is a bad dev board, so many important part generated by SOPC Builder Core can not work with Nios II) and it is just a custom board, so I must porting Flash Programmer to Mtx.Cyclne.Board. In order to that, I creat a project to test EPCS first. Nios II/s + OnChipRam + jtag-uart + led_pio + epcs_controller. Just can run hello_led. It runs ok under Nios II IDE. Then, I followed the ug_nios2_flash_programmer.pdf. 1. Under Nios II SDK Shell, /cygdrive/d/My_Test [SOPC Builder] mk_target_board --name=Mtx_Flash_Porting --family=cyclone --clock=49.152 --index=1 --buffer_size=16384 --epcs=U15 Make Target Board version 1.01 Board name: "Mtx_Flash_Porting" Board class: "Mtx_Flash_Porting" Device family: Cyclone Clock frequency: 49152000hz Payload buffer size: 16384 bytes EPCS flash enabled with reference designator: U15 Finished making target board. 2. Start Quartus II and do as Step4--13. My board flash(4MBytes) is AM29DL323GB-90EI. I set address width=21bits, data width=16bits, reference designator=U20, leave others as default value. Its base address=0x00400000. In More "Board_System" Settings, I only set one item. Hardware Image Name Module Offset Address user asmi 0x00000000 0x00060000 3. Generate System Block and update Symbol or Block. 4. Do as Step25--31. Mtx Product Data Sheet gives the Pin Name and Assignment. So I assign the pins to the DataSheet defined FPGA-Pins. (But Leave the clk and reset_n Pins unnamed and unassigned) 5. Compile it under Quartus II. 6. Reopen my project, open SOPC Builder, at the Board Target drop-down list select "Mtx_Flash_Porting". 7. Regenerate the system.bsf, and recompile the project. "epcs_controller base=0x00000000" Finally, I open Nios II IDE, creat Hello_Led Project, build project sucessfully. I open Tool-->Flash Programmer and do the Flash Programmer Settings, below is my option: In main Tab Window: ¡ô Target board: Mtx_Porting_Flash ¡ô Uncheck: Program software project into flash memory ¡ô Check: Program FPGA configuration data into hardware-image region of flash memory FPGA Configuration(sof) D:\My_Test\EPCS\EPCS.sof Hardware Image user: U15 + 0x00000000 ¡ô Uncheck: Program a file into flash memory In target connection Tab Window: ¡ô JTAG Cable: automatic <currently: ByteBlasterII [LPT1]> ¡ô JTAG Device: automatic <the device which has the processor> Click Apply, and run Program Flash. In the Console, display <div class='quotetop'>QUOTE </div> --- Quote Start --- #! /bin/sh# # This file was automatically generated by the Nios II IDE Flash Programmer.# # It will be overwritten when the flash programmer options change.# cd D:/My_Test/EPCS/software/epcsdown_led/Debug # Creating .flash file for the FPGA configuration $SOPC_KIT_NIOS2/bin/sof2flash --flash=U15 --offset=0x00000000 --epcs --input=D:/ My_Test/EPCS/EPCS.sof --output=EPCS.flash Info: ******************************************************************* Info: Running Quartus II Convert_programming_file Info: Command: quartus_cpf --no_banner --convert --device=EPCS16 --option=EPCS.o pt D:/My_Test/EPCS/EPCS.sof EPCS.pof Info: Quartus II Convert_programming_file was successful. 0 errors, 0 warnings Info: Processing ended: Fri Mar 25 16:43:04 2005 Info: Elapsed time: 00:00:02 Info: ******************************************************************* Info: Running Quartus II Convert_programming_file Info: Command: quartus_cpf --no_banner --convert EPCS.pof EPCS.rpd Info: Quartus II Convert_programming_file was successful. 0 errors, 0 warnings Info: Processing ended: Fri Mar 25 16:43:05 2005 Info: Elapsed time: 00:00:01 WARNING: Default charset GBK not supported, using ISO-8859-1 instead # Programming flash with the FPGA configuration $SOPC_KIT_NIOS2/bin/nios2-flash-programmer --input=EPCS.flash --sof=d:/My_Test/E PCS/Mtx_Flash_Porting/system/Mtx_Flash_Porting.sof --epcs --relocateMar 25, 2005 4:43:07 PM - (??) nios2-flash-programmer: Launching Quartus Program mer to download: d:/My_Test/EPCS/Mtx_Flash_Porting/system/Mtx_Flash_Porting.sof Unable to synchronize with target. Mar 25, 2005 4:44:19 PM - (??) nios2-flash-programmer: Error opening target hard ware Mar 25, 2005 4:44:19 PM - (??) nios2-flash-programmer: In order to program flash, you must first create a purpose-built flash-programming design (i.e. FPGA configuration) and associate it with your particular board. The Nios development kit is delivered with purpose-bui lt flash-programming designs pre-built for several development boards. If you wi sh to program flash on your own board, you must first create a flash-programming design. The process of creating a flash-programming design for your board is mostly automated. From a bash-shell, execute this script: mk_target_board --help The help-message includes references to other documentation on programming flash and targeting Nios systems to custom board designs. - exiting. WARNING: Default charset GBK not supported, using ISO-8859-1 instead[/b] --- Quote End --- I do not know what is wrong, it makes me very depressed. Can someone help me? Give me some index. Thank you very much.