Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
19 years ago

Thinner flash driver

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

2 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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