This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/66AK2H12: __BSD_VISIBLE ?

Part Number: 66AK2H12

Tool/software: Code Composer Studio

CCSv9, NDK 3.61, SYSBIOS 6.76, GNU 7.2

Having compile error. Something is defining __BSD_VISIBLE and causing the errors. Example:

Building file: "C:/Vinegar/drv/accel/Accelerometer.cpp"
Invoking: GNU Compiler
"C:/ti/ccs930/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/bin/arm-none-eabi-gcc-7.2.1.exe" -c -mfloat-abi=hard -Dfar= -D__DYNAMIC_REENT__ -DCSES_TIRTOS -DSOC_K2H -DDEVICE_K2H -DevmK2H -D_IPC_ -I"C:/ti/ns_2_60_01_06/source/ti/net/bsd" -I"C:/ti/pdk_k2hk_4_0_16/packages" -I"C:/Vinegar" -I"C:/Vinegar/v_controller" -I"C:/Vinegar/drv"  -O0 -ffunction-sections -fdata-sections -g -Wall -ggdb -Wunused -Wunknown-pragmas -MMD -MP -MF"drv/accel/Accelerometer.d" -MT"drv/accel/Accelerometer.o"   -fno-threadsafe-statics @"configPkg/compiler.opt" -o"drv/accel/Accelerometer.o" "C:/Vinegar/drv/accel/Accelerometer.cpp"
drv/accel/subdir_rules.mk:9: recipe for target 'drv/accel/Accelerometer.o' failed
Could Not Find C:\Vinegar\panel_arm0\EVM_Debug\v_controller\v_controller.o
In file included from c:\ti\bios_6_76_03_01\packages\gnu\targets\arm\libs\install-native\arm-none-eabi\include\sys\types.h:68:0,
                 from c:\ti\bios_6_76_03_01\packages\gnu\targets\arm\libs\install-native\arm-none-eabi\include\stdio.h:61,
                 from C:/Vinegar/drv/accel/Accelerometer.cpp:7:
C:/ti/ns_2_60_01_06/source/ti/net/bsd/sys/select.h:45:10: fatal error: ti/net/bsd/errnoutil.h: No such file or directory
 #include <ti/net/bsd/errnoutil.h>
          ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
gmake[1]: *** [drv/accel/Accelerometer.o] Error 1

How is __BSD_VISIBLE getting? In parts of my project I desire to use BSD. Can I not include common headers such as stdio.h, types.h, time.h etc?

  • Hi,

    >>>>i/ns_2_60_01_06/source/ti/net/bsd/sys/select.h:45:10: fatal error: ti/net/bsd/errnoutil.h: No such file or directory>>>>> this is the error you need to resolve in the include path, not sure how this is related to your question.

    Regards, Eric

  • I know that. Perhaps I should have included the source file. Here is the first lines:

    ///////////////////////////////////////////////////////////////////////////
    /// @file
    /// @brief Accelerometer Driver
    ///////////////////////////////////////////////////////////////////////////
    
    #include <string.h>
    #include <stdio.h>
    #include "Accelerometer.h"
    

    So again, how is __BSD_VISIBLE getting in this include path??

  • Hi,

    From the log you provided: 

    line 7: #include <stdio.h>

    In file included from c:\ti\bios_6_76_03_01\packages\gnu\targets\arm\libs\install-native\arm-none-eabi\include\sys\types.h:68:0,
                     from c:\ti\bios_6_76_03_01\packages\gnu\targets\arm\libs\install-native\arm-none-eabi\include\stdio.h:61,
                     from C:/Vinegar/drv/accel/Accelerometer.cpp:7:
    Can you explain where/how you saw "__BSD_VISIBLE" getting in this include path??
    Regards, Eric

  • Hi Eric,

    I think I am giving up on using the new environment. My project schedule is not going to allow time for all these issues to get resolved.

    In this case you can see the error:

    C:/ti/ns_2_60_01_06/source/ti/net/bsd/sys/select.h:45:10: fatal error: ti/net/bsd/errnoutil.h: No such file or directory
    #include <ti/net/bsd/errnoutil.h>
    

    errnoutil.h is trying to get included from sys/select.h which in turn is coming in from types.h, line 68. That line is surrounded by:
    #if __BSD_VISIBLE
    #endif /* __BSD_VISIBLE */

  • Hi,

    Sorry, let me check with NDK team if they have any quick suggestion.

    Regards, Eric

  • Mike,

    Can you please attach a simple project that shows the problem?

    Todd