Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
The Intel sign-in experience is changing in February to support enhanced security controls. If you sign in, click here for more information.

CFI with multiple chips

Altera_Forum
Honored Contributor II
1,032 Views

Hello, 

 

I'm working with the Microtronix Stratix Development board and have the SODIMM Flash (4M x 16) mapped to the address range 0x00800000-0x00FFFFFF. I'm trying to upload a uClinux filesystem into the SODIMM Flash memory beginning at address 0xA00000 using the nios2-flash-programmer. When I try this I get the error message "File too large to fit in flash memory". I posted another message on this topic a while back (old topic (http://www.niosforum.com/forum/index.php?act=st&f=2&t=483)) and received no response. After thinking about this a while I believe I've figured out the cause of this problem. 

 

The Microtronix SODIMM Flash is two 2Mx16 chips stacked to create a 4M x 16 bank of flash. The CFI drivers query the Flash memory for size and other information at startup. Is it possible that the CFI drivers are only querying the first flash chip and therefore only seeing the lower half of the Flash bank? 

 

-- 

Terry
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
106 Views

Hello Terry, 

 

You are correct that the flash programmer is only dealing with one of the flash chips. The SODIMM module was created long before the Nios II and flash programmer and doesn't really fit well with it's view of flash memory. We unfortunately don't yet have a solution for writing a filesystem that is larger than 2M. If you were able to somehow split the flash file at the appropriate place, you might be able to download the two pieces independently to each chip using the command line nios_flash_programmer. 

 

Dennis Scott 

Microtronix Datacom Ltd.
Altera_Forum
Honored Contributor II
106 Views

Dennis, 

 

Thanks for the information.  

 

One way you might do it is that since you know how big the flash memory is supposed to be (either from# defines in system.h or passed in on the command line to nios2-flash-programmer), if you find that after doing the first CFI query you've only detected a portion of the expected memory, do another CFI query beyond the address range of the first chip. In this manner you'd keep doing CFI queries until you detected the expected amount of memory, or exit with error if the additional memory is not detected. 

 

-- 

Terry
Reply