Question:
How to create library file for individual modules in ARM core?
Answer:
This can be created using object files(.o) 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 .o files for every source file like test.o, test1.o, test2.o, test3.o inside the root directory “debug/release” folder. From this “.o” 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.
For Ex, one or more commands for multiple doj files are separated with (&&) like below.
arm-none-eabi-ar -r -o libtest1.a ..\Debug\src\test1.o && arm-none-eabi-ar -r -o libtest2.a ..\Debug\src\test2.o
The below command can be used to pre-build command to create a single library file from multiple .doj files.
arm-none-eabi-ar -r -o libtest1.a test1.o test2.o test2.o test3.o