How to debug multicore with S32 Design studio

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

How to debug multicore with S32 Design studio

2,561 Views
jingyu
Contributor II

I set up a new blank project of MPC5748G, use Z4_1 and Z4_2 core.

143484_143484.jpg175842486073274717.jpg

and debug143485_143485.png903846511156804167.png

143496_143496.png621820408859017324.png143497_143497.png898760601384819724.png

is there any configuration missed?

Labels (1)
7 Replies

1,439 Views
bhuvaneshwaran
Contributor I

hi

i am working s32 design studio, how to check the variable values without debugging in s 32 design studio. 

0 Kudos

1,439 Views
stanish
NXP Employee
NXP Employee

Hi,

I'm not exactly sure what you mean by check variable without debugging.

Perhaps you can try to use FreeMASTER tool to monitor running MCU over JTAG/UART/CAN

FreeMASTER Run-Time Debugging Tool|NXP 

Stan

0 Kudos

1,439 Views
martin_kovar
NXP Employee
NXP Employee

Hi,

at first, try to add a delay after reset into your main core debug configuration

S32DS_Power_Add_Connection_Delay.png

If it does not help, try to upgrade PE Micro drivers.

Regards,

Martin

1,439 Views
jingyu
Contributor II

Hi, Martin!

It did fix the power cycle problem! Thank you.

And now I meet another problems. In order to test my SEMA4 driver, I need to use the shared RAM, one core write to the variable placed in shared RAM, the other core read it. But how can I call the same variable in these two multicore project? (Z4_1,Z4_2)

I have seen the MPC5775K example, but the variable declaration way do not work in MPC5748G project, it didn't pass the project build.

Besides, I recognised that the S32 Design Studio can not monitor the registers and variables when doing multicore debug, so that's somewhat difficult to test the demo.

Jing Yu

0 Kudos

1,439 Views
martin_kovar
NXP Employee
NXP Employee

Hi,

have you correctly configured linker file? Have you created section where is the variable placed? Do not forget you have to modify linker file for both cores.

Can you write me back, what error does compiler report? I think that the code from my example should work, but is important to have correctly configured linker.

About registers and variables, the easiest way how to check the shared variable is look at the memory dump. There you should see, if both cores correctly access to the variable.

Regards,

Martin

0 Kudos

1,439 Views
jingyu
Contributor II

sorry, which is linker file and how to configure it?

I create the section as follows:

in the first core

int shared_int __attribute__((section (".sharedRAM")));

and the second core extern it

extern int shared_int;

and when I call the variable, the error is "undefined referende to 'shared_int'

I recognised that the 5775 example add two underline before the extern variable, like

extern int __shared_int;

whats for these two underline? the error still alive.

Guess it's the linker file tricks.

0 Kudos

1,439 Views
martin_kovar
NXP Employee
NXP Employee

Hi,

every project has its own linker files. These files define memory map and also determine, where will be stored your code and variables. Linker files are placed in Project_Settings/Linker_Files. Look at my example project and set your linker files in the same way.

Regards,

Martin

0 Kudos