newlib syscall stubs

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
RaAl_264636
Level 6
Level 6
50 sign-ins 25 sign-ins 10 solutions authored

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

0 Likes
1 Solution
JobinT_31
Employee
Employee
50 solutions authored 25 solutions authored 10 solutions authored

Hi Ralf,

   

You will be able to find some information in these below links. I don't think any one here have done this already:

   

https://www.gnu.org/software/libc/manual/html_node/Porting.html

   

http://forum.osdev.org/viewtopic.php?t=27073&p=226666

   

 

   

Thanks

   

JOBIN GT

View solution in original post

0 Likes
2 Replies
JobinT_31
Employee
Employee
50 solutions authored 25 solutions authored 10 solutions authored

Hi Ralf,

   

You will be able to find some information in these below links. I don't think any one here have done this already:

   

https://www.gnu.org/software/libc/manual/html_node/Porting.html

   

http://forum.osdev.org/viewtopic.php?t=27073&p=226666

   

 

   

Thanks

   

JOBIN GT

0 Likes
RaAl_264636
Level 6
Level 6
50 sign-ins 25 sign-ins 10 solutions authored

Hi Jobin,

   

 

   

thank you for those links, I'll read through them.

   

 

   

Regards,

   

 

   

Ralf

0 Likes