This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320C6678: C6678 multicore TFTP boot

Part Number: TMS320C6678

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

  • Hi Viney,

    I've notified the C66x team. Their feedback will be posted here.

    Best Regards,
    Yordan
  • Have tried setting the magic address as
    DEVICE_REG32_W(BOOT_MAGIC_ADDR(i), (uint32_t)&write_boot_magic_number);

    Check to see if the magic address was set correctly in register memory. Also check if IPC interrupt does occur correctly.

    Refer to the example provided here:
    processors.wiki.ti.com/.../KeystoneI_Bootloader_Resources_and_FAQ

    e2e.ti.com/.../1519565

    Regards,
    Rahul
  • Rahul,

    That works in CCS if I use the .out file and load it on core 0. I'm having trouble getting it to work with the .bin file generated by MAD utilities.

    Here's the code in the .json files I use to build the .bin file :

    {
    "deploymentCfgFile" : "./config-files/deployment_template_C6678_bypass_prelink.json",
    "LoadImageName" : "c6678-le.bin",
    "prelinkExe" : "prelink6x",
    "stripExe" : "strip6x",
    "ofdTool" : "ofd6x",
    "malApp" : "../mad-loader/bin/C6678/le/mal_app.exe",
    "nmlLoader" : "../mad-loader/bin/C6678/le/nml.exe"
    }


    {
    "deviceName" : "C6678",

    "partitions" : [
    {
    "name" : "load-partition",
    "vaddr" : "0x9e000000",
    "size" : "0x2000000",
    "loadPartition" : true
    }
    ],

    "applications" : [
    {
    "name" : "app1",
    "fileName" : "../mad-loader/examples/i2c_boot_tftp_example.out",
    "allowedCores" : [0,1]
    },
    {
    "name" : "app2",
    "fileName" : "../mad-loader/examples/i2c_boot_tftp_example.out",
    "allowedCores" : [0,1]
    }
    ],

    "appDeployment" : [
    "app1",
    "app2",
    "",
    "",
    "",
    "",
    "",
    ""
    ]
    }

    Does the above code look right to you?

    Thanks,
    Viney