Hi All
I've decided to add some snippets of code and output of commands to make things a littl emore clear.
The system I'm trying to run eCos on is based on the standard example that comes with Nios. The only change I've done is to remove the ext_flash and leave only the epcs. In addition I've made sure that the reset address is the epcs. Next I've run the nios2configtool on the generated cpu and specified ROMRAM where I was supposed to. After building the project, a program_flash script was generated in the _install directory. This script contains the following command:
elf2flash --silent --input=$1 --epcs --flash=U59 --boot=`$QUARTUS_ROOTDIR/sopc_builder/bin/find_sopc_component_dir altera_nios2`/boot_loader_epcs.srec --outfile=$TMP/ecos.flash --sim_optimize=0 --base=0x0 --end=0x7FFFFFFF
This command is wrong because you should only have a --epcs flag OR a --flash flag in this command, not both.
Trying to execute this script yields the following output:
[SOPC Builder]$ ./program_flash ../software/hello
Generating flash file for device epcs_controller...
28/01/2005 11:46:07 - (SEVERE) elf2flash:
no reset address provided on the comma
nd line, and none found in the elf file Programming device epcs_controller...
28/01/2005 11:46:10 - (SEVERE) nios2-flash-programmer: com.altera.memory.RWMemor
yException: File not found: c:/DOCUME~1/xxxxxxxx/LOCALS~1/Temp/ecos.flash
28/01/2005 11:46:10 - (SEVERE) nios2-flash-programmer: Unable to read input-data
from: c:/DOCUME~1/xxxxxxx/LOCALS~1/Temp/ecos.flash, exiting
...done
As I've mentioned, trying to change the command in the program_flash script to contain a reset address and executing the script again, yields the following output:
[SOPC Builder]$ ./program_flash ../software/hello
Generating flash file for device epcs_controller...
28/01/2005 11:47:41 - (SEVERE) elf2flash:
in epcs mode, the reset address must not be specified DAH!!
http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/sad.gif
If anybody has worked around this, please let me know.
It looks as though is a problem with the nios tools, but as most of you may know you can program designs into the epcs when eCos is not involved.
Nir