Tool/software:
Hi,
There is a global structure defined in cpu1 project and our use case is to know the memory address of a member of the structure from cpu2, access those members and read the values stored in them.
The structure declaration is given below and the member in question is RawAdcData.w[0] which in turn points to stRawAdcData.RecRPhaseLegBCur:
typedef struct {
float RecRPhaseLegBCur;
float BatLegAVolt;
/**snipped**/
} stRawAdcData;
#define RAW_ADC_SIZE sizeof( stRawAdcData ) / sizeof( float )
typedef union
{
stRawAdcData st;
float w[ RAW_ADC_SIZE ];
} uRawAdcData;
uRawAdcData RawAdcData;
As per the linker file, this variable is stored in Global Shared RAM (.bss).
I had used below information to obtain from the out file: Get data from .out-file - Code Composer Studio forum - Code Composer Studio︎ - TI E2E support forums
But I could not locate this member variable in the map file.
Here's what I did:
Obtained from the output of ofd2000:
command used: "C:/ti/ccs1270/ccs/tools/compiler/ti-cgt-c2000_22.6.1.LTS/bin/ofd2000.exe" --obj_display=none,sections -v cpu1.out
<8> ".bss"
Load Address: 0x0000f800 Run Address: 0x0000f800
Size: 0x1a8e Alignment: 2
Loaded Onto Device: Yes Address Unit Size: 16 bits
File Offset: 0x1034 # Relocs: 0
Section Type: SHT_NOBITS ELF sh_flags: 0x3
ELF sh_flag: SHF_WRITE ELF sh_flag: SHF_ALLOC
TI ext_flags: 0x0 (null) (null)
sect_file_ptr = 0x1034
sect_base = 0x0000f800
Looked into the output of nm2000 and could not get the whereabouts of member variable of RawAdcData. Below is what I got:
command used: "C:/ti/ccs1270/ccs/tools/compiler/ti-cgt-c2000_22.6.1.LTS/bin/nm2000.exe" -l cpu1.out
[5234] |0x00011140|304|GLOB |OBJT |HIDN |8 |RawAdcData
There is nothing about ".w[0]" member of union or RecRPhaseLegBCur
Please let me know if I missed anything and if you need additional information.
Thanks,
Rohit