Skip to main content
baruch
Associate II
March 22, 2021
Question

How to build a library using Keil for the project using Cube

  • March 22, 2021
  • 0 replies
  • 434 views

Let's say I want this function to be within my library:

// library function
float mili ( unsigned x) {
 return x/1000.0
}
 
// main function
int main (void) {
 float volatile tt;
 unsigned t;
 
 for (;;) {
 t = HAL_GetTick();
 while (t == HAL_GetTick());
 tt = mili(t);
 }
}

The only necessary condition that this library is built using Keil MDK IDE and preferably if it is possible their armcc compiler, GNU toolchain if it is impossible(why though?).

Let's say I need to call this function from whatever Cortex-M4 core project generated by Cube.

What settings do I need to apply to build such a project?

Thanks.

    This topic has been closed for replies.