Question:
How to create library files for individual modules?
Answer:
We can create library files from object files(.doj) of every source files/codes.
For example, if we have project which contains test.c, test1.c, test2.c, test3.c. Then compiler will generate .doj files for every source file like test.doj, test1.doj, test2.doj, test3.doj inside the root directory “debug/release” folder. From this “.doj” files, we can create corresponding library files.
Specify these commands in CCES project via Project Properties > C/C++ Build > Settings > Build Steps. Here add the commands in “Pre-build steps”. Then build the project to output the library files. Please refer the attached screenshot
For Ex, one or more commands for multiple doj files are separated with (&&) like below.
cc21k.exe -build-lib -o test.dlb ..\Debug\src\test.doj && cc21k.exe -build-lib -o test1.dlb ..\Debug\src\test1.doj
We can use the below pre-build command to create a single library file from multiple .doj files.
Cc21k.exe -build-lib -o my_lib.dlb test1.doj test2.doj test2.doj test3.doj
For more information, please refer below help page.
CrossCore® Embedded Studio 2.x.x > Blackfin® Development Tools Documentation > Linker and Utilities Manual > Archiver > Archiver Guide > Creating a Library