SPC5748G Unable to start After added shared memory

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

SPC5748G Unable to start After added shared memory

530 Views
longfeiwang
Contributor III

I have defined some shared RAM as shown below (The memory area is outside the memory area of the three cores)

1

pastedImage_1.png

pastedImage_2.png

2 then defines a variable“a_b” in the main function

pastedImage_3.png

The main function is as follows

pastedImage_4.png

 After added these variables in shared memory,The demo board must be pressed after the power is turned on to start,Simple power-on cannot make the demo board work。

Labels (1)
0 Kudos
Reply
1 Reply

474 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

is that RAM block initialized in startup files? By default, each core has allocated 256KB of RAM memory in multicore project. And each core initializes own RAM block in own startup file. 

You can see in linker file for Z4_0 core:

SRAM_SIZE =  256K;    
/* Define SRAM Base Address */
SRAM_BASE_ADDR = 0x40000000;

For Z4_1 core:

SRAM_SIZE =  256K;    
/* Define SRAM Base Address */
SRAM_BASE_ADDR = 0x40040000;

And for Z2_2 core:

SRAM_SIZE =  256K;    
/* Define SRAM Base Address */
SRAM_BASE_ADDR = 0x40080000;

Because each core initializes own block by itseld, each core must be started to have all RAM initialized.

You wrote that the shared memory is outside of RAM of all three cores, so the question is if it is initialized ever.

You can modify this piece of code in startup.s for Z4_0 core and add the same initialization for shared block:

 pastedImage_4.png

Regards,

Lukas

0 Kudos
Reply