Yes, why shouldn' it possible that both Nios boot out of the same flash?
The reset address of the first one is flash+0 and the second one gets flash+0x100000.
Here is the text of the flash programmer for the first nios system:
# ! /bin/sh# # This file was automatically generated by the Nios II IDE Flash Programmer.# # It will be overwritten when the flash programmer options change.#
cd D:/temp/EvalBoard_Cyclone/MP3_Player/software/MP3_Player_eth_ide/Debug
# Creating .flash file for the FPGA configuration
$SOPC_KIT_NIOS2/bin/sof2flash --flash=U5 --offset=0x600000 --input=D:/temp/
EvalBoard_Cyclone/MP3_Player/MP3_Player.sof --output=MP3_Player.
flash
Info: *******************************************************************
Info: Running Quartus II Convert_programming_file
Info: Command: quartus_cpf --no_banner --convert D:/temp/Ev
alBoard_Cyclone/MP3_Player/MP3_Player.sof MP3_Player.rbf
Info: Quartus II Convert_programming_file was successful. 0 errors, 0 warnings
Info: Processing ended: Thu Jan 27 09:41:31 2005
Info: Elapsed time: 00:00:01
# Programming flash with the FPGA configuration
$SOPC_KIT_NIOS2/bin/nios2-flash-programmer --input=MP3_Player.flash --sof=$SOPC_
KIT_NIOS2/components/altera_nios_dev_board_cyclone_1c20/system/altera_nios_dev_b
oard_cyclone_1c20.sof --cable='USB-Blaster [USB-0]' --base=0x00800000
27.01.2005 09:41:35 - (INFO) nios2-flash-programmer: Launching Quartus Programme
r to download:
D:/Altera/niosii_v11_build137d/components/altera_nios_dev_board_cyclone_1c2
0/system/altera_nios_dev_board_cyclone_1c20.sof
Pre-Reading 434KBytes of data from U5:
|----.----+----.----|
********************* (4.176 sec).
Erasing 7 Sectors:
|----.----+----.----|
********************* (4.607 sec).
Writing 448KBytes :
|----.----+----.----|
********************* (22.242 sec).
Verifying 448KBytes of data:
|----.----+----.----|
********************* (3.705 sec).
27.01.2005 09:42:18 - (INFO) nios2-flash-programmer: Success. Verified 448Kbytes
written to U5.
27.01.2005 09:42:18 - (INFO) nios2-flash-programmer: Flash programming complete
# Creating .flash file for the project
$SOPC_KIT_NIOS2/bin/elf2flash --flash=U5 --base=0x01000000 --end=0x1800000 --res
et=0x1000000 --input=MP3_Player_eth_ide.elf --output=ext_flash.flash --boot=$SOP
C_KIT_NIOS2/components/altera_nios2/boot_loader_cfi.srec
# Programming flash with the project
$SOPC_KIT_NIOS2/bin/nios2-flash-programmer --input=ext_flash.flash --sof=__NO_SO
F_PLEASE__ --cable='USB-Blaster [USB-0]' --base=0x00800000
27.01.2005 09:42:20 - (INFO) nios2-flash-programmer: SOF-download skipped.
Pre-Reading 163KBytes of data from U5:
|----.----+----.----|
********************* (1.853 sec).
Erasing 3 Sectors:
|----.----+----.----|
********************* (2.093 sec).
Writing 192KBytes :
|----.----+----.----|
********************* (9.643 sec).
Verifying 192KBytes of data:
|----.----+----.----|
********************* (1.603 sec).
27.01.2005 09:42:38 - (INFO) nios2-flash-programmer: Success. Verified 192Kbytes
written to U5.
27.01.2005 09:42:38 - (INFO) nios2-flash-programmer: Flash programming complete
The error message came from Quartus and the source is a file generated by the SOPC-Builder itself, it has nothing to do with my own written code.
If you want I can send you a very small Quartus project (SOPC-builder design with 2 PIOs and 1 user interface) that shows the error message.