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.

TMS320F28379D: How to identify the example project from c2000ware SDK is selected for CPU1 or CPU2 ?

Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE

Hello, 

          These is one of the below example project path which I had imported from c2000ware SDK to CCS IDE Workspace :C:\ti\c2000\C2000Ware_4_02_00_00\driverlib\f2837xd\examples\cpu1\sci

1) How to know that above imported project file shall flash the executable code in CPU1 and not in CPU2 ?

2) Does device.c and device.h holds any information about the selection of CPU1 or CPU2 ?

3) Does project properties hold any information about the selection of CPU1 or CPU2 ?

Thanks,

Sid C

  • 1) How to know that above imported project file shall flash the executable code in CPU1 and not in CPU2 ?

    That's controlled by your debug configuration. A dual CPU project will make two build artifacts. You allocate each one to separate CPUs. This is the view for CPU1 for example.

    2) Does device.c and device.h holds any information about the selection of CPU1 or CPU2 ?

    Only for peripheral allocation. Do you mean how can the running code know which CPU it is running on? You could write some code to check the CPUID register.

    3) Does project properties hold any information about the selection of CPU1 or CPU2 ?

    No, I don't think so but you can add CPU1 and CPU2 to each project predefined symbols and use those to control compilation.

  • Hello Kier,

                   If we are selecting in predefined symbols CPU1, then why in debug configuration we should select again CPU core ?

    Thanks,

    Sid C

  • The debug configuration is mandatory. The predefined symbols are optional and are used where you use the same source code file for both CPU1 and CPU2 projects. For example you may use a single device.c in both projects but only CPU1 should do some actions in that file.

    In general, think of CPU1 and CPU2 as entirely different microprocessors. It's up to you to make make sure you flash the correct micro with the correct program. The compiler settings cannot generally control this for you, except in the case of debug configuration.

  • Hi Kier, 

    Kier reply :Only for peripheral allocation. Do you mean how can the running code know which CPU it is running on? You could write some code to check the CPUID register.

    Sid C Reply:

    For the CPUID Register. I have written a below code, but cannot read any data, even during debugging I cannot find CpuIdRegs in Register,Window :

    #define CPU_ID_REG_BASE 0x0007026DU
    #define SYSCTL_O_CPUID 0x0U


    uint32  Get_CPU_ID(void)
    {
    EALLOW;
    return(HWREG(CPU_ID_REG_BASE + SYSCTL_O_CPUID));
    EDIS;
    }
    Thanks,
    Sid C
  • Yes I too could not see CpuIdRegs in the debugger, perhaps raise a separate ticket? However, using the Memory Browser, this gave expected results:

    CPU1

    CPU2

  • Hi, 

    Which version of CCS are you using? What is the C2000 Device support package that is being used?

    You can find this information in CCS-> Help -> "About Code Composer Studio" -> "Installation Details"

    Best Regards

    Siddharth

  • Hi, 

        Please find the version in below image:

    C2000 Device Support : 6.1.0.0

    Microcontroller Selected : TMS320F2837xD

  • Hi Siddharth,

              Is update is required from my current C2000 Device Support : 6.1.0.0, if Yes, does it will effect my current workspace project settings and compiler settings ?

    Thanks,

    Sid C

  • Hi, 

    Will check and get back to you on whether it is an issue with the CCS Device Support package. 

    However It won't affect your current workspace project or compiler settings. It will be an xml update for CCS register view.

    Best Regards

    Siddharth 

  • Hi Siddharth,

           Any updates on CCS register view ?

    Thanks,

    Sid C

  • Hi, 

    I am still yet to look into it. Will get back to you in a couple of days.

    Best Regards

    Siddharth

  • Why not confirm it with the Memory Browser?

  • If you are desperate to see it in the Registers view, then try adding the following line to: C:\ti\compiler\ccs\ccs_base\common\targetdb\devices\f28379d.xml around line 137:

    <instance href="../Modules/C2000/f2838x_cpu_id_regs.xml" xml="f2838x_cpu_id_regs.xml" id="CpuIdRegs" xmlpath="../Modules/C2000/" baseaddr="0x7026D" endaddr="0x0007026D" size="0x0001" accessnumbytes="4" permissions="p" />

    You should then see them under CpuIdRegs. This assumes you have CCS 12+.

  • Hi, 

    You can update the xml file as Kier suggested and then you should be able to see the registers in the Register view.

    Best Regards

    Siddharth