sysOutByte - VxWorks

This is a discussion on sysOutByte - VxWorks ; Hi Greetings from a VxWorks beginner! My target is Pentium3 PC (VxWorks 6.2 , Workbench 2.4) - and my app code uses time functions (from time.h) which displays VxWorks uninitialized time as Jan ... 1970. To get the calendar time ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: sysOutByte

  1. sysOutByte

    Hi

    Greetings from a VxWorks beginner!

    My target is Pentium3 PC (VxWorks 6.2 , Workbench 2.4) - and my app
    code uses time functions (from time.h) which displays VxWorks
    uninitialized time as Jan ... 1970. To get the calendar time - I would
    have to use the RTC on the target.

    I created an object module based on the sample from: (thanks to earlier
    posts on this group)
    https://portal.windriver.com/cgi-bin...wSum.cgi?id=70
    (I included to resolve some compiler errors)

    While downloading the module to the target - I get "Unresolved external
    symbols" on 2 functions - sysOutByte and sysInByte.

    Is there a particular kernel component to my VxWorks that I need to
    include to overcome this error ?

    Thanks
    ANR


  2. Re: sysOutByte

    "amchanar@gmail.com" wrote:

    >Hi
    >
    >Greetings from a VxWorks beginner!
    >
    >My target is Pentium3 PC (VxWorks 6.2 , Workbench 2.4) - and my app
    >code uses time functions (from time.h) which displays VxWorks
    >uninitialized time as Jan ... 1970. To get the calendar time - I would
    >have to use the RTC on the target.
    >
    >I created an object module based on the sample from: (thanks to earlier
    >posts on this group)
    >https://portal.windriver.com/cgi-bin...wSum.cgi?id=70
    >(I included to resolve some compiler errors)
    >
    >While downloading the module to the target - I get "Unresolved external
    >symbols" on 2 functions - sysOutByte and sysInByte.
    >
    >Is there a particular kernel component to my VxWorks that I need to
    >include to overcome this error ?


    These functions are typically included in a targets BSP's sysLib.c module.
    They, and related functions, may or may not be required for a given target.
    For example, if one's target hardware can be simply accessed using a
    dereferenced pointer then these functions are not required. If, instead,
    such accesses require some kind of hardware manipulation, such as setting
    a latch or something, then these functions would be where this is done.

    I suspect that the example you have used was specific to a particular
    target and that target needed such functions. If your target's BSP was
    written by someone more experienced in VxWorks and its sysLib.c does not
    include the sys I/O functions, then chances are that you can replace that
    example use of those functions with more direct access. For example:

    typedef char RTC_REG_TYPE
    #define RTC_REG_BASE 0x80000000
    #define RTC_DATA_OFFSET 1
    #define RTC_DATA_REG (RTC_REG_TYPE*)(RTC_REG_BASE + RTC_DATA_OFFSET)


    RTC_REG_TYPE rtc_data;

    rtc_data = *RTC_DATA_REG;

    There are, of course, many other ways one might write this.

    >Thanks
    >ANR


    HTH

    --
    ================================================== ======================
    Michael Kesti | "And like, one and one don't make
    | two, one and one make one."
    mrkesti at comcast dot net | - The Who, Bargain

  3. Re: sysOutByte

    Hi ANR,
    Please check that the library which has these two functions has been
    included while building the VxWorks image.
    Which libray the function is available can be found from the tornado
    manuals index in the help menu. If it is not found, then the platform
    doesnot support it.
    You can include the library from the project facility or by defining
    the corresponding flag in config.h header file.

    Build the VxWorks image again, and download it. Now you try to download
    your module and it should work.


    Regards,
    Keshav


+ Reply to Thread