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:
Hello team,
I'm working with the TMS320F28375S microcontroller and I'm trying to obtain the following information in my main.c file.
The starting address of my code.
The total size of the code.
I've searched many threads online, but I haven't found a clear answer on how to fetch this information programmatically within the C code itself. Is there any built-in way to do this, or any specific linker symbols that I can access to retrieve this information?
I would appreciate any pointers or examples on how to approach this.
Thanks in advance!
Best regards,
Hi,
You will get the code start and total size of your code from the generated .map file.
For documentation on the linker map file, please search the C28x assembly tools manual for the sub-chapters titled Create a Map File and Manage Map File Contents.
Thanks
Aswin
Hello Aswin,
Thank you for your response.
I have reviewed the file you mentioned earlier and gained an understanding of the .map file. However, I am unsure of how to retrieve that data in my main.c
file or any other .c
file. Specifically, I would like to know how to access the starting address of my code from the linker or the .map file. Is there a specific symbol or method available to obtain this information in a variable within a C file?
Additionally, I am interested in obtaining the code size in a variable within my C file.
Do you have any example code in which this functionality is implemented? It would be extremely helpful for better understanding.
Any guidance on how to achieve this would be greatly appreciated.
Thank you for your time and assistance.
Best regards,
Muzammil Qureshi
I would like to know how to access the starting address of my code from the linker or the .map file
Please search the C28x assembly tools manual for the sub-chapter titled Address and Dimension Operators.
Is there a specific symbol or method available to obtain this information in a variable within a C file?
Please search the same manual for the sub-chapter titled Linker Symbols.
Thanks and regards,
-George