Thanks Hippo it works perfectly with this config.c :
------------------------------------------------------------------------# define CONFIG_DBM3C40
# if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
static struct mtd_partition nios2_partitions[] = {# if defined(CONFIG_DBM3C40)
{
.name = "jffs2_config",
.size = 0x01000000, /* 16 Mo */
.offset = na_ext_flash_size-0x01000000,
},
{
.name = "sof_and_zimage",
.size = na_ext_flash_size-0x01000000, /* 16 Mo */
.offset = 0,
}# elif ...
...
};
....
static struct physmap_flash_data nios2_flash_data = {# if defined(CONFIG_DBM3C40)
.width = 2, /* 16 bits data bus */# elif ...
...
};
------------------------------------------------------------------------
I can successfully store any data to /dev/mtd0 like IP configuration file or some PDF files...
Now I follow the tutorial "Flash Programmer" but I don't understand well the sof2flash parameter --offset in "sof in CFI, program in CFI" paragraph :
# Creating .flash file for the FPGA configuration
sof2flash
--offset=0xc00000 --input=$SOPC_KIT_NIOS2/examples/verilog/niosII_cycloneII_2c35/standard/standard.sof --output=standard.flash
For me, it only means that the size of (zImage+boot_loader), which is programmed just after this step, must be lower than 0xC00000, otherwise writing zImage or boot loader will erase some part (or full) of the SOF configuration file...
Do I misunderstand the --offset parameter ? I mean it could be a "devboard-dependent" parameter for example...
Thanks for your reply !
Papy