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.
In my old project (bitfield type) with old DSP device ( trying to migrate to new DSP device),
Trying to understand the concepts for below query......
----------------------------------------------------------------------------------------------
In my old project there are many .c files which contains
.asm, ,c, .h, .pp
This I can understand we must create .c & .h files and other .asm & .pp will get developed after build.
----------------------------------------------------------------------------------------------
Now, in my old project, there are TWO files (smaboot & smadsp) having many other files with same name. However, these TWO files conatins "void main()" and "void main_loop ()" but with different functions.
________________________________________________________
smaboot contains below files in the project directory:
smaboot.asm, smaboot.c, smaboot.cmd, smaboot.paf, smaboot.pjt, smaboot.pp
_________________________________________________________
smabdsp contains below files in the project directory:
smadsp.asm, smadsp.c, smadsp.cmd, smadsp.h, smadsp.i01, smadsp.i10, smadsp.mak, smadsp.paf, smadsp.pjt, smadsp.pp, smadsp.wks
_________________________________________________________
Inparticular, why smaboot does not contain .h file? What is the specific reason being boot file?
What are differences? How is this required? Can I get a specific Application Note please?
Thanks & Regards,
Venkatesh
PS: This question is related to Boot Loader with SCI using serial communication in smaboot.c file. Being a new comer to DSP, please guide me how to build DSP program having all facilities.
Hello Venkatesh,
Inparticular, why smaboot does not contain .h file? What is the specific reason being boot file?
What are differences? How is this required?
I have not heard of these before, is this an example that is provided by TI/C2000Ware?
Also, your title question seems to be missing the fact that there are not 2 main functions, there is only 1 main, the other is main_loop. In the C language these are distinctly different, as "main" is key for the compiler to know where to start the program, and main_loop is just another function.
Best regards,
Omer Amir
Hello Omer,
This is our Old project with Old DSP device. This is not provided by TI.
Yes, each smadsp.c and smaboot.c contains main and main_loop functions in the same project directory.
How the boot loader i.e. smaboot.c is used in same directory using "main" and "main_loop" functions? In same directory of CCS project, how can two .c files is permitted to use similar function names i.e. "main" and "main_loop" containing in two different .c files? Tried using in my sample LED Blinking project which shows as errors as expected. But, how my old project was built as per my query?
I could not find any example provided by TI for learning aspect.
How CCS builds the smadsp.c and smaboot.c containing main function in same directory? How CCS will recognise bootloader in the same directory?
My old project containing smaboot.c comprises SCI communication code via USB/Serial Port using debug connections via JTAG. How CCS recognises these aspects in the same directory?
Do I need to compile/build excluding smaboot? What are the techniques in CCS to distinguish between main and boot loader?
Plz guide me being a new comer.
PFA attached screenshot of my old project directory in CCS for easy reference.
Regards,
Venkatesh
Hello Venkatesh,
This is our Old project with Old DSP device. This is not provided by TI.
For questions about why the project is structured a certain way, you will need to talk with whoever wrote the project itself (the purpose of this forum is to offer support for customers using TI products/software, questions about proprietary code is not our expertise).
How the boot loader i.e. smaboot.c is used in same directory using "main" and "main_loop" functions? In same directory of CCS project, how can two .c files is permitted to use similar function names i.e. "main" and "main_loop" containing in two different .c files? Tried using in my sample LED Blinking project which shows as errors as expected. But, how my old project was built as per my query?
I'm not sure what you did to perform your test, but having a function named "main" and "main_loop" does not violate any sort of compiler. This is basic C language, not something TI-specific. C compilers use "void main()" as the entrance to a program, and "main" is usually reserved as a keyword for that reason. "main_loop" is not a reserved keyword, so it works fine being used in the same .c file/directory as "main". I verified this in a project that I have on CCS, there were no errors that showed up.
How CCS builds the smadsp.c and smaboot.c containing main function in same directory? How CCS will recognise bootloader in the same directory?
If a source file (C or assembly) is included in the working project directory and is in some way called from main, directly or indirectly as the case may be, it gets compiled into the final .out file.
How CCS builds the smadsp.c and smaboot.c containing main function in same directory? How CCS will recognise bootloader in the same directory?
My old project containing smaboot.c comprises SCI communication code via USB/Serial Port using debug connections via JTAG. How CCS recognises these aspects in the same directory?
Do I need to compile/build excluding smaboot? What are the techniques in CCS to distinguish between main and boot loader?
Plz guide me being a new comer.
It sounds like you have a lot of general C language questions. The purpose of this forum is more directed to help customers trying to debug/ask questions specifically about TI devices or compilers. If you want to learn more about C, I recommend looking up online resources and trying to create your own experiments using CCS to help. While CCS is a TI product, the way it generally compiles multiple source files or excludes certain files is not a unique feature. If you have questions specific to CCS as far as optimizations, debug connections, etc. let me know.
Best regards,
Omer Amir
Hello Omer,
Thanks.
Hope below is specifically related to CCS, if not I am sorry.
Under what circumstances, CCS generates below . (DOT) files?
.asm, .cmd, .paf, .pjt, .pp, i01, .i10, .mak, .wks
How do I learn about these files related to CCS?
Regards,
Venkatesh
Hello Venkatesh,
.asm files are either generated by the user or pulled from one of the libraries in C2000Ware; .cmd files are linker command files, and these are usually pulled in from the CCS files where they are installed, as these are used to allocate RAM/Flash sections on a device (typically customers don't write their own versions of these, they modify the templates that are included automatically in example projects). The other file types I'm not familiar with, so I will defer to the compiler experts to see if they know.
Best regards,
Omer Amir
.asm, .cmd, .paf, .pjt, .pp, i01, .i10, .mak, .wks
*.pjt, *.mak, *.wks are file extensions specific to very old versions of CCS (CCSv3 and older). They would not be relevant to current CCS versions.
The rest are related to the the compiler or hex tools. I will have the compiler experts comment on those.
Thanks
ki.
.asm, .cmd, .paf, .pjt, .pp, i01, .i10, .mak, .wks
.asm : Assembly language source file. Could be auto-generated by the compiler, or hand-coded.
.cmd : Linker command file
.pp : Preprocessed file auto-generated whenever the compiler preprocessor options like --preproc_dependency are used. CCS uses this particular preprocessor option as part of creating the dependencies for the auto-generated makefiles.
.i01, .i10 : Output files generated by the hex utility hex2000
Thanks and regards,
-George
Many Thanks Omer, Ki & George for your kind sharing of expertise.
Regards,
Venkatesh