Forum Discussion

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

About "alt_flash_open_dev" and CFI table

hi, when i use function "alt_flash_open_dev" to open a CFI, i can't get the correct base address which i set in SOPC. and i'm sure i have already include the relative head files.I don't know why.And it tips no CFI table found at base address when i use flash programmer in NiosII. And i used command "nios2-flash-programmer --base=0x0 --debug",it rise following messages: please see attachments. thanks for any suggestions you will offer.

10 Replies

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

    hi,oucchina.i include following head files in my program. what's yours?

    # include "system.h"# include "sys/altera_avalon_pio_regs.h"# include "alt_types.h"# include "sys/alt_flash.h"# include "sys/alt_flash_dev.h"# include "stdio.h"# include "string.h"# include "altera_avalon_cfi_flash.h"
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    hi,

    i include all of your, only have not the "#include "altera_avalon_cfi_flash.h"", is this head file is necessary? if have not this head file, is the system all right?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    can you open the cfi_flash device in the program, when process cure?

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

    no, i'm now very boring with it. i set my reset vector in flash and other files and vectors in sdram, but the flash handle can't return the right value which i set in SOPC.

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

    hi,

    otis, i have the same question as you, when debug it, it can return the right value --not NULL, but when i download the flash file into flash, and run the system, the nios program can not open the flash, and returns the wrong value---NULL.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    hi,

    I have the same problem. If you solved the problem, I want to know the way of solution.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    hi,

    I have the same problem. If you solved the problem, I want to know the way of solution.

    --- Quote End ---

    in version7.0, it was automatically solved for you. And I got stuck in other versions.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    in version7.0, it was automatically solved for you. And I got stuck in other versions.

    --- Quote End ---

    Hi otis,

    thanks for reply.

    I am using 8.0 now. I think that I will use i2c eeprom instead.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi,

    I have seem problem. I use 7.2 version (Cyclone III development board). Please, any idea.

    Thank you

    Rosa