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. QT for Arduino development - Mega boards
Forum Updated to NodeBB v4.3 + New Features

QT for Arduino development - Mega boards

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
13 Posts 3 Posters 6.1k 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.
  • Q Offline
    Q Offline
    Qcontinuum
    wrote on 4 Sept 2019, 13:50 last edited by
    #4

    Not sure how it got condensed like that, but I have updated it. Should be OK now.

    A 1 Reply Last reply 4 Sept 2019, 14:29
    0
    • Q Qcontinuum
      4 Sept 2019, 13:50

      Not sure how it got condensed like that, but I have updated it. Should be OK now.

      A Offline
      A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on 4 Sept 2019, 14:29 last edited by
      #5

      Hi @qcontinuum,

      Thanks. From the updated link I see, that a Generic Project is used.

      In that case, the project definitions have to be done yourself, Creator does not know (and doesn't care) what's inside the Makefile or passed to the make commandline.

      So I think you need some other includes, or provide a `#define' for the mega2560.

      Can you show us the relevant definitions for Serial0 and Serial1?

      Regards

      Qt has to stay free or it will die.

      Q 1 Reply Last reply 4 Sept 2019, 19:25
      0
      • A aha_1980
        4 Sept 2019, 14:29

        Hi @qcontinuum,

        Thanks. From the updated link I see, that a Generic Project is used.

        In that case, the project definitions have to be done yourself, Creator does not know (and doesn't care) what's inside the Makefile or passed to the make commandline.

        So I think you need some other includes, or provide a `#define' for the mega2560.

        Can you show us the relevant definitions for Serial0 and Serial1?

        Regards

        Q Offline
        Q Offline
        Qcontinuum
        wrote on 4 Sept 2019, 19:25 last edited by Qcontinuum 9 Apr 2019, 19:25
        #6

        @aha_1980 , I have come to the same conclusion as you outline here. If I want to compile for anything other than a Uno board, I have to run make directly in terminal. I can live with that but I was hoping that there was a better way. My investigation of Eclipse was rather underwhelming, but I found QT very useful, at least as an editor and error checker (particularly for classes) and to do proof on concept testing.

        Serial0 and Serial1 are part of the Arduino framework. I only have to include <Arduino.h> in my project. However, compiling in QT will only recognize Serial0. I did some investigating along the lines you suggest and discovered that the Ardiono IDE does some pre-processing behind the scenes, although I didn't find and details. Looking through various Arduino library files, there are some symbols defined (e.g. #define ARDUINO_AVR_MEGA) but they seem to be "read-only", i.e. to determine rather than to set which board I am using. If I use them then the compiler complains about a duplicate definition or ignores it. In the Makefile, the board is set with:

        BOARD_TAG    = mega
        

        However, as you say, QT does not see that. The identification of an appropriate define might be a question for the Arduino forum. Its is difficult to know where to draw the line between Arduino stuff and C++ sometimes so I hope I haven't gone too much OT.

        A 1 Reply Last reply 4 Sept 2019, 19:46
        0
        • Q Qcontinuum
          4 Sept 2019, 19:25

          @aha_1980 , I have come to the same conclusion as you outline here. If I want to compile for anything other than a Uno board, I have to run make directly in terminal. I can live with that but I was hoping that there was a better way. My investigation of Eclipse was rather underwhelming, but I found QT very useful, at least as an editor and error checker (particularly for classes) and to do proof on concept testing.

          Serial0 and Serial1 are part of the Arduino framework. I only have to include <Arduino.h> in my project. However, compiling in QT will only recognize Serial0. I did some investigating along the lines you suggest and discovered that the Ardiono IDE does some pre-processing behind the scenes, although I didn't find and details. Looking through various Arduino library files, there are some symbols defined (e.g. #define ARDUINO_AVR_MEGA) but they seem to be "read-only", i.e. to determine rather than to set which board I am using. If I use them then the compiler complains about a duplicate definition or ignores it. In the Makefile, the board is set with:

          BOARD_TAG    = mega
          

          However, as you say, QT does not see that. The identification of an appropriate define might be a question for the Arduino forum. Its is difficult to know where to draw the line between Arduino stuff and C++ sometimes so I hope I haven't gone too much OT.

          A Offline
          A Offline
          aha_1980
          Lifetime Qt Champion
          wrote on 4 Sept 2019, 19:46 last edited by
          #7

          Hi @qcontinuum said in QT for Arduino development - Mega boards:

          #define ARDUINO_AVR_MEGA

          You can put such defines in the <project>.defines file, it will be prepended to all project files.

          Changing the Makefile to use for build should be possible too: Press Ctrl+5 and you are in the projects setup page. You can specify the make command here, and you should even be able to create several build configurations (I've not tested that, but I think it works).

          After all, it should be enough fun to code for these micros.

          Regards

          If you, however, need to change them regularly, that may be a bit tedious...

          Qt has to stay free or it will die.

          1 Reply Last reply
          0
          • Q Offline
            Q Offline
            Qcontinuum
            wrote on 7 Sept 2019, 19:41 last edited by
            #8

            Sorry, I tried Ctrl-F5, but it does absolutely nothing.

            A 1 Reply Last reply 7 Sept 2019, 19:58
            0
            • Q Qcontinuum
              7 Sept 2019, 19:41

              Sorry, I tried Ctrl-F5, but it does absolutely nothing.

              A Offline
              A Offline
              aha_1980
              Lifetime Qt Champion
              wrote on 7 Sept 2019, 19:58 last edited by
              #9

              @qcontinuum I said Ctrl+5 which switches to Projects mode; not Ctrl+F5 ;)

              Qt has to stay free or it will die.

              1 Reply Last reply
              0
              • Q Offline
                Q Offline
                Qcontinuum
                wrote on 8 Sept 2019, 10:54 last edited by
                #10

                Yes, so you did. Sorry my mistake. Its just the same as clicking Projects on the left hand side which is were I went anyway. Thanks.

                1 Reply Last reply
                0
                • V Offline
                  V Offline
                  velvettiere
                  wrote on 23 Dec 2023, 09:11 last edited by
                  #11

                  Hi all guys and thanks for the support.

                  The next link no longer works.

                  https://blog.jayway.com/2011/09/22/using-qtcreator-for-arduino-development/?unapproved=549656&moderation-hash=33455ce227a44aef31f2f7535e519077#comment-549656

                  The following page is missing the main images where you can see how QT is configured in the projects section.

                  https://readwrite.com/qtcreator-arduino-development/

                  It would seem as if the world does not want people to use QT to develop applications for arduino :D :D

                  Could you help me out here? I have completely followed the procedure contained in https://readwrite.com/qtcreator-arduino-development/ but without pictures showing me how to configure the projects section, I don't know how to move forward.

                  Thank you very much see you soon and happy holidays. Bye Bye

                  A 1 Reply Last reply 23 Dec 2023, 16:01
                  0
                  • V velvettiere
                    23 Dec 2023, 09:11

                    Hi all guys and thanks for the support.

                    The next link no longer works.

                    https://blog.jayway.com/2011/09/22/using-qtcreator-for-arduino-development/?unapproved=549656&moderation-hash=33455ce227a44aef31f2f7535e519077#comment-549656

                    The following page is missing the main images where you can see how QT is configured in the projects section.

                    https://readwrite.com/qtcreator-arduino-development/

                    It would seem as if the world does not want people to use QT to develop applications for arduino :D :D

                    Could you help me out here? I have completely followed the procedure contained in https://readwrite.com/qtcreator-arduino-development/ but without pictures showing me how to configure the projects section, I don't know how to move forward.

                    Thank you very much see you soon and happy holidays. Bye Bye

                    A Offline
                    A Offline
                    aha_1980
                    Lifetime Qt Champion
                    wrote on 23 Dec 2023, 16:01 last edited by
                    #12

                    Hi @velvettiere

                    you had luck, the web archive has snapshots of the pictures :)

                    http://web.archive.org/web/20121116161618/http://www.meegoexperts.com/wp-content/uploads/2011/09/Import-Projec-Qt-Creator-MeeGo-MeeGoExperts-600-1.jpg

                    http://web.archive.org/web/20121116152537/http://www.meegoexperts.com/wp-content/uploads/2011/09/Import-Projec-Qt-Creator-MeeGo-MeeGoExperts-600-2.jpg

                    http://web.archive.org/web/20121116152647/http://www.meegoexperts.com/wp-content/uploads/2011/09/Import-Projec-Qt-Creator-MeeGo-MeeGoExperts-600-3.jpg

                    The screens in Creator look a bit different now, but you should get the idea of what to modify.

                    Good luck!

                    Qt has to stay free or it will die.

                    V 1 Reply Last reply 24 Dec 2023, 08:50
                    1
                    • A aha_1980 referenced this topic on 24 Dec 2023, 04:25
                    • A aha_1980
                      23 Dec 2023, 16:01

                      Hi @velvettiere

                      you had luck, the web archive has snapshots of the pictures :)

                      http://web.archive.org/web/20121116161618/http://www.meegoexperts.com/wp-content/uploads/2011/09/Import-Projec-Qt-Creator-MeeGo-MeeGoExperts-600-1.jpg

                      http://web.archive.org/web/20121116152537/http://www.meegoexperts.com/wp-content/uploads/2011/09/Import-Projec-Qt-Creator-MeeGo-MeeGoExperts-600-2.jpg

                      http://web.archive.org/web/20121116152647/http://www.meegoexperts.com/wp-content/uploads/2011/09/Import-Projec-Qt-Creator-MeeGo-MeeGoExperts-600-3.jpg

                      The screens in Creator look a bit different now, but you should get the idea of what to modify.

                      Good luck!

                      V Offline
                      V Offline
                      velvettiere
                      wrote on 24 Dec 2023, 08:50 last edited by velvettiere
                      #13

                      @aha_1980 said in QT for Arduino development - Mega boards:

                      Hi @velvettiere

                      you had luck, the web archive has snapshots of the pictures :)

                      http://web.archive.org/web/20121116161618/http://www.meegoexperts.com/wp-content/uploads/2011/09/Import-Projec-Qt-Creator-MeeGo-MeeGoExperts-600-1.jpg

                      http://web.archive.org/web/20121116152537/http://www.meegoexperts.com/wp-content/uploads/2011/09/Import-Projec-Qt-Creator-MeeGo-MeeGoExperts-600-2.jpg

                      http://web.archive.org/web/20121116152647/http://www.meegoexperts.com/wp-content/uploads/2011/09/Import-Projec-Qt-Creator-MeeGo-MeeGoExperts-600-3.jpg

                      The screens in Creator look a bit different now, but you should get the idea of what to modify.

                      Good luck!

                      Thankyou very much for your support.

                      I found another image, the first, that it's necessary to follow the entire guide.

                      http://web.archive.org/web/20121116161922/http://www.meegoexperts.com/wp-content/uploads/2011/09/Import-Projec-Qt-Creator-MeeGo-MeeGoExperts-600.jpg

                      Another site in the web archive.
                      http://web.archive.org/web/20221126085301/https://blog.jayway.com/2011/09/22/using-qtcreator-for-arduino-development/?unapproved=549656&moderation-hash=33455ce227a44aef31f2f7535e519077#comment-549656

                      I will try to follow the entire process and will be here with some upgrade in time.

                      Thank you a lot. Bye Bye.

                      1 Reply Last reply
                      1

                      • Login

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