Hi,
I'm trying to test a simple multi-core application where both the primary and first secondary core print something out to the UART. I built the .bin file using MAD utilities (prelinker bypass mode). I'm running the same application on both the cores. Here's my code :
void main ()
{
platform_init_flags init_flags;
platform_init_config init_config;
char version_msg[] = "\r\n\r\nEMAC Boot Over I2C Example Version ";
char boot_msg[] = "\r\n\r\nBooting Hello World image from EMAC via IBL over I2C 0x51 ...";
uint32_t core_num;
int i;
core_num = platform_get_coreid();
if(core_num == 0)
{
printf("%s%s\n\n", version_msg, version);
// Initialize main Platform lib
memset(&init_config, 0, sizeof(platform_init_config));
memset(&init_flags, 1, sizeof(platform_init_flags));
init_flags.pll = 0;
init_flags.ddr = 0;
if (platform_init(&init_flags, &init_config) != Platform_EOK)
{
printf ("Platform init failed!\n");
print_platform_errno();
return;
}
platform_uart_init();
platform_uart_set_baudrate(BOOT_UART_BAUDRATE);
write_uart("\n\nBooting core 0...");
write_uart(version_msg);
write_uart(version);
printf("%s", boot_msg);
write_uart(boot_msg);
for (i = 1; i < 2; i++)
{
write_uart("Waking up core 1...");
//Unlock kicker registers
DEVICE_REG32_W(KICK0, 0x83e70b13);
DEVICE_REG32_W(KICK1, 0x95a4f1e0);
//DEVICE_REG32_W(BOOT_MAGIC_ADDR(i), (uint32_t)&_c_int00);
DEVICE_REG32_W(BOOT_MAGIC_ADDR(i), (uint32_t)write_boot_magic_number);
platform_delay(1);
DEVICE_REG32_W(IPCGR(i), 1);
platform_delay(1000);
}
}
else
{
write_boot_magic_number();
}
while(1);
}
void write_boot_magic_number(void)
{
uint32_t core_num;
core_num = platform_get_coreid();
if(core_num == 1)
{
write_uart("\n\nHello World from secondary core 1...");
}
while(1);
}
The problem I'm running into is only the primary core prints the messages out to the UART when I power up the EVM (using TFTP boot).
Booting core 0...
EMAC Boot Over I2C Example Version 01.00.00.00
Booting Hello World image from EMAC via IBL over I2C 0x51 ...Waking up core 1...
I don't see the message from core 1.
Is there something I'm missing?
Appreciate your help.
Thanks,
Viney