Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Qtserialport on Win CE 6 with Qt 4.8.4
Forum Updated to NodeBB v4.3 + New Features

Qtserialport on Win CE 6 with Qt 4.8.4

Scheduled Pinned Locked Moved Mobile and Embedded
11 Posts 2 Posters 5.8k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    vicacid
    wrote on last edited by
    #1

    Hi!

    I am trying to add qtserialport to Qt 4.8.4 for the use on a Windows CE 6 device, a Toradex Colibri T20. Host machine is a Win7 PC with VS2008. The Qt library was built statically with

    configure -static -platform win32-msvc2005 -xplatform wince60standard-armv4i-msvc2008

    and works well.

    To build qtserialport I followed the instructions given here:

    http://qt-project.org/wiki/QtSerialPort

    but can't build successfully. Additionaly to the instructions given I executed:

    set INCLUDE=C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ce\include;C:\Program Files (x86)\Windows CE Tools\wce600\Colibri600\Include\Armv4i

    set LIB=C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ce\lib\armv4i;C:\Program Files (x86)\Windows CE Tools\wce600\Colibri600\Lib\ARMV4I

    set PATH=C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ce\bin\x86_arm;%PATH%

    It produces an fatal error from LINK1112 module machine type 'X86' conflicts with target machine type'THUMB'. I know what the error means, but don't know how to resolve it. Where can I configure the cross-platform build?
    Maybe there is an additional problem, because Qt was built statically?

    Thanks for your help,
    vicacid.

    1 Reply Last reply
    0
    • K Offline
      K Offline
      kuzulis
      Qt Champions 2020
      wrote on last edited by
      #2

      Hi.

      Nobody did static build of QtSerialPort because it was designed and tested only as shared with shared Qt compiled. Please yourself investigate for trying build as static, and then please give here HowTo. :)

      Here this build process precisely works in case of dynamic Qt and dynamic QtSerialPort:

      https://bugreports.qt-project.org/browse/QTPLAYGROUND-13?focusedCommentId=200666&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-200666

      1 Reply Last reply
      0
      • V Offline
        V Offline
        vicacid
        wrote on last edited by
        #3

        Hi kuzulls,
        thanks for the link.

        I am a little confused about the paths given in http://qt-project.org/wiki/QtSerialPort.
        I don't have a folder "serialport-src" but only a folder "src" which contains a folder "serialport" which then contains the sourcecode. In neither there's a project file "qtserialport.pro", it is located in the top-level-folder. This does not fit to "qmake ../serialport-src/qtserialport.pro" given in the installation instructions.
        I tried different variants for the path of the "build" folder and qmake, but was unsuccessful.

        It would be great if somebody could give me a hint.

        Regards, vicacid.

        1 Reply Last reply
        0
        • K Offline
          K Offline
          kuzulis
          Qt Champions 2020
          wrote on last edited by
          #4

          bq. I don’t have a folder “serialport-src” but only a folder “src” ...

          A "serialport-src" is meant (is a name) as top-level directory, that contains a project file "qtserialport.pro". You can do rename your top-level directory to “serialport-src” (or do not rename :) ). Simply it can have other name which depends on a way of receiving an source code (through Git, or through WEB). In any case, it is necessary to use "qtserialport.pro" file!

          Please do instructions how do compile on WinCE by URL to Qt-BugTracker that I'm give above...

          1 Reply Last reply
          0
          • V Offline
            V Offline
            vicacid
            wrote on last edited by
            #5

            Hi kuzulis,
            thanks for the hint. Now it builds correctly and I can include qtserialport into my code.
            One last step is still missing. How do I tell my VS2008 project (using Qt addin) that I want to use qtserialport? If I generate a .pro file and add serialport to CONFIG, it has no effect.

            Regards, vicacid.

            1 Reply Last reply
            0
            • K Offline
              K Offline
              kuzulis
              Qt Champions 2020
              wrote on last edited by
              #6

              Add-in broken a project at building, may it is some Add-in bug or something else.

              I created VS projects without Add-in, using console command:

              @
              qmake -tp vc /path/to/your/project/file
              @

              e.g. see: http://qt-project.org/doc/qt-4.8/wince-with-qt-introduction.html

              But, before should be installed a Env paths to Qt-wince and MSVC ARM compilers by analogy as when Qt is building.

              If I am not mistaken. I did it long ago and all forgot.

              1 Reply Last reply
              0
              • V Offline
                V Offline
                vicacid
                wrote on last edited by
                #7

                Thanks again, kuzulis.

                I got it to work in the following way:
                First, I added QtSerialPort.lib to the linker input in the VS project settings. Then I could compile the example code, but could not deploy the application to the Win CE device.
                So I copied QtSerialPortd.dll onto the device manually and then it works. I can get information about the existing serial ports with QSerialPortInfo.

                However in the "serialport-build/src/serialport" folder there is only a build for debug. In the release folder there's solely the file QtSerialPort.prl.
                Not a problem by now, but maybe something wrong in a makefile?

                Regards, Stephan.

                1 Reply Last reply
                0
                • K Offline
                  K Offline
                  kuzulis
                  Qt Champions 2020
                  wrote on last edited by
                  #8

                  bq. However in the “serialport-build/src/serialport” folder there is only a build for debug.

                  For Release may need do:

                  @
                  qmake CONFIG+=release
                  @

                  but I'm not sure. In any case, please try investigate this issue yourself, and at successful result please give/display solution. Because I not have a WinCE and do not have a time for this.. :)

                  Denis

                  1 Reply Last reply
                  0
                  • V Offline
                    V Offline
                    vicacid
                    wrote on last edited by
                    #9

                    Hi kuzulis,
                    the library now works on my device. I can read out the settings of the COM-Port etc. and send data from the device to the host PC.
                    My hopefully last problem is reading data from the host. serial. readAll() does not return anything and waitForDataReady() produces time outs.
                    With Windows routines IO works in both directions, so the hardware etc. is ok.

                    I saw you have a WINCEIO.zip with which it may be possible to test IO. Maybe you could attach it, so I can test the lib.

                    Thanks, Stephan

                    1 Reply Last reply
                    0
                    • K Offline
                      K Offline
                      kuzulis
                      Qt Champions 2020
                      wrote on last edited by
                      #10

                      @vicacid,

                      WINCEIO.zip sources was attached to their thread on Bug Tracker (please, look more attentively :) ).

                      Here is a URL: https://bugreports.qt-project.org/secure/attachment/32236/winceio.zip

                      1 Reply Last reply
                      0
                      • V Offline
                        V Offline
                        vicacid
                        wrote on last edited by
                        #11

                        Ok, I'm blind. Sorry....

                        1 Reply Last reply
                        0

                        • Login

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups
                        • Search
                        • Get Qt Extensions
                        • Unsolved