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

Problem with Flash Programmer

Altera_Forum
Honored Contributor II
1,184 Views

<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 E:/altera/qdesigns42/UP3_flash2/software/hello_world_0/Debug 

# Creating .flash file for the project 

$SOPC_KIT_NIOS2/bin/elf2flash --flash=U8 --base=0x00000000 --end=0x100000 --rese 

t=0x0 --input=hello_world_0.elf --output=flash.flash --boot=$SOPC_KIT_NIOS2/comp 

onents/altera_nios2/boot_loader_cfi.srec 

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

# Programming flash with the project 

$SOPC_KIT_NIOS2/bin/nios2-flash-programmer --input=flash.flash --sof=e:/altera/U 

P3_board/up3/system/up3.sof --base=0x00200000 

Jun 27, 2005 10:55:31 AM - (??) nios2-flash-programmer: Launching Quartus Progra 

mmer to download: 

  e:/altera/UP3_board/up3/system/up3.sof 

Pre-Reading 53KBytes of data from U8: 

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

    ********************* (2.75 sec). 

Erasing 4 Sectors: 

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

    ********************* (1.719 sec). 

Unable to send write-packet @0 

buffer-chunk write failed @0 

erase-block write failed @0 

write failed @0 

Jun 27, 2005 10:55:47 AM - (??) nios2-flash-programmer: Unable to write to flash 

Jun 27, 2005 10:55:47 AM - (??) nios2-flash-programmer: Error: Write-operation f 

ailed on device. - exiting. 

WARNING: Default charset GBK not supported, using ISO-8859-1 instead[/b] 

--- Quote End ---  

 

 

When I port the NiosII Flash Programmer to my custom board, the problems above happens. 

Can anybody help me to figner out the problems??  

 

thanks!!
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
477 Views

Hi wdzwdx, 

 

On your custom board, is the flash base address still 0020_0000? 

 

--Scott
0 Kudos
Altera_Forum
Honored Contributor II
477 Views

I&#39;m sorry!! I can&#39;t make out what you exactly mean! 

 

When I create my custom board, it set my flash base address to 0x0200000 automatically, and when I use my custom board, I set it to be 0x0000000. Is there any problem about the base address setting?? 

 

thanks!
0 Kudos
Altera_Forum
Honored Contributor II
477 Views

Hi , 

 

> When I create my custom board, it set my flash base address to 0x0200000 automatically, 

> and when I use my custom board, I set it to be 0x0000000. 

 

Now I&#39;m confused, is the flash on your custom board located at 0000_0000 or 0020_0000? 

 

--Scott
0 Kudos
Altera_Forum
Honored Contributor II
477 Views

Hi,Scott 

thanks!! 

 

I have make it run. 

Because I forget to connect the flash_byte_n to Vcc, it can&#39;t run correctly before. 

 

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

--- Quote Start ---  

Now I&#39;m confused, is the flash on your custom board located at 0000_0000 or 0020_0000?[/b] 

--- Quote End ---  

 

 

when programming to the flash, use the base address 0x000200000 of the custom board, and when run my project, it uses the base address 0x00000000. 

 

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

--- Quote Start ---  

$SOPC_KIT_NIOS2/bin/nios2-flash-programmer --input=flash.flash --sof=e:/altera/U 

P3_board/up3/system/up3.sof --base=0x00200000[/b] 

--- Quote End ---  

 

 

you can see that up3.sof is the .sof file of my custom board, and the aim to set up a custom board is programming the board.
0 Kudos
Reply