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.

For c6678 want to run some code from DDR3

Hi All,

I am wanting to run most of my code from MSMC SRAM for all the cores but some of the code I would like to place in DDR3 and so have each core run from external memory some initialization code that I am not so concerned about running as fast as possible and want to save the faster MSMC SRAM for fast running code.

When I place the function in DDR3, and I try running on two cores by loading the code and stepping through, I am finding that only for one of the two cores am I actually able to step into the function that is in DDR3. For the other core, it always jumps over the function. Any ideas on how to solve for this?

Thanks, Aamir

  • Aamir,

    The use case you describe is a very common one. There's no reason for it to jump over the code just because it's in DDR.

    Do you have any of the code setup to only run if it's a specific core? 

    Maybe you can provide the code and someone can take a look at it.

    Best Regards,

    Chad

  • Chad,

    I do have core specific code but that is later. The very first function that is called in the main task for each core is actually placed in DDR3 and it is supposed to be called for all cores. I will need to produce a test scenario that excludes my proprietary code of which there is a lot.

    Thanks, Aamir

  • Chad,

    Further update to this. I tried by creating a function that just writes a variable depending on the coreNum and then prints it out and then returns and then exits the bios and that works. When I uncomment out all my code after it does not work. However as I comment out all my code and slowly add it back it stops working when I add some specific code to do with setting up a 10ms timer. I had it working for a single core but the code is not yet done for multicore but I though leaving it in should not have any impact as far as running except the 2nd core will not hae its timer running correctly but it has some interaction between the timer and some code that break from an infinite while loop. I will focus on fixing the timer for multicore. I suspect this problem will then dissapear.

    Thanks, Aamir

     

     Maintask is as follows:

    {  

     coreNum = CSL_chipReadReg(CSL_CHIP_DNUM);

       System_printf ("************************************************\n");
        System_printf ("*** MS Started on Core %d ***\n",coreNum);
        System_printf ("************************************************\n");

        /* Init internal cycle counter */
        TSCL = 1;
       
     MpcMpMpm_testCode();

        System_printf ("**********************************************\n");
        System_printf ("*** MS Ended on Core %d ***\n",coreNum);
        System_printf ("**********************************************\n");

        // Example application done. Return success
        BIOS_exit (0);

    // Additional proprietary code follows here

    }