3 Replies Latest reply on Sep 18, 2014 10:05 AM by content.librarian

    Use of the USB-Serial SDK for Android

    content.librarian

      Hi !

         

      I want to develop an Android app that communicates with a device using  a CY7C68053-56BAXI chip.

         

      The chip uses the ReNumeration process (2 steps configuration).

         

      Is the USB-Serial SDK for Android (found here : http://www.cypress.com/?rID=83110) appropriate to develop that kind of application ?

         

      I already have the firmware file to load in the chip, I just don't know how to do it. So, are the necessary functions for loading a firmware on the chip, included in the SDK mentionned above ?

         

      If not, what should I do ?

         

       

         

      Even if I'm not sure that it's the proper SDK, I tried to run the application provided in it, on an Android tablet, to try communicating with the Cypress chip.

         

      The problem is, I can't build the .apk because of an error in the native (C/C++) files of the SDK :

         

      Here is the build log:

         

      " Executing tasks: [:app:assembleDebug]

      Configuration on demand is an incubating feature.
      :app:preBuild
      :app:compileDebugNdk
      /home/matthieu/Projects/AndroidStudioProjects/CyUSBSerial/app/src/main/jni/CyUSBSerial_JNI/cy_libusb/io.c:21:20: fatal error: config.h: No such file or directory
      compilation terminated.
      make: *** [/home/matthieu/Projects/AndroidStudioProjects/CyUSBSerial/app/build/intermediates/ndk/debug/obj/local/armeabi-v7a/objs-debug/app//home/matthieu/Projects/AndroidStudioProjects/CyUSBSerial/app/src/main/jni/CyUSBSerial_JNI/cy_libusb/io.o] Error 1

       FAILED

      FAILURE: Build failed with an exception.

      * What went wrong:
      Execution failed for task ':app:compileDebugNdk'.
      > com.android.ide.common.internal.LoggedErrorException: Failed to run command:
            /home/matthieu/Programs/android-studio/android-ndk-r10b/ndk-build NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/home/matthieu/Projects/AndroidStudioProjects/CyUSBSerial/app/build/intermediates/ndk/debug/Android.mk APP_PLATFORM=android-14 NDK_OUT=/home/matthieu/Projects/AndroidStudioProjects/CyUSBSerial/app/build/intermediates/ndk/debug/obj NDK_LIBS_OUT=/home/matthieu/Projects/AndroidStudioProjects/CyUSBSerial/app/build/intermediates/ndk/debug/lib NDK_DEBUG=1 APP_ABI=all
        Error Code:
            2
        Output:
            /home/matthieu/Projects/AndroidStudioProjects/CyUSBSerial/app/src/main/jni/CyUSBSerial_JNI/cy_libusb/io.c:21:20: fatal error: config.h: No such file or directory
            compilation terminated.
            make: *** [/home/matthieu/Projects/AndroidStudioProjects/CyUSBSerial/app/build/intermediates/ndk/debug/obj/local/armeabi-v7a/objs-debug/app//home/matthieu/Projects/AndroidStudioProjects/CyUSBSerial/app/src/main/jni/CyUSBSerial_JNI/cy_libusb/io.o] Error 1


      * Try:
      Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.


      BUILD FAILED

      Total time: 1.206 secs"

         

      Do you know something about this error ? The config.h file is in the same folder as io.c, why can't the compiler find it ?

         

       

         

      Thank you for your help.

         

      Matthieu Heitz