S32K358 multicore single elf project

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S32K358 multicore single elf project

Jump to solution
1,206 Views
liyongfeng
Contributor III

I using S32K358 dual-core setup to generate single ELF file via Make, a download error occurs for Core2 code in TRACE32. This analysis aims to identify whether the root cause lies in the code, linker script (LD file), or TRACE32 script (CMM file).

RTD :SW32K3_S32M27x_RTD_R21-11_6.0.0_QLP04

0 Kudos
Reply
1 Solution
1,165 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @liyongfeng,

I do not see the initialization for the second core inside the project for core0. Can you share it? It should look something like this:

void Start_Core(void)
{
    IP_MC_ME->PRTN0_CORE4_PCONF &= ~(1 << MC_ME_PRTN0_CORE4_PCONF_CCE_SHIFT);
    IP_MC_ME->PRTN0_CORE4_PUPD = 1;
    IP_MC_ME->CTL_KEY = 0x5AF0;
    IP_MC_ME->CTL_KEY = 0xA50F;
    while ((IP_MC_ME->PRTN0_CORE4_STAT & MC_ME_PRTN0_CORE4_STAT_CCS_MASK) == 1)
        ;
    IP_MC_ME->PRTN0_CORE4_ADDR = (uint32)&__CORE2_VTOR;
    IP_MC_ME->PRTN0_CORE4_PCONF |= (1 << MC_ME_PRTN0_CORE4_PCONF_CCE_SHIFT);
    IP_MC_ME->PRTN0_CORE4_PUPD = 1;
    IP_MC_ME->CTL_KEY = 0x5AF0;
    IP_MC_ME->CTL_KEY = 0xA50F;
    while ((IP_MC_ME->PRTN0_CORE4_STAT & MC_ME_PRTN0_CORE4_STAT_CCS_MASK) == 0)
        ;
}

Do you have CM7_1_ENABLE symbol inside project settings? 

CM7_1_ENABLE.png

I've also sent you a private message for an example routine and training presentation for multicore debugging and single elf.

Best regards,
Julián

View solution in original post

0 Kudos
Reply
1 Reply
1,166 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @liyongfeng,

I do not see the initialization for the second core inside the project for core0. Can you share it? It should look something like this:

void Start_Core(void)
{
    IP_MC_ME->PRTN0_CORE4_PCONF &= ~(1 << MC_ME_PRTN0_CORE4_PCONF_CCE_SHIFT);
    IP_MC_ME->PRTN0_CORE4_PUPD = 1;
    IP_MC_ME->CTL_KEY = 0x5AF0;
    IP_MC_ME->CTL_KEY = 0xA50F;
    while ((IP_MC_ME->PRTN0_CORE4_STAT & MC_ME_PRTN0_CORE4_STAT_CCS_MASK) == 1)
        ;
    IP_MC_ME->PRTN0_CORE4_ADDR = (uint32)&__CORE2_VTOR;
    IP_MC_ME->PRTN0_CORE4_PCONF |= (1 << MC_ME_PRTN0_CORE4_PCONF_CCE_SHIFT);
    IP_MC_ME->PRTN0_CORE4_PUPD = 1;
    IP_MC_ME->CTL_KEY = 0x5AF0;
    IP_MC_ME->CTL_KEY = 0xA50F;
    while ((IP_MC_ME->PRTN0_CORE4_STAT & MC_ME_PRTN0_CORE4_STAT_CCS_MASK) == 0)
        ;
}

Do you have CM7_1_ENABLE symbol inside project settings? 

CM7_1_ENABLE.png

I've also sent you a private message for an example routine and training presentation for multicore debugging and single elf.

Best regards,
Julián

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2327885%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ES32K358%20multicore%20single%20elf%20project%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2327885%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20using%20S32K358%20dual-core%20setup%20to%20generate%20single%20ELF%20file%20via%20Make%2C%20a%20download%20error%20occurs%20for%20Core2%20code%20in%20TRACE32.%20This%20analysis%20aims%20to%20identify%20whether%20the%20root%20cause%20lies%20in%20the%20code%2C%20linker%20script%20(LD%20file)%2C%20or%20TRACE32%20script%20(CMM%20file).%3C%2FP%3E%3CP%3ERTD%20%EF%BC%9ASW32K3_S32M27x_RTD_R21-11_6.0.0_QLP04%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2328131%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K358%20multicore%20single%20elf%20project%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2328131%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F184101%22%20target%3D%22_blank%22%3E%40liyongfeng%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3EI%20do%20not%20see%20the%20initialization%20for%20the%20second%20core%20inside%20the%20project%20for%20core0.%20Can%20you%20share%20it%3F%20It%20should%20look%20something%20like%20this%3A%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-c%22%3E%3CCODE%3Evoid%20Start_Core(void)%0A%7B%0A%20%20%20%20IP_MC_ME-%26gt%3BPRTN0_CORE4_PCONF%20%26amp%3B%3D%20~(1%20%26lt%3B%26lt%3B%20MC_ME_PRTN0_CORE4_PCONF_CCE_SHIFT)%3B%0A%20%20%20%20IP_MC_ME-%26gt%3BPRTN0_CORE4_PUPD%20%3D%201%3B%0A%20%20%20%20IP_MC_ME-%26gt%3BCTL_KEY%20%3D%200x5AF0%3B%0A%20%20%20%20IP_MC_ME-%26gt%3BCTL_KEY%20%3D%200xA50F%3B%0A%20%20%20%20while%20((IP_MC_ME-%26gt%3BPRTN0_CORE4_STAT%20%26amp%3B%20MC_ME_PRTN0_CORE4_STAT_CCS_MASK)%20%3D%3D%201)%0A%20%20%20%20%20%20%20%20%3B%0A%20%20%20%20IP_MC_ME-%26gt%3BPRTN0_CORE4_ADDR%20%3D%20(uint32)%26amp%3B__CORE2_VTOR%3B%0A%20%20%20%20IP_MC_ME-%26gt%3BPRTN0_CORE4_PCONF%20%7C%3D%20(1%20%26lt%3B%26lt%3B%20MC_ME_PRTN0_CORE4_PCONF_CCE_SHIFT)%3B%0A%20%20%20%20IP_MC_ME-%26gt%3BPRTN0_CORE4_PUPD%20%3D%201%3B%0A%20%20%20%20IP_MC_ME-%26gt%3BCTL_KEY%20%3D%200x5AF0%3B%0A%20%20%20%20IP_MC_ME-%26gt%3BCTL_KEY%20%3D%200xA50F%3B%0A%20%20%20%20while%20((IP_MC_ME-%26gt%3BPRTN0_CORE4_STAT%20%26amp%3B%20MC_ME_PRTN0_CORE4_STAT_CCS_MASK)%20%3D%3D%200)%0A%20%20%20%20%20%20%20%20%3B%0A%7D%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3EDo%20you%20have%20%3CSTRONG%3ECM7_1_ENABLE%3C%2FSTRONG%3E%20symbol%20inside%20project%20settings%3F%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22CM7_1_ENABLE.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22CM7_1_ENABLE.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F378606i340290C27EE7FAF0%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22CM7_1_ENABLE.png%22%20alt%3D%22CM7_1_ENABLE.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EI've%20also%20sent%20you%20a%20private%20message%20for%20an%20example%20routine%20and%20training%20presentation%20for%20multicore%20debugging%20and%20single%20elf.%3C%2FP%3E%0A%3CP%3EBest%20regards%2C%3CBR%20%2F%3EJuli%C3%A1n%3C%2FP%3E%3C%2FLINGO-BODY%3E