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.

Thinner flash driver

Altera_Forum
Honored Contributor II
1,371 Views

Hello, 

 

My Nios II code must run from onchip memory so I have a very limited code space to play with. In my system libraries I set "Small C library" and "Reduced drivers" to save some space. 

 

However, in order to write to a flash memory, it seems that I'm required to disable the "Reduced drivers" options because the HAL driver for the CFI flash access requires full drivers. But this takes too much space. 

 

Are there any other options, beside coding a flash interface of my own in VHDL with its own thin driver ? 

 

Thanks in advance
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
392 Views

Hi eliben, 

If you are a good in driver development then i would suggest that just write your own code for flash read/write/erase. 

You are using CFI.ok so you have a datasheet for it and its provide you some flow charts and working of flash so you can use that and make you own driver. By this you can make your driver which is not require full driver and i dont think so it will require more space for you. 

From my point of view this is the last solution you can use and bypass the CFI driver of altera. 

 

Regards, 

slsnios
0 Kudos
Altera_Forum
Honored Contributor II
392 Views

eliben, 

I was in your exact position 6 weeks ago. I started a SR with Altera but we weren't able to find a solution using the HAL. Ultimately, the "solution" suggested by Altera support was to write the flash routines myself. A bit of sample code was provided which got me well on my way. PM me if you are still working on a solution and need this sample code. 

 

s
0 Kudos
Reply