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.

Error in OmapL138.



Hello

Am using omapl138EVm i want to write the values to the gpio pins can you tell me the way to set the i/p & o/p values to the gpio. after setting the value i want to check that value of the gpio on the board.pls tell the way to do bec i dont know how to do with you people help only i can able to do.

 

1.Is it possible to run the gpiotest as the separate visual studio project. Even though i did with all the header file i cant able to compile.

Tell me the steps to rectify this.

Regards

Vinoth.

  • If you are unable to compile a project, you should examine the error messages on the build output. Those will be key in determining why your code is not compiling.

    The GPIO Users Guide and the examples in the LogicPD BSL will also be helpful for learning how to read from and set the GPIO pins.

    Jeff

  • Hello Jeff

     

    Am asking that whether its possible to write a certain value to the gpio and read it back in a new visual studio project.. Else if possible tell me the way to create a new vs project to test  the gpio.

     

    Regards

    Vinoth.,

  • I dont see why that wouldn't be possible.

    If you are unsure how to create a new project, I suggest modifying a working project and adding a new function to perform the GPIO operations you are interested in.

    Jeff

  • Jeff

    i dont have a separate gpio project am just copying the original one and created as a new project.Even though i added the required header files its not including the header files and saying each and every line as the error.You only suggest me a way to create that..

     

    Vinoth

  • It doesnt have to be a GPIO project. Just take any working project you have and add your GPIO functionality to it.

    Jeff

  • Hey Jeff

    Am clear what ur telling . confirm me one thing where i want to add the gpio file in the working project in sub -project or some where else .  Mention the path where should i add the specific file.

    If i added in the main project where the nand test is located for example . if i add the gpiotest file there i cant able to build that separate file . i can able to build the full project only.

     

    Tell me the clear way to make  a new gpio project in the visual studio.

     

     

    Regards

    Vinoth.

     

  • Vinoth,

    We do not use Visual Studio as a development platform.  Therefore, it is difficult for us to provide a standalone working Visual Studio project. 

    However, we do have lots of examples running on CCS though.  If you would like to validate that the GPIOs are operating correctly, please download the BIOS PSP package here, http://software-dl.ti.com/dsps/dsps_public_sw/psp/BIOSPSP/index.html.

    Once you have it installed, go to [installed directory]/pspdrivers_01_30_01\packages\ti\pspiom\cslr\evmOMAPL138\examples\gpio directory.  Under the build folder, load the correct version of the ccs project file, build and run. 

    - Christina

     

  • Hi Vinoth,

     

    If you want to re-use the 'gpiotest.c' file in a stand alone application, you will need to do a few things to get this to work. The easiest way to get this working would be to use one of the existing test applications provided in the BSP. I will use the 'IOCTLTEST' application as an example.

    1. Copy the 'IOCTLTEST' directory and rename to 'GPIOTEST'

    2. Modify the 'SOURCES' directory. Replace 'TARGETNAME=ioctltest' with 'TARGETNAME=gpiotest'. Replace 'SOURCES=ioctltest.cpp' with 'SOURCES=gpiotest.c'

    3. You will need a 'WinMain' function in order to make the program execute standalone. Something like this could be added to 'gpiotest.c'

    int WINAPI WinMain(
        HINSTANCE hInstance,
        HINSTANCE hPrevInstance,
        LPTSTR lpCmdLine,
        int nCmdShow
    )
    {

       SetGPIOState();


        return 0;
    }

    4. You should be able to compile this by right clicking the 'GPIOTEST' directory under 'PLATFORM\FREON\SRC\TEST\APPS\GPIOTEST' and selectting the 'build' option. This should produce a 'gpiotest.exe' file in your release directory. You can run this on the target.

    Please note that this is just an example of how to go about producing a GPIO test application. I have not tested this, but it should be trivial to resolve any compile errors in the process.

    I would recommend that you read a good book on programming under Windows Embedded CE 6 as you are asking quite alot of basic questions which you would easily be able to solve yourself with a bit more understanding of Windows CE. Here is a good book to read:

    "Programming Windows Embedded CE 6.0 Fourth Edition, Douglas Boling, Microsoft Press".

    Regards,

    Richard.

  • Hi  Richard,

     

    Ya am very clear with you example . But in my GPIO TEST folder there are 3 cpp file and 3 .h files if i copy paste the header files into the separate project i cant able to run i even added the main function that you mentioned above But i cant able to run my project

     

    i added the entire folder(GPIOTEST directory) into the another directory which is the new one and i build its not compiling.Can you help me where i did the mistake .

     

    Regards

    Vinoth.

  • Hi  Richard,

     

    Ya am very clear with you example . But in my GPIO TEST folder there are 3 cpp file and 3 .h files if i copy paste the header files into the separate project i cant able to run i even added the main function that you mentioned above But i cant able to run my projectWould you need my gpiotest.cpp file to make the modification.

     

    i added the entire folder(GPIOTEST directory) into the another directory which is the new one and i build its not compiling.Can you help me where i did the mistake .

     

    Regards

    Vinoth.

  • Hi Vinoth,

    Can i ask what Windows programming experience you have? It may help you to go on a 'Windows Programming'  training course. This will help you to understand the error messages you are seeing and how to resolve them.

    All the code you need is there in the BSP and I have given you a step by step guide to turn this code into a standalone test application. I'm afraid I can't do any more than this.

    Regards,

     

    Richard.

  • Hello Richard

     

    Am  clearly understand ur steps but,the file which you mentioned is ioctl is have only one .c file and no .h file . but in the Gpio test directory there are 3 .h and c files. Pls richard don't get frustrated of teaching me. i ordered the books what you ve told. the book i can get next week only .

    Can you guide me as much you can.

    Where i want to add that source fin the different project . how it will run.?

    Regards

    Vinoth.

  • Hello

     

    This is an error am getting when i run that gpio test. c in the visual studio sub projects. can you tell me how to solve this error.

     

    Error    1    BUILD: [01:0000000028:ERRORE] NMAKE :  U1073: don't know how to make 'obj\ARMV4I\retail\globals.obj'   
    Error    2    BUILD: [01:0000000030:ERRORE] NMAKE.EXE TargetCompilePass  -i -c BUILDMSG=Stop.  BUILDROOT=C:\WINCE600\OSDesigns\AISL1v1\AISL1v1\Subproject1\ CLEANBUILD=1 NOLINK=1 NOPASS0=1 failed - rc = 2

     

    Regards

    vinoth.

  • Hello Richard

    I tell the steps which i did as u mentioned earlier.

    1. I created a new subproject wce application and i added the gpiotest.c in the source files and in

    the include files i added the header files.
    2. i added the main functioned that u mentioned in the gpiotest.cpp file.
    when i try to compile its telling some 130 errors.

    In the sources.cmn i copied the include directories and in the link tab  added the additional

    libraries same in the source.cmn which is in the orginal path .

    3.Should i want to change the directory path if i add in the subproject or new project.

    I want to know what mistake i did bec i followed the steps what you  told  earlier. am really got

    struck with these.i think the error is not found the header files or library files in the particular

    path. should i want to mention each and every path where the  eaxh lib and .h files are located.
    Can you solve this issue.

    these are the source.cmn that is in the original pathand also in the subprojects.

    _COMMONPUBROOT=$(_PROJECTROOT)\cesysgen
    __PROJROOT=$(_PROJECTROOT)
    RELEASETYPE=LOCAL
    _ISVINCPATH=$(_WINCEROOT)\public\common\sdk\inc;
    _OEMINCPATH=$(_WINCEROOT)\public\common\oak\inc;$(_WINCEROOT)\public\common\sdk\inc;
    TARGETNAME=123
    FILE_VIEW_ROOT_FOLDER= \

    FILE_VIEW_RESOURCE_FOLDER= \

    FILE_VIEW_INCLUDES_FOLDER= \
        globals.h \
        main.h \
        ft.h \

    SOURCES= \
       main.cpp \
        globals.cpp \
        gpiotest.cpp \

    TARGETLIBS= \
         $(_PROJECTROOT)\cesysgen\sdk\lib\$(_CPUINDPATH)\coredll.lib \
        $(_PB_INSTALL_ROOT)\CEPB\WCETK\TUX\LIB\$(_TGTCPU)\RETAIL\kato.lib \

    TARGETTYPE=LIBRARY
    FILE_VIEW_PARAMETER_FOLDER= \

      

    INCLUDES= \
        $(_PB_INSTALL_ROOT)\CEPB\WCETK\TUX\INC;$(INCLUDES) \


    !if 0
    !endif

  • Hey Guys,

    Thanks for the suggestions and guidance.I have found out a way to create sub-projects and creating executables like gpiotest.exe using Visual Studio 2005. 

     

    Regards

    Vinoth.p