2 Replies Latest reply on Apr 22, 2016 9:50 AM by user_246598725

    newlib syscall stubs

    user_246598725

      Hi,

         

       

         

      I want to realize the newlib syscall stubs. I know that they're delivered pre-compiled, but if own implementations are provided, those implementations will be used.

         

      Has anyone experience with implementing those stubs? The newlib documentation https://sourceware.org/newlib/libc.html#Syscalls shows the minimum implementations. However, if I use them as a base without modification, some errors are thrown. For example, the sbrk() function uses 'stack_ptr', but it's not stated where this variable is defined. Do I have to replace this with the stack pointer for the target device, register R13 in case of Cortex-M processors?

         

      So, the question is how to implement the stubs correctly for PSoC.

         

       

         

      Regards,

         

       

         

      Ralf