Forum Discussion
Altera_Forum
Honored Contributor
20 years agoHi!
--- Quote Start --- originally posted by bkucera@Dec 22 2005, 11:56 PM when i use nios2-download to send an elf file to a multiprocessor system, how does it know which processor to use to execute the code? is it solely based on the addresses in memory that the code is loaded into?<div align='right'><{post_snapback}> (index.php?act=findpost&pid=11753)
--- quote end ---
--- Quote End --- I never used nios2-download directly, (I always debugged from the Nios II IDE)but I guess the parameters --instance and --device of nios2-download should be used for that purpose... --- Quote Start --- originally posted by bkucera@Dec 22 2005, 11:56 PM for instance, altera's multiprocessor tutorial runs identical c code on each processor. the elf files are different though, i assume because of the changes you make in the system library properties. assuming both processors were running identical code though, would i be able to run cpu1's elf file on cpu2 just by using nios2-elf-objcopy to change the addresses?
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=11753)
--- quote end ---
--- Quote End --- At a first though, I would say "probably not"... In general, the code that is contained in the ELF file for each CPU is the code of the application plus the drivers... you need to have the -same- memory map and peripheral map to do that ... also you may end up in problems if some addresses are hardcoded in the binary image (like all the peripheral addresses contained inside system.h ... ...just a curiosity, what is the behavior you would like to implement? Merry Christmas, Paolo