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++
12620 Discussions

Nios II IDE flash programmer problem?

Altera_Forum
Honored Contributor II
1,077 Views

Hello Nios experts, 

I am using Nios II v1.1 with the IDE v1.1.0 and Quartus II v4.2. When I compile a simple project like the diagnostic or the hello world program, I can debug it fine. It generates a good elf file and a flash file. But when I go to use the flash programmer from within the IDE, I run into these problems. It claims that my flash file is too large for hte flash component. I don't think so, I tried these same simple projects with and older nios II v1.0.1 and Quartus v4.1 and it works fine. Here is the result form the console... 

 

<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 C:/altera/kits/nios2/examples/verilog/niosII_stratixII_2s60_ES/full_featured_ 

qh/software/board_diag_1/Debug 

# Creating .flash file for the project 

$SOPC_KIT_NIOS2/bin/elf2flash --flash=U5 --base=0x00000000 --end=0x1000000 --res 

et=0x0 --input=board_diag_1.elf --output=ext_flash.flash --boot=$SOPC_KIT_NIOS2/ 

components/altera_nios2/boot_loader_cfi.srec 

# Programming flash with the project 

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

IT_NIOS2/components/altera_nios_dev_board_stratix_2s60_es/system/altera_nios_dev 

_board_stratix_2s60_es.sof --cable=&#39;USB-Blaster [USB-0]&#39; --base=0x01000000 

Feb 11, 2005 12:24:31 PM - (INFO) nios2-flash-programmer: Launching Quartus Prog 

rammer to download: 

  C:/altera/kits/nios2/components/altera_nios_dev_board_stratix_2s60_es/syste 

m/altera_nios_dev_board_stratix_2s60_es.sof 

Pre-Reading 0KBytes of data from U5: 

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

    *********************Feb 11, 2005 12:24:49 PM - (SEVERE) nios2-flash-program 

mer: Flash file is too large to fit in flash memory[/b] 

--- Quote End ---  

 

 

 

And this is the content of the ext_flash.flash: 

<div class='quotetop'>QUOTE </div> 

--- Quote Start ---  

S01A000055353A30313A30303030303030303A30313030303030304B 

S32500000000140084003A48011004F8BF1016FDBF0034404000040040083A6800080000000068 

S3060100000014E4[/b] 

--- Quote End ---  

 

 

I don&#39;t know what the problem is...  

Any help would be appreciated. 

 

-Quan
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
197 Views

UPDATED: Problem fixed... 

 

It turns out it was one of two things performed that corrected this problem.  

1) Nios2 license expired, v1.1 required new license. After obtaining new license and rebuilt, the flash programmer worked fine. 

2) The other change made was change the exception address in sopc builder to point from ext_sram to sdram, but I don&#39;t think this had much to do with it at all. 

 

Those were the two changes made and the flash programmer works correctly now. 

Wished there were some warnings or errors that would have helped get to this point sooner. 

 

-Quan
0 Kudos
Reply