Forum Discussion

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

DE2_WEB (EXT_FLASH_NAME undeclared)

Hi,

I am a NIOS newbie, tried to build DE2_WEB into NIOS II IDE v6.1.

As the terasic provided code was built with v6.0, I regenerated the system in SOPC and recompiled in Quartus II v6.1,

Then I tried building the project in NIOS II and I get following errors:

==============================================

**** Build of configuration Debug for project web_server_0 ****

make -s all

Compiling network_utilities.c...

../network_utilities.c: In function `generate_and_store_mac_addr':

../network_utilities.c:196: error: `EXT_FLASH_NAME' undeclared (first use in this function)

../network_utilities.c:196: error: (Each undeclared identifier is reported only once

../network_utilities.c:196: error: for each function it appears in.)

../network_utilities.c: In function `get_board_mac_addr':

../network_utilities.c:225: error: `EXT_FLASH_BASE' undeclared (first use in this function)

../network_utilities.c: In function `FindLastFlashSectorOffset':

../network_utilities.c:358: error: `EXT_FLASH_NAME' undeclared (first use in this function)

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

Build completed in 5.956 seconds

================================================

I checked in "system.h" for flash configuration, it seems fine to me:

================================================

/*

* cfi_flash_0 configuration

*

*/

# define CFI_FLASH_0_NAME "/dev/cfi_flash_0"# define CFI_FLASH_0_TYPE "altera_avalon_cfi_flash"# define CFI_FLASH_0_BASE 0x00000000# define CFI_FLASH_0_SPAN 4194304# define CFI_FLASH_0_SETUP_VALUE 40# define CFI_FLASH_0_WAIT_VALUE 160# define CFI_FLASH_0_HOLD_VALUE 40# define CFI_FLASH_0_TIMING_UNITS "ns"# define CFI_FLASH_0_UNIT_MULTIPLIER 1# define CFI_FLASH_0_SIZE 4194304# define CFI_FLASH_0_CONTENTS_INFO "SIMDIR/cfi_flash_0.dat 1130817963"# define ALT_MODULE_CLASS_cfi_flash_0 altera_avalon_cfi_flash

=================================================

can anyone please suggest any solution??

Thanks,

Mona.

3 Replies

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

    I'm not sure what the ext_flash.h is supposed to be, but the rest is all due to a mismatch between what your software is expecting to see for your CFI flash's name. Your hardware defines a CFI flash named "cfi_flash_0". Your software is expecting it to be named "ext_flash".

    You should change the software to match your hardware your design has.

    Cheers,

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

    --- Quote Start ---

    originally posted by slacker@Mar 25 2007, 02:56 PM

    i'm not sure what the ext_flash.h is supposed to be, but the rest is all due to a mismatch between what your software is expecting to see for your cfi flash's name. your hardware defines a cfi flash named "cfi_flash_0". your software is expecting it to be named "ext_flash".

    you should change the software to match your hardware your design has.

    cheers,

    - slacker

    <div align='right'><{post_snapback}> (index.php?act=findpost&pid=22491)

    --- quote end ---

    --- Quote End ---

    Hi slacker,

    Thanks for ur reply.

    I tried changing the name of Flash, but still the problem persists. http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/sad.gif

    "./network_utilities.c - ext_flash.h location" problem was there cuz I included the statement -># include "ext_flash.h" just to check if that solves the problem.

    Now, when i look into the module of the hardware design "system_0", I do not see any signals defined for Flash(cfi_flash_0/ext_flash), are they supposed to be there?? and becuz they are not there I get flash declaration error when I build the project in NIOS II?? (SOPC builder file wud be system_0.ptf in this case)

    Example: for SRAM signals are:

    // the_sram_0

    SRAM_ADDR_from_the_sram_0,

    SRAM_CE_N_from_the_sram_0,

    SRAM_DQ_to_and_from_the_sram_0,

    SRAM_LB_N_from_the_sram_0,

    SRAM_OE_N_from_the_sram_0,

    SRAM_UB_N_from_the_sram_0,

    SRAM_WE_N_from_the_sram_0,

    =============================================

    my hardware part compiles fine in quartus.

    Any suggestions??

    Thanks,

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

    system.h is a direct reflection of what your hardware contains (<project>.ptf).

    The errors, that you&#39;re seeing, are likely due to either a component name mismatch or the lack of a component.

    Cheers,

    - slacker