Topic : gmtime and localtime broken in arm-gcc lib?

Forum : ARM

Original Post
Post Information Post
May 6, 2008 - 2:37pm
Guest

I think gmtime and localtime is broken in arm-gcc lib for STM32F10x.

I have try it in keil uVision and working fine there(localtime anyway, gmtime not implemented in keil).
gmtime and localtime is searching for _sbrk when linking.

"sbrkr.c: (.text+0xc): undefined reference to `_sbrk'"

I using
Ride 7.02.00001 and
RKitArm for Ride7 1.04.0001

Replies
Post Information Post
+1
0
-1
May 9, 2008 - 12:48pm
Guest

Hi

There is a similar topic in this forum.
Have you read it?
http://www.raisonance.com/Forum/punbb/viewtopic.php?id=2462

Matloub

+1
0
-1
May 22, 2008 - 10:19pm
Guest

Okej i manage tto find how to declare heap

#if __GNUC__
#else
__value_in_regs 
#endif
struct R0_R3 {unsigned heap_base, stack_base, heap_limit, stack_limit;} 
    __user_initial_stackheap(unsigned int R0, unsigned int SP, unsigned int R2, unsigned int SL)
{
    struct R0_R3 config;

    config.heap_base =  ???;
    config.stack_base = ???;

/*
To place heap_base directly above the ZI area, use:
    extern unsigned int Image$$ZI$$Limit;
    config.heap_base = (unsigned int)&Image$$ZI$$Limit;
(or &Image$$region_name$$ZI$$Limit for scatterloaded images)

To specify the limits for the heap & stack, use e.g:
    config.heap_limit = SL;
    config.stack_limit = SL;
*/

    return config;
}

Next question what i need to replace ??? with for get portable code for different RAM amount on STM32.
in advanced ARM options i projekt properties its exist data start, data size and so on, do this exist as defines or something?