I have written a bare metal multi core example.
Code, circuit diagram is here - https://github.com/jeffreyantony/multipi/tree/master/Example_01
In my example, there are 3 LED's connected to the GPIO pins of the raspberry Pi. There are totally 4 cores in Raspberry Pi 2. Each core is assigned to blink its corresponding LED.
I wrote the address of the code to be executed by each core in the below addresses 0x4000009C for core 1 0x400000AC for core 2 0x400000BC for core 3
After compiling the code, only the LED assigned to core 1 is blinking(as per this example, yellow LED). Others are not.
This means the code for Core 2 and 3 are not running(since the other LEDs are not blinking). Also I found that the code after starting all the cores is also not running i.e core0_submain() - this function should blink the ACT LED on the Raspberry Pi
Could anyone let me know what is the problem ? Is it because all the 4 cores tries to write to the same GPIO register and only Core 1 is winning in the write ?
I tried adding "attribute((naked));" for core0_submain() but there was no use.
I am using the toolchain from https://launchpad.net/gcc-arm-embedded
once again code - https://github.com/jeffreyantony/multipi/blob/master/Example_01/main.c
Update 20 Oct 2015: I have added support for JTAG. But not successful to get debug interface
Update 25 Oct 2015: Issue is fixed. See answer.