Not able to load elfs in External Memory using Trace32 for MPC5777C

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Not able to load elfs in External Memory using Trace32 for MPC5777C

3,250 次查看
parth_rastogi10
Contributor III

Hi NXP,

I am working on evaluating Multicore Experiments and I am using the MPC5777C Evaluation Board (P/N-MPC5777C-516DS). So, for some of my experiments, I need to program the elfs in External SRAM (External Memory), but I cannot load from the .cmm script and get an error while running the script. Please refer to below snaps of commands in the .cmm script and error message.

parth_rastogi10_0-1622638621134.png

In this the External SRAM Memory is given.

 

parth_rastogi10_1-1622638621167.png

This error message I am getting as the external memory address is given.

Can you please let me know what command has to be use to load in external SRAM or any other way that can be used.

 

Attached below the versions details of the Trace32 Software.

parth_rastogi10_2-1622638621257.png

Thanks in advance.

 

@powerpc  @lukaszadrapa @multicore @Steve 

 

Parth Rastogi
标记 (3)
0 项奖励
回复
9 回复数

3,240 次查看
davidtosenovjan
NXP TechSupport
NXP TechSupport

Hi, It is not flash memory so you cannot apply flash programming for that. What you need to do, is to initialize EBI and MMU (what can be done by TRACE32 script as well) and the just load application to RAM by

Data.LOAD.ELF "../bin/RAM.elf"

3,235 次查看
parth_rastogi10
Contributor III

Hi David,

Thanks for the Reply.

As part of my experiments on multicore evaluation, I need to get the analysis/behavior by putting the code, data, and stack section on the External SRAM only, and accordingly, I updated the linker file in the same way, that's why I need to load the elfs in the External SRAM.

So, did I need to do anything before loading the elfs to External SRAM, or If I have to initialize the EBI to do the same then what I need to do?? Please provide your inputs.

Secondly, I already tried to load the elf using Data.LOAD.ELF "../bin/RAM.elf"  this command also and its also not working for me as the memory location that I gave in the linker file is not updating and I am seeing (????????).

Request you to please provide your inputs.

@davidtosenovjan 

Regards,

Parth Rastogi
0 项奖励
回复

3,212 次查看
davidtosenovjan
NXP TechSupport
NXP TechSupport

I have found demo in the TRACE32 installation directory. Although for different MCU, you may see how to prepare the script.

c:\T32\demo\powerpc\hardware\mpc55xx\mpc55xxdemo\ebi_init.cmm

My example code written in C you may find here:
https://community.nxp.com/t5/MPC5xxx-Knowledge-Base/Example-MPC5777C-External-SRAM-test-GHS714/ta-p/...

Now it is needed to translate C-code to TRACE32 script.

Unless Lauterbach does not have prepared solution @rweiss

3,167 次查看
rweiss
Contributor V

The closest I have is an EBI init script for MPC5674F/MPC5676R. It should be pretty similar to what is required for MPC5777C.

3,215 次查看
davidtosenovjan
NXP TechSupport
NXP TechSupport

But i have already answered. Yes, you must initialize EBI before loading of elf file pointing to the EBI.

3,159 次查看
parth_rastogi10
Contributor III

Thanks, David and  rweiss

I will try with the solution provides and let you know for any issues.

@davidtosenovjan @rweiss 

Regards,

 

Parth Rastogi
0 项奖励
回复

3,084 次查看
parth_rastogi10
Contributor III

Hi David and  rweiss,

I have updated the cmm script according to the c code that you have shared for initializing the EBI (attached below) but, few issues I am facing are mentioned below:

  1. After running the cmm script I am getting a warning of "data alignment error". Refer attached screenshot.
  2. Through script, I am initializing the PCR 278 to PCR 293 with 0x0440 (as mentioned in the C code) but it is initializing to 0x400. Refer attached screenshot.
  3. After running the updated "ebi_init.cmm" I am running our cmm scripts to load the elfs of CORE0 and CORE1 (Scripts attached below) then I am seeing the unusual behavior in the memory. 
    1. Seeing all zeros (0x00000000) from the starting address of the external memory i.e., 0x20000000, even from the linker file the code, data, and stack are using the external SRAM i.e., from 0x20000010 (code section)...and so on. Refer attached linker files for CORE0 and CORE1 for your reference.
    2. From code, I am trying to write some random data to external SRAM location i.e., 0x2000E000 but I am seeing some abrupt values toggling only when the execution is in paused state. Refer attached screenshot.
    3. When trying to write any values manually from Trace32 then on writing any value at one location, automatically it writes the same value to the next 4 locations. Refer attached screenshot.
  4. After loading both elfs of CORE0 and CORE1, so when I pause the execution I am getting one warning of "NEXUS-AF preprocessor: message conversion overflow occurred". Refer attached screenshot.

Request you to please provide your inputs on the above-mentioned issues.

If possible can we connect over a call for better clarification on the issues.?

Note: Linker and cmm files are attached below in a zip file.

  • After running the ebi_init.cmm:

parth_rastogi10_0-1624604917984.png

  • Value of PCR 278 to PCR 293:

parth_rastogi10_1-1624605046197.png    parth_rastogi10_3-1624605149364.png

  • After loading both the elfs:

parth_rastogi10_0-1624604296232.png

  • Pausing the execution after loading both elfs:

parth_rastogi10_4-1624605334117.png

  • When tried to write manually any value to external memory: (wrote only at 0x20000000, 0x20000010, and 0x20000020 at rest location it wrote automatically the same values)

parth_rastogi10_5-1624605427598.png

  • From code writing random values to 0x2000E000, but seeing below values at a different location and some bits are toggling:

parth_rastogi10_6-1624605700424.png

 

Hoping for your quick response. @davidtosenovjan @rweiss 

Regards,

 

Parth Rastogi
0 项奖励
回复

3,036 次查看
rweiss
Contributor V

I recently got access to the MPC5777C-516DS evaluation board and could prepare an example for an application running in the external SRAM. Here are the files:

0 项奖励
回复

3,051 次查看
parth_rastogi10
Contributor III

Hi @davidtosenovjan and @rweiss,

Can you please provide me your response on the above issues or can we connect over a call for a better demonstration of the issues.

Regards,

 

Parth Rastogi
0 项奖励
回复