This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software: TI C/C++ Compiler
Hi TI team,
I faced one strange linker behavior and would like to clarify with you.
In our project we didn't use any linker option regarding initialization model and thought that --rom_model is used by default.
Today I've added this option explicitly and found out that result of linking is different. I changed option to --ram_model and found out that linking result is the same like in case of omitted option.
TI ARM C/C++ 18.12.0 compiler (SPNU151R) manual states that --rom_model is used by default (p.81), but I have a feeling that it is a mistake.
Could you please let me know which initialization model is used by default with the mentioned tool chain?
Let me know please if additional information is required and thanks in advance.
Please change the project build settings back to the state before you made this change ...
Dmitry Tuykov said:I changed option to --ram_model
Perform a build. Then copy-n-paste the full text of the invocation of the linker into your next post.
Thanks and regards,
-George
Hi George,
I do not use CCS project but makefile-project instead.
Linker invocation in case of omitted model option:
Linking out file...
armcl.exe --run_linker --be32 --disable_auto_rts --diag_wrap=off --display_error_number --warn_sections --issue_remarks
../obj/Object.obj -o ../bin/71352100.out \
../v_lnk/71352100.cmd ../v_lnk/71352100_PN.cmd ../v_lnk/71352100_Length.cmd ../v_lnk/71352100_CRC32.cmd -m../bin/71352100.map \
-l../lib/libc.a
Linker invocation in case of --ram_model option:
Linking out file...
armcl.exe --run_linker --ram_model --be32 --disable_auto_rts --diag_wrap=off --display_error_number --warn_sections --issue_remarks ../obj/Object.obj -o ../bin/71352100.out \
../v_lnk/71352100.cmd ../v_lnk/71352100_PN.cmd ../v_lnk/71352100_Length.cmd ../v_lnk/71352100_CRC32.cmd -m../bin/71352100.map \
-l../lib/libc.a
Map-files are the same but different from that one which is got with --rom_model.
P.S> long list of the linked obj-files are changed to ../obj/Object.obj in listings above.
When the compiler shell armcl sees only object files, no C files, and it does not see either --rom_model or --ram_model, it presumes the program contains no C code, and does not observe any of the conventions for linking C code. This is not what you want. You should always explicitly use either --rom_model or --ram_model.
I agree that the documentation is inconsistent regarding these details. So, I filed the entry EXT_EP-9622 to have the documentation corrected. You are welcome to search for this entry at this link.
Thanks and regards,
-George