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++
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
12748 Discussions

Debugging the „Flash Programmer“ of 5.1?

Altera_Forum
Honored Contributor II
1,239 Views

Hello community, 

 

There have been a lot of topics about the flash programmer. Every time I wondered why so many people have problems with their flash device. Now I have some problems too. I’m using a flash from ST which isn’t compatible with the Altera HAL drivers. After debugging and adding some flash reset functions it is possible to program the flash with the normal HAL commands like “alt_write_flash_block”. But the flash programme doesn’t work. Now I would like to debug the flash programmer. Is this possible? Where are the sources of the flash programmer? I think that the flash programmer is using the HAL driver too. So I think that if the standard functions are working the flash programmer should work too. 

 

 

Regards, 

niosIIuser
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
492 Views

The flash programmer does not use the HAL functions. Getting things to work in the HAL and in the flash programmer are separate steps. 

 

In general, more devices should be supported, using the flash programmer. Have you tried any of the override functionality provided by the Nios II Flash Programmer (detailed in the user's guide)? 

 

Best Regards, 

 

- slacker
0 Kudos
Altera_Forum
Honored Contributor II
492 Views

Ya, look at the spec for your chip, and the spec for one of the AMD CHips it supports - if the programming algorithm is the same, you can setup an override so that the nios2-flash-programmer ignores the device code and tries to program it anyway. IF the algorithms aren&#39;t compatible, you will have to write your own code - I tried to get the sources for the flash programmer, and they aren&#39;t readily available http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/sad.gif

0 Kudos
Altera_Forum
Honored Contributor II
492 Views

Hello slacker and jdhar, 

 

Thank you for your replies. I feared about the fact that the flash programmer isn’t using HAL. Until now I didn’t tested the override functionality. I will do this as soon as possible. The program-, erase-, … algorithms of the used flash are identical with the specification of an AMD flash. After debugging I figured out that the HAL doesn’t identify the correct width of the device. So first I changed the code for the identification. After that there was another problem with the flash. After the identification process the flash isn’t in the normal read mode. To bring the device in this mode a reset command is necessary. I hope these changes can be done with the override functions. 

 

 

Regards, 

niosIIuser
0 Kudos
Altera_Forum
Honored Contributor II
492 Views

Hello, 

 

Using the width mode override parameter was successful. It is now possible to program the flash. Unfortunately the width mode parameter can only be used in the command line. I hope Altera will include this function in the GUI version of the flash programmer. 

 

 

Thank you for the support, 

niosIIuser
0 Kudos
Reply