Nios2 access to EPCS device without using HAL drivers

Hello,

I have a system with limited memory resources which contains a Nios2 processor. An EPCS device is linked to this processor. I don't want to use the HAL drivers to access this device because when I use the HAL drivers I will need lots of memory and I can no longer use the small C library. After looking in the EPCS device controller section in the Quartus2 handbook I have noticed that the register functions are not published. Altera states: "Altera does not publish the usage of the control and data registers. To access the EPCS device, you must use the HAL drivers provided by Altera".

I don't want to use the HAL drivers because of their code size. Does anybody have a description of the EPCS Controller Register Map?

Thanks and best regards, Karel Deprez

Reply to
Dolphin
Loading thread data ...

EPCS device controller info can be found on:

formatting link

Reply to
Dolphin

The source files for the HAL are in the components directory of either the Nios or Quartus install. In this case, they are under quartus. The files you're interested in are altera_avalon_epcs_flash_controller.c/h as noted in the EPCS Device Controller Core with Avalon Interface document, page 3-5. You can glean the operation from these files or just include them in your build and use the HAL interface. Just using them should not affect which C library you use. Most likely, the issues you're running into with respect to the C library are due to using the IDE rather than setting up your own build.

Mark

Reply to
Mark

It may be easier if you use Marco Groeneveld's EPCS Virtual Memory controller. It attaches the EPCS serial Flash to the Avalon bus as a parallel device you can just read and write. You can find it on:

formatting link

Look in the section IP Cores.

BTW: The Firefly is a neat board as well.

Best regards,

Ben Twijnstra Altera Tech Support SascoHolz Nederland

Reply to
Ben Twijnstra

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.