I'm trying to use time() and localtime(), and I've included time.h so it compiles, but the linker complains:
~/CodeSourcery/bin/../lib/gcc/arm-none-eabi/4.3.3/../../../../arm-none-eabi/lib/libc.a(lib_a-gettimeofdayr.o): In function `_gettimeofday_r':
gettimeofdayr.c:(.text+0x1c): undefined reference to `_gettimeofday'
collect2: ld returned 1 exit status
Do I have to do something to provide this function so I can use time() on a non-linux system?
You should define a fake _gettimeofday function since RTC hardware is not used.