cancel
Showing results for 
Search instead for 
Did you mean: 

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

baruch
Associate II

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.

0 REPLIES 0