This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to create and link a static library for an ARM project using arm-none-eabi-gcc? or get the knoledge to do it

I want to create a static library libmylib.a from mylib.c/.h and link it to a project to use this library in bootloader code using the arm-none-eabi-gcc cross compiler in ubuntu 20.04 LTS.

I have an electronic engineering background, so I'm kind of new in this compiler and linker stuff.

What I know: I've been searching for knoledge about it, and findout that '.a' are just a pack for '.o' files, and that's it. You can do it using ar in linux. I don't know how to manage the dependencies for this '.a' file for example or how to link it to the project.

What I want to know: I really want to understand how it works, to compile and generate the bin, elf or hex files using these static libraries for arm using the arm-none-eabi-gcc cross compiler(found some for linux), but don't know how to search for this knoledge properly, how to lean it in a linear way. If you guys could help me on this I would be really gratefull.