QT for Arduino development - Mega boards
-
Not sure how it got condensed like that, but I have updated it. Should be OK now.
-
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 themake
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
-
@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.
-
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...
-
Sorry, I tried Ctrl-F5, but it does absolutely nothing.
-
@qcontinuum I said
Ctrl+5
which switches to Projects mode; not Ctrl+F5 ;) -
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.
-
Hi all guys and thanks for the support.
The next link no longer works.
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
-
Hi @velvettiere
you had luck, the web archive has snapshots of the pictures :)
The screens in Creator look a bit different now, but you should get the idea of what to modify.
Good luck!
-
-
@aha_1980 said in QT for Arduino development - Mega boards:
Hi @velvettiere
you had luck, the web archive has snapshots of the pictures :)
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.
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-549656I will try to follow the entire process and will be here with some upgrade in time.
Thank you a lot. Bye Bye.