Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
gotthard
Level 1
Level 1
10 sign-ins 5 questions asked 5 sign-ins

 

Hello,

me and my colleagues are currently working on Aurix TC377 but we ran into a problem regarding the memory. 

After flashing the software, the MCU generates a trap 6 class 1 during execution of the Ifx_Ssw_C_InitInline function and it ends up in debug instruction from core2 which is a bit strange for me since we don't use core2. We noticed that it looks that we are running out of memory. We do have couple of big arrays but nothing too much for the Aurix and after reducing the sizes of these arrays, MCU works. To be more specific there are around 100 of static variables and 3 arrays of 1000 bytes each.

If I keep pressing start program in the debugger I also end up in the wait function of BSP provided by the Hightec:

/* wait for compare match */
while (0 == STM0_ICR.B.CMP0IR) <---- stuck here

I am not sure if these things make sense, everything seems so random. I hope you have any idea what could be the problem or how to find the part of the code which causes the error.

We use safeRTOS, but as I see we don't even reach the init function of the safeRTOS. Compiler used is Hightec and UDE PLS debugger. 

I will provide screenshots in the attachment. Maybe those can be helpful.

Thank you in advance.

 

 

0 Likes
1 Solution
Di_W
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 250 solutions authored

dw_0-1645777389561.png

 

 

#define NUM_BYTE (210016)  //210884 - 210016 = 868 byte
#define NUM (NUM_BYTE/4/2)
#define NUM2 (NUM_BYTE/4/2)

IFX_ALIGN(4) IfxCpu_syncEvent g_cpuSyncEvent = 0;
unsigned int test[NUM],i;
unsigned int test2[NUM2];

void core0_main(void)
{
     for(i=0;i<NUM;i++)//26252
         test[i]=i;
     for(i=0;i<NUM2;i++)//26252
         test2[i]=i;

 

 

Hi gotthard,

I used a global unsigned int type array to occupied 210,016 byte .  For 397 I used, the memory map of 6 cores is like below:

mpe:dsram0 240kByte
mpe:dsram1 240kByte
mpe:dsram2 96kByte
mpe:dsram3 96kByte
mpe:dsram4 96kByte
mpe:dsram5 96kByte

View solution in original post

0 Likes
2 Replies
Di_W
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 250 solutions authored

dw_0-1645777389561.png

 

 

#define NUM_BYTE (210016)  //210884 - 210016 = 868 byte
#define NUM (NUM_BYTE/4/2)
#define NUM2 (NUM_BYTE/4/2)

IFX_ALIGN(4) IfxCpu_syncEvent g_cpuSyncEvent = 0;
unsigned int test[NUM],i;
unsigned int test2[NUM2];

void core0_main(void)
{
     for(i=0;i<NUM;i++)//26252
         test[i]=i;
     for(i=0;i<NUM2;i++)//26252
         test2[i]=i;

 

 

Hi gotthard,

I used a global unsigned int type array to occupied 210,016 byte .  For 397 I used, the memory map of 6 cores is like below:

mpe:dsram0 240kByte
mpe:dsram1 240kByte
mpe:dsram2 96kByte
mpe:dsram3 96kByte
mpe:dsram4 96kByte
mpe:dsram5 96kByte
0 Likes
Di_W
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 250 solutions authored

Hi gothard,

Have you fixed the memory issue? Do you have any solution to it? Thanks for any update.

 

dw

0 Likes