Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
12367 Discussions

boot multiprocessor from one EPCS device

Altera_Forum
Honored Contributor I
830 Views

Hey, everybody, 

I'm using a system with 2 Nios II and I'd like to put the whole system (including the software of the 2 Nios) in flash memory (EPCS). But I do not know how to put the 2 *.elf file into one EPCS chip. 

Anybody can share your solution with me? 

 

Best regards 

 

LFC
0 Kudos
5 Replies
Altera_Forum
Honored Contributor I
74 Views

You don't need to do that. Make a single elf file and use the system Id field in the Nios dialogin QSYS to have the two processor do different things based on their Id.

Altera_Forum
Honored Contributor I
74 Views

interesting utilization , how to use the system ID field?

Altera_Forum
Honored Contributor I
74 Views

In the QSYS advanced features tab for the NIOS processor make sure "Assign cpuid control register value manually" is checked (it should be checked by default). Use different values for your two processors (1 and 2 say). Give both processors the same reset and exception vectors. 

 

In your code, read the value of the cpuid register. A different value will be returned depending on which processor is running. In other words, each processor has a cpuid register that you set in qsys. When your code reads that register, each processor will return the value you set for that processor in qsys.
Altera_Forum
Honored Contributor I
74 Views

Thank you for your reply. But how can I make a single elf file from the 2 *.elf file?

Altera_Forum
Honored Contributor I
74 Views

As I said before, don't make 2 elf files. Make one elf file only. In your code have something like: 

main() { if (value of sysid register == 1) // Look up how to get this in the Nios documentation processor1_main() else processor2_main() }
Reply