Hi,
I want to include unistd.h file in my project. This is arch specific file, present at location
C:\NXP\S32DS_Power_v1.2\Cross_Tools\powerpc-eabivle-4_9\powerpc-eabivle\include\sys
I tried checking in sdks and project properties, but nno luck.
Can some one s32 expert help me in including this file and successfully compiling the project.
here is the screenshot of include files in my project
build error
Building target: SPWM_Shift_Z7_0.elf
Executing target #12 SPWM_Shift_Z7_0.elf
Invoking: Standard S32DS C Linker
powerpc-eabivle-gcc -o "SPWM_Shift_Z7_0.elf" "@SPWM_Shift_Z7_0.args"
./src/main_Z7_0.o: In function `main':
C:\Users\ox172\Documents\Workspace\SPWM_Shift_Z7_0\Debug/../src/main_Z7_0.c:168: undefined reference to `usleep'
collect2.exe: error: ld returned 1 exit status
make: *** [SPWM_Shift_Z7_0.elf] Error 1
16:54:25 Build Finished (took 4s.706ms)
Hi,
the unistd.h header contains only function declaration without implementation (the implementation is target MCU specific). If you need usleep function - you need to write your own implementation for your MCU.
Jiri