fork() and pipe() function and PSOC 5LP

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

cross mob
rg
Level 1
Level 1
First like received 5 sign-ins First reply posted

Can the fork() and pipe() function be used with the PSOC 5LP? I seem to get undefined reference when using them although they are declared. I realize PSOC 5LP is not multi-CPU but I have a function that blocks my loop and I don't really care if it takes a while to execute. Just need to fire it off from within my loop.

0 Likes
1 Solution
KyTr_1955226
Level 6
Level 6
250 sign-ins 10 likes given 50 solutions authored

I don't believe fork() and pipe() exist on PSoC5LP as there is no Operating System.

There is some RTOS support for PSoC5LP, but it doesn't looks like any of them are fully POSIX compliant

freeRTOS has some kind of POSIX wrapper

uOS-III has some POSIX support, but not for fork()/pipe() looks like.

View solution in original post

2 Replies
Len_CONSULTRON
Level 9
Level 9
Beta tester 500 solutions authored 1000 replies posted

rg,

You need the reference to the include file "unistd.h" for the fork() or pipe() function to be declared.

eq:   #include <unistd.h>

This solves the "unidentified reference" issue.

However, the PSoC5 does not have a native multi-tasking or multi-processing OS.  I'm not sure where these functions would take you.

There is a port of FreeRTOS for the PSoC5.

Len
"Engineering is an Art. The Art of Compromise."
KyTr_1955226
Level 6
Level 6
250 sign-ins 10 likes given 50 solutions authored

I don't believe fork() and pipe() exist on PSoC5LP as there is no Operating System.

There is some RTOS support for PSoC5LP, but it doesn't looks like any of them are fully POSIX compliant

freeRTOS has some kind of POSIX wrapper

uOS-III has some POSIX support, but not for fork()/pipe() looks like.