Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
1,205 Views

A problem about flash programmer

Dear all: 

Now I'm using cycloneIII starter kit,I met a problem of generating the .pof file. 

In my niosII system, the base address of the flash is 0x0, the offset address of the reset vector in cpu setting is 0xe00000. 

I tried to convert my .sof file to .pof file, but after I download the .pof file to flash and restart my board, it seems it can't work at all. 

Could you please explain me the relationship between the base address ,offset address and the start address in programmer. 

Thank you guys very much.
0 Kudos
7 Replies
Altera_Forum
Honored Contributor I
73 Views

The .pof file is the FPGA configuration, that should be put at the offset 0x020000 in the CFI flash. 

What you want to program at offset 0xe00000 is the software, that can be compiled and programmed into the flash using the Nios IDE.
Altera_Forum
Honored Contributor I
73 Views

Thank you ,so you mean that I should set the start address as 0x20000 when I generate the .pof file ?

Altera_Forum
Honored Contributor I
73 Views

Yos, and you'll also need to compile and flash your software project to have your system up and running.

Altera_Forum
Honored Contributor I
73 Views

Thank you very much, I just tried, it can work now. 

It seems that when I programme the flash, I don't need to care about the setting in my niosII system.No matter what base address and no matter what reset vector offset are. 

Another question, why the start address is 0x20000?Is this determined by the CFI_128 itself ?In which case can I change it? 

Thanks again.
Altera_Forum
Honored Contributor I
73 Views

Yes, I think that as long as you use one of the standard work flows, the toolchain that compiles your software figure out automatically the part of the flash memory to use. 

The 0x200000 start address is hard coded in the Cyclone III FPGA and can't be changed. I suggest reading the configuration chapter of the cyclone iii datasheet (http://www.altera.com/literature/hb/cyc3/cyc3_ciii51016.pdf). The address is mentioned on page 9-33. 

I think it was hardcoded that way to be compatible with most applications, especially for those that are used to put the CPU reset vector at offset 0 (even if there is just a jump to the actual application, or a small bootloader code). 

 

EDIT: I should read the datasheet too ;) It seems that in fact you can change the Cyclone III start address with a special JTAG instruction.
Altera_Forum
Honored Contributor I
73 Views

Hehe, thank you very much, I'm going to reading:) 

By the way,what do you mean by change the start address with a special JTAG instruction ?
Altera_Forum
Honored Contributor I
73 Views

The process is described in the datasheet. Using JTAG you can setup the Cyclone III so that it loads its configuration from a different offset in the flash memory. The setting is lost if you cut the power off though, and on the next power up the Cyclone III will again try to load its configuration from address 0x200000. So I guess this feature isn't very interesting in your case.

Reply