cancel
Showing results for 
Search instead for 
Did you mean: 

Including startup into library

bouhoula
Associate II
Posted on May 27, 2013 at 16:45

Hello,

I need to create a library to my BSP so I would be able to use it anywhere.

Creating the .a file isnt that hard with CooCox IDE, but the main problem is 

when I want to use the library in an application, the size of the code is always zero.

Unless I use the startup file provided by CooCox in the application.

My job is to include this startup file inside the library so it would be transparent 

to the user.

Many thanks.

#stm32f4-startup
2 REPLIES 2
Posted on May 27, 2013 at 17:01

So put startup.o into library.a

The linker is going to want to know an entry point into the code, and have a dependency within the library for it to be pulled in.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
bouhoula
Associate II
Posted on May 27, 2013 at 17:04

I did that.

But when I use the library.a with the application and compiling it with CooCox, 

the size of the generated code is zero.