__undef_stack and _stack_end from __GNUC__ not supported in RTEMS

Fernando Domínguez fdpousa at gmail.com
Thu Feb 1 14:28:34 UTC 2018


Hi,

I'm trying to move a SD card driver for Xilinx Zynq (Zedboard) to RTEMS.
During linking phase, the following errors arise:

/home/fdpo/xilinx_hal/xilinx_aux/src/xil_cache.c:790: undefined reference
to `__undef_stack'
/home/fdpo/xilinx_hal/xilinx_aux/src/xil_cache.c:790: undefined reference
to `_stack_end'
/home/fdpo/xilinx_hal/xilinx_aux/src/xil_cache.c:790: undefined reference
to `_stack_end'
/home/fdpo/xilinx_hal/xilinx_aux/src/xil_cache.c:790: undefined reference
to `__undef_stack'

On file xil_cache.c, this declaration is inside a __GNUC__ guard:

#ifdef __GNUC__
    extern s32  _stack_end;
    extern s32  __undef_stack;
#endif

And then used in some functions only in this way:

#ifdef __GNUC__
    stack_end = (u32)&_stack_end;
    stack_start = (u32)&__undef_stack;
    stack_size=stack_start-stack_end;

    /*Flush stack memory to save return address*/
    Xil_DCacheFlushRange(stack_end, stack_size);
#endif

How can I assign a stack_end, a stack_start and stack_size from RTEMS? I
suppse stack_size is the same one as configured a initialization but others

I attach you the xil_cache.h/c files.

Thanks in advance,

Fernand
​o​
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20180201/44b61f8e/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xil_cache.c
Type: text/x-csrc
Size: 45909 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/users/attachments/20180201/44b61f8e/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xil_cache.h
Type: text/x-chdr
Size: 4013 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/users/attachments/20180201/44b61f8e/attachment-0003.bin>


More information about the users mailing list