__undef_stack and _stack_end from __GNUC__ not supported in RTEMS
Chris Johns
chrisj at rtems.org
Wed Feb 7 03:31:11 UTC 2018
On 02/02/2018 01:28, Fernando Domínguez wrote:
> 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 suggest you avoid using the Xilinx cache code and create a wrapper for the
Xilinx cache routines to the RTEMS cache routines.
Chris
More information about the users
mailing list