Skip to main content
bouhoula
Associate II
May 27, 2013
Question

Including startup into library

  • May 27, 2013
  • 2 replies
  • 634 views
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
This topic has been closed for replies.

2 replies

Tesla DeLorean
Guru
May 27, 2013
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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
bouhoula
bouhoulaAuthor
Associate II
May 27, 2013
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.