Forum Discussion

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

DE2I150 - Nios compilation error

Hello,

I am a newbie in using nios. I am trying to store an image which is sdcard onto a sdram. My c code has this function: IOWR_16DIRECT(SDRAM_BASE,(((i+80)*640+(j))-40),pixel) . When I compile I get this error " implicit declaration of function IOWR_16DIRECT ". I am using system.h and altera_up_sd_card_avalon_interface.h header files as well.

Please let me know how I work around this.

Thanks

2 Replies

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

    Perhaps not the better solution, but you can make a serach on all files of the project and all files of Altera's instalation, seeking the specific keyword "IOWR_16DIRECT" within each file. After findind, if occurs more than just one, you can select the one which makes more sense in regar to what compiler or current project you are working, and manually add it with the "INCLUDE" directive at the header of your code.

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

    You are missing the io.h header file. You must include io.h when using the any IO* functions.