Import Arduino Libraries
Hello
I started trying out the SW4STM32 IDE today and finished with the blink example.
Since i come from arduino and have a lot of loved libraries there, i tried do make them work in SW4STM32 but i failed
Here is what i’ve done:
- Import CubeMX configuration and made the “blink” example which worked
- In Project User, i added new header file (TimeLib.h)
- In Project User, i added new source file (TimeLib.cpp)
- In Main.c i added #include “TimeLib.h”
- in main void, i added “setTime(UL);” which is a function in TimeLib
When building, i gett error “undefinded reference to ‘setTime’.
What am i doing wrong?
The TimeLib is basically a virtual rtc and only has two uses of functions that are not just “software”. Its the millis() function, but this can be coded in STM32 as a replacement as following:
uint32_t millis(){
return HAL_GetTick();
}
Then the library would have basically all the things it needs.
But why does the IDE not find the call of “setTime()” ?
Regards
sgtBear