Forum Discussion

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

AN517 source files (ie main.c and header files)

Does anyone have the source files used in AN517? (i.e. main.c and associated header files?). Can you upload the files to this thread for everyone including myself? For some strange reason they are not in the zip file linked with AN517 on Altera's website. Altera link below.

http://www.altera.com/literature/lit-an.jsp

AN517 page 29 step 10 reads...

"10. In Windows Explorer drag Altera-supplied main.c to the blank_project_0 directory.

To see the main.c example test program, see “Appendix: Example main.c

Test Program File” on page 39."

Yes I know I can just rebuild it by cutting and pasting and I have done that but I get the undeclared errors below so I am wondering what else is incomplete from that example.

make -s all includes

Compiling main.c...

../main.c: In function `LED_Control':

../main.c:59: error: `LED_PIO_BASE' undeclared (first use in this function)

../main.c:59: error: (Each undeclared identifier is reported only once

../main.c:59: error: for each function it appears in.)

../main.c: In function `Single_Write':

../main.c:81: error: `ALTMEMDDR_SPAN' undeclared (first use in this function)

../main.c:87: error: `ALTMEMDDR_BASE' undeclared (first use in this function)

../main.c: In function `Single_Read':

../main.c:114: error: `ALTMEMDDR_SPAN' undeclared (first use in this function)

../main.c:120: error: `ALTMEMDDR_BASE' undeclared (first use in this function)

../main.c: In function `Call_verify':

../main.c:133: warning: implicit declaration of function `memcmp'

../main.c: At top level:

../main.c:33: warning: 'Main_menu' defined but not used

make: *** [obj/main.o] Error 1

Can you upload the files to this thread? By the way, anyone know why the "DMA_Operation" function has no definition?

Cheers

2 Replies

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

    Nevermind, I did not realize a .qar file was a compressed set of files. I just figured out how to uncompress a .qar file.

    If you're a knuckle head like me then do this to uncompress .qar files on Altera's website.

    In Quartus II:

    1. Project | Restore Archived Project...

    2. Choose Archive Name ( *.qar)

    3. Destination Folder ( your project folder)

    By the way attached is the *.qar file for AN517 if anyone needs it.

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

    Hello,Max232:

    I walkthrough the AN517 just now.The compiling error are caused by the different pin name or entity name in the SOPC Builder and the main.c.

    I just rename them in the main.c and then all right.