Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12606 Discussions

problem of my coustom nios board?

Altera_Forum
Honored Contributor II
946 Views

#! /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 F:/multiplexer200507010/standard/software/count_binary_1/Debug 

# Creating .flash file for the FPGA configuration 

$SOPC_KIT_NIOS2/bin/sof2flash --flash=U23 --offset=0x600000 --input=F:/multiplex 

er200507010/standard/standard.sof --output=standard.flash 

Info: ******************************************************************* 

Info: Running Quartus II Convert_programming_file 

Info: Command: quartus_cpf --no_banner --convert F:/multiplexer200507010/standar 

d/standard.sof standard.rbf 

Info: Quartus II Convert_programming_file was successful. 0 errors, 0 warnings 

Info: Processing ended: Tue Oct 04 07:59:30 2005 

Info: Elapsed time: 00:00:01 

WARNING: Default charset GB18030 not supported, using ISO-8859-1 instead 

# Programming flash with the FPGA configuration 

$SOPC_KIT_NIOS2/bin/nios2-flash-programmer --input=standard.flash --sof=$SOPC_KI 

T_NIOS2/examples/Multiplexer/system/Multiplexer.sof --base=0x00800000 

Oct 4, 2005 7:59:31 AM - (??) nios2-flash-programmer: Launching Quartus Programm 

er to download: 

D:/altera/kits/nios2_5.01/examples/Multiplexer/system/Multiplexer.sof 

Oct 4, 2005 7:59:38 AM - (??) nios2-flash-programmer: Error opening target hardw 

are 

Oct 4, 2005 7:59:38 AM - (??) nios2-flash-programmer: Unable to open flash-de 

vice after successfully communicating  

with target. 

It is likely that you are using a flash-programming FPGA design which 

was not created for your target board. 

 

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 GB18030 not supported, using ISO-8859-1 instead 

# Creating .flash file for the project 

$SOPC_KIT_NIOS2/bin/elf2flash --flash=U23 --base=0x00000000 --end=0x7fffff --res 

et=0x2100000 --input=count_binary_1.elf --output=ext_flash.flash --boot=$SOPC_KI 

T_NIOS2/components/altera_nios2/boot_loader_cfi.srec 

WARNING: Default charset GB18030 not supported, using ISO-8859-1 instead 

# Programming flash with the project 

$SOPC_KIT_NIOS2/bin/nios2-flash-programmer --input=ext_flash.flash --sof=__NO_SO 

F_PLEASE__ --base=0x00800000 

Oct 4, 2005 7:59:39 AM - (??) nios2-flash-programmer: Input file empty--no data  

to program into flash. Exiting. 

WARNING: Default charset GB18030 not supported, using ISO-8859-1 instead 

# Creating .flash file for the project 

$SOPC_KIT_NIOS2/bin/elf2flash --flash=U20 --epcs --base=0x0 --end=0x7fffffff --i 

nput=count_binary_1.elf --output=epcs_controller.flash --boot=$SOPC_KIT_NIOS2/co 

mponents/altera_nios2/boot_loader_epcs.srec 

WARNING: Default charset GB18030 not supported, using ISO-8859-1 instead 

# Programming flash with the project 

$SOPC_KIT_NIOS2/bin/nios2-flash-programmer --input=epcs_controller.flash --sof=_ 

_NO_SOF_PLEASE__ --epcs 

Oct 4, 2005 7:59:39 AM - (??) nios2-flash-programmer: SOF-download skipped. 

Pre-Reading 75KBytes of data from U20: 

|----.----+----.----| 

********************* (8.468 sec). 

Oct 4, 2005 7:59:50 AM - (??) nios2-flash-programmer: Success. Zero bytes writt 

en to U20- 

(because device matched contents of epcs_controller.flash) 

Oct 4, 2005 7:59:50 AM - (??) nios2-flash-programmer: Flash programming complete 

WARNING: Default charset GB18030 not supported, using ISO-8859-1 instead 

 

sdram is ok,epcs4 is ok ,my program designed is ok,why does my custom board ?
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
277 Views

there is my memory test result 

 

nios2-terminal: connected to hardware target using JTAG UART on cable 

nios2-terminal: "USB-Blaster [USB-0]", device 1, instance 0 

nios2-terminal: (Use the IDE stop button or Ctrl-C to terminate) 

 

 

 

<----> Nios II Memory Test. <----> 

This software example tests the memory in your system to assure it 

is working properly. This test is destructive to the contents of 

the memory it tests. Assure the memory being tested does not contain 

the executable or data sections of this code or the exception address 

of the system. 

 

 

---------------------------------- 

Memory Test Main Menu 

---------------------------------- 

a: Test RAM 

b: Test Flash 

c: Test EPCS Serial Flash 

q: Exit 

---------------------------------- 

 

Select Choice (a-b): [Followed by <enter>]a 

Base address to start memory test: (i. 

e. 0x800000) 

>0x2000000 

End Address: 

>0x20fffff 

 

Testing RAM from 0x2000000 to 0x20FFFFF 

-Data bus test passed 

-Address bus test passed 

-Byte and half-word access test passed 

-Testing each bit in memory device. . . failed at address 0x2000034 

 

---------------------------------- 

Memory Test Main Menu 

---------------------------------- 

a: Test RAM 

b: Test Flash 

c: Test EPCS Serial Flash 

q: Exit 

---------------------------------- 

 

Select Choice (a-b): [Followed by <enter>]b 

 

Enter the name of the CFI flash device to be opened, 

or just press <enter> to open "/dev/ext_flash") 

-ERROR: Could not open /dev/ext_flash 

 

 

---------------------------------- 

Memory Test Main Menu 

---------------------------------- 

a: Test RAM 

b: Test Flash 

c: Test EPCS Serial Flash 

q: Exit 

---------------------------------- 

 

Select Choice (a-b): [Followed by <enter>]c 

 

Enter the name of the EPCS flash device to be opened, 

or just press <enter> to open "/dev/epcs_controller") 

-Successfully opened /dev/epcs_controller 

-Region 0 contains 8 blocks. 

-Checking Region 0 for erased blocks. 

-Block 5, at address 0x50000 is erased. 

-Would you like to test this block? (y/n)y 

 

-Starting Flash Test. 

-Testing "alt_write_flash" and "alt_read_flash". 

pass 1 - passed. 

pass 2 - passed. 

-Testing "alt_erase_flash_block". passed. 

-Testing "alt_write_flash_block". passed. 

-Testing unaligned writes. passed. 

-Returning block 5 to its erased state. 

-Flash tests complete. 

-Closing flash device "/dev/epcs_controller". 

 

 

---------------------------------- 

Memory Test Main Menu 

---------------------------------- 

a: Test RAM 

b: Test Flash 

c: Test EPCS Serial Flash 

q: Exit 

---------------------------------- 

 

Select Choice (a-b): [Followed by <enter>]
0 Kudos
Altera_Forum
Honored Contributor II
277 Views

my ext_ram address is 0x02000000---0x020fffff 

ext_flash address is 0x0---0x007fffff 

SDRAM address is 0x01000000---0x01ffffff 

above program on NIOS2_CYCLONE_DEV_BOARD IS OK;
0 Kudos
Reply