Other Parts Discussed in Thread: MSPM0G3507, TEST2
Hi,
I'm currently developing in the following environment, but I have some questions.
Code Composer Studio : 12.5.0.00007
Compiler : ti-cgt-armllvm_3.2.0.LTS
MCU used : MSMPM0G3507, CC234R05
If you build the code ①(NG Case) below in this environment, it will be embedded in the map file like this.
.rodata 0 000001a8 00000018
000001a8 00000009 empty.o (.rodata.str1.117413490714450581041)
000001b1 00000009 empty.o (.rodata.str1.57731210584388587101)
Moreover, if you create the exact same project in different folders, import and build each in a different workspace,
differences will appear, and differences will also appear in the .txt/.hex files.
Is there any solution for this?

By the way, if you use ti-cgt-armllvm_2.1.3.LTS, the difference will not appear.
Or, if you change it like ②(OK Case) in the code below, the difference will disappear,
I am looking for another method because the amount of changes and the visibility of the code are affected.
The project settings (.project) and source code have been slightly modified, so please check the attached zip file.
The source of the change is the sample project (empty_LP_MSPM0G3507_nortos_ticlang) of MSMPM0G3507 (mspm0_sdk_1_20_00_05).
The map file generated by importing and building the project in empty_test1 in workspace1,
If you import the project in empty_test2 in workspace2, build it, and compare the generated map files, you will see a difference.
①NG Case
#define STR "ABCDEFGH"
int main(void)
{
char str1[7];
char str2[7];
SYSCFG_DL_init();
strcpy(str1, STR);
strcpy(str2, "IJKLMNOP");
while (1) {
}
}
②OK Case
static const char STR[] = "ABCDEFGH";
int main(void)
{
char str1[7];
char str2[7];
static const char str3[] = "IJKLMNOP";
SYSCFG_DL_init();
strcpy(str1, STR);
strcpy(str2, str3);
while (1) {
}
}
Best Regards,
