0

I am working on a multicore processor.

I want to make an AMP system, that is -- I have one application successfully running on core0, I want exactly the same application to run core1 too. But both the applications will not interact with each other - just like two different applications are running on different cores.

How can I do it? May plan is : 1. Copy the already complied application to a different location of RAM and give the starting address of the new location to the core1 to start executing from there. Using the linker script.

Have any of you have tried it? If you have tried it, then can you give me an example code on how to write the linker script for it - because I am new to compiling and generating ELF file. I tried googling for many days, I only get the algorithm to do it but no code from where I can learn it.

Thanks,

P:S -- there is no OS implemented as its only one thread that needs to be executed all the time. and all the cores will be executing their own instance of the thread independently. In short -- all the core will be executing the same application but independently with different instances of it.

Sumanth
  • 109
  • 1
  • 11
  • possible duplicate of [PowerPC multicore extension](http://stackoverflow.com/questions/22224757/powerpc-multicore-extension) – Paul R Mar 20 '14 at 10:06

1 Answers1

1

what processor are you talking about? I think that may matter if and how you load and run each core.

If for example you want to copy the program to two places in memory I would assume this is a shared memory between the cores, second I would use an mmu if available specific to the core so that each core gets the same virtual address so that the application can be compiled position dependent. Otherwise you need it to be a position independent program.

old_timer
  • 69,149
  • 8
  • 89
  • 168
  • Dear @dwelch, You are right, I need an example to see how can I compile the application based on position dependency? Can you give an example code for it ? – Sumanth Mar 24 '14 at 16:14