TS-4900 QT5 IDE Setup: Difference between revisions
No edit summary |
No edit summary |
||
Line 3: | Line 3: | ||
Install qtcreator. The version from a recent Linux distribution should be fine. In a debian/Ubuntu desktop, run: | Install qtcreator. The version from a recent Linux distribution should be fine. In a debian/Ubuntu desktop, run: | ||
<source lang=bash> | <source lang=bash> | ||
sudo apt-get update && sudo apt-get install qtcreator | sudo apt-get update && sudo apt-get install qtcreator -y | ||
</source> | </source> | ||
You will also need to download the SDK which includes the QT support: | You will also need to download the SDK which includes the QT support: | ||
* | *ftp://ftp.embeddedarm.com/ts-socket-macrocontrollers/ts-4900-linux/distributions/yocto/dizzy/toolchain/poky-systemd-glibc-i686-meta-toolchain-qt5-cortexa9hf-vfp-neon-toolchain-1.7.1.sh i686] | ||
*[ftp://ftp.embeddedarm.com/ts-socket-macrocontrollers/ts-4900-linux/distributions/yocto/ | *[ftp://ftp.embeddedarm.com/ts-socket-macrocontrollers/ts-4900-linux/distributions/yocto/dizzy/toolchain/poky-systemd-glibc-x86_64-meta-toolchain-qt5-cortexa9hf-vfp-neon-toolchain-1.7.1.sh x86_64] | ||
You can install these with: | You can install these with: | ||
<source lang=bash> | <source lang=bash> | ||
## i686 | ## i686 | ||
sudo | sudo bash ./poky-systemd-glibc-x86_64-meta-toolchain-qt5-cortexa9hf-vfp-neon-toolchain-1.7.1.sh | ||
# or | # or | ||
## x86_64 | ## x86_64 | ||
sudo | sudo bash ./poky-systemd-glibc-i686-meta-toolchain-qt5-cortexa9hf-vfp-neon-toolchain-1.7.1.sh | ||
</source> | </source> | ||
These instructions assume the path will be default at "/opt/poky-systemd/1. | These instructions assume the path will be default at "/opt/poky-systemd/1.7.1/". | ||
Once the SDK is installed, an environment script has to be sourced before launching qtcreator. | |||
<source lang=bash> | <source lang=bash> | ||
source /opt/poky-systemd/1. | source /opt/poky-systemd/1.7.1/environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi | ||
qtcreator | qtcreator | ||
</source> | </source> | ||
Line 42: | Line 44: | ||
Next, in the left column of the Options menu, select "Build & Run". Start with the "QT Versions" tab, and click "Add" in the upper right to configure the TS-4900. Set Version name to "QT 5.2.1 (TS-4900)". | Next, in the left column of the Options menu, select "Build & Run". Start with the "QT Versions" tab, and click "Add" in the upper right to configure the TS-4900. Set Version name to "QT 5.2.1 (TS-4900)". | ||
In our default SDK on x86_64 this is "/opt/poky-systemd/1. | In our default SDK on x86_64 this is "/opt/poky-systemd/1.7.1/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/qmake". If you're using the x86 toolchain, "/opt/poky-systemd/1.7.1/sysroots/x86-pokysdk-linux/usr/bin/qt5/qmake". | ||
On some new versions | On some new qtcreator versions it will automatically detect "Qt 5.3.2 in PATH (qt5)". This can be used instead of entering it manually, though for clarity in the kit the name should be changed to TS-4900 | ||
{| | {| | ||
| [[File:qtversions.png|300px|right|QT Versions tab]] | | [[File:qtversions.png|300px|right|QT Versions tab]] | ||
Line 51: | Line 53: | ||
Next go to the "Compilers" tab, and click "Add", and select "GCC". Set the Name to "TS-4900 GCC". For the "Compiler Path": | Next go to the "Compilers" tab, and click "Add", and select "GCC". Set the Name to "TS-4900 GCC". For the "Compiler Path": | ||
* i686 | * i686 | ||
** /opt/poky-systemd/1. | ** /opt/poky-systemd/1.7.1/sysroots/i686-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++ | ||
* x86_64 | * x86_64 | ||
** /opt/poky-systemd/1. | ** /opt/poky-systemd/1.7.1/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++ | ||
{| | {| | ||
Line 61: | Line 63: | ||
Next, go to the Debuggers tab, and click "Add". For name, specify "TS-4900 GDB". For the paths, specify the location of gdb: | Next, go to the Debuggers tab, and click "Add". For name, specify "TS-4900 GDB". For the paths, specify the location of gdb: | ||
* i686 | * i686 | ||
** "/opt/poky-systemd/1. | ** "/opt/poky-systemd/1.7.1/sysroots/i686-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gdb" | ||
* x86_64 | * x86_64 | ||
** /opt/poky-systemd/1. | ** /opt/poky-systemd/1.7.1/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gdb | ||
{| | {| | ||
Line 69: | Line 71: | ||
|} | |} | ||
Next, go to the "Kits" tab and click add. For Name, enter "TS-4900". Set device type to "Generic Linux Device". Set the device to "TS-4900 (default for Generic Linux)". Set the sysroot to "/opt/poky-systemd/1. | Next, go to the "Kits" tab and click add. For Name, enter "TS-4900". Set device type to "Generic Linux Device". Set the device to "TS-4900 (default for Generic Linux)". Set the sysroot to "/opt/poky-systemd/1.7.1/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi". Set the compiler to "TS-4900 GCC". Set Debugger to "TS-4900 GDB". Set the QT version to "Qt 5.2.1 (TS-4900)". Finally, click Apply. | ||
{| | {| | ||
| [[File:qtkit.png|300px|right|QT Kit tab]] | | [[File:qtkit.png|300px|right|QT Kit tab]] |
Revision as of 12:06, 28 May 2015
Note: | This guide is intended for our stock image using systemd, but you are using a custom images the directions should apply if you rebuild with your own yocto toolchain (meta-toolchain-qt5), and update the paths if you are using a different distribution. |
Install qtcreator. The version from a recent Linux distribution should be fine. In a debian/Ubuntu desktop, run:
sudo apt-get update && sudo apt-get install qtcreator -y
You will also need to download the SDK which includes the QT support:
- ftp://ftp.embeddedarm.com/ts-socket-macrocontrollers/ts-4900-linux/distributions/yocto/dizzy/toolchain/poky-systemd-glibc-i686-meta-toolchain-qt5-cortexa9hf-vfp-neon-toolchain-1.7.1.sh i686]
- x86_64
You can install these with:
## i686
sudo bash ./poky-systemd-glibc-x86_64-meta-toolchain-qt5-cortexa9hf-vfp-neon-toolchain-1.7.1.sh
# or
## x86_64
sudo bash ./poky-systemd-glibc-i686-meta-toolchain-qt5-cortexa9hf-vfp-neon-toolchain-1.7.1.sh
These instructions assume the path will be default at "/opt/poky-systemd/1.7.1/".
Once the SDK is installed, an environment script has to be sourced before launching qtcreator.
source /opt/poky-systemd/1.7.1/environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi
qtcreator
Note: | QtCreator needs to be launched with this sourced every time the cross toolchain is used or it will fail with compile errors. |
Next we need to configure QT Creator to build using this toolchain. When QT creator launches and go to Tools->Options, and select Devices. Click "Add" and select "Generic Linux Device" and click "Start Wizard".
On the next page you will need to specify the ip address or hostname to the system. This could potentially change depending on your network, so if it fails to deploy code later this may need to be updated to point at a new IP for your TS-4900. In this example, my TS-4900 has a dhcp address of 192.168.2.45. The default Yocto image will use "root" with no password to connect. Set the name to "TS-4900" as well.
It will then verify connectivity. You can click close and continue.
Next, in the left column of the Options menu, select "Build & Run". Start with the "QT Versions" tab, and click "Add" in the upper right to configure the TS-4900. Set Version name to "QT 5.2.1 (TS-4900)".
In our default SDK on x86_64 this is "/opt/poky-systemd/1.7.1/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/qmake". If you're using the x86 toolchain, "/opt/poky-systemd/1.7.1/sysroots/x86-pokysdk-linux/usr/bin/qt5/qmake".
On some new qtcreator versions it will automatically detect "Qt 5.3.2 in PATH (qt5)". This can be used instead of entering it manually, though for clarity in the kit the name should be changed to TS-4900
Next go to the "Compilers" tab, and click "Add", and select "GCC". Set the Name to "TS-4900 GCC". For the "Compiler Path":
- i686
- /opt/poky-systemd/1.7.1/sysroots/i686-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++
- x86_64
- /opt/poky-systemd/1.7.1/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++
Next, go to the Debuggers tab, and click "Add". For name, specify "TS-4900 GDB". For the paths, specify the location of gdb:
- i686
- "/opt/poky-systemd/1.7.1/sysroots/i686-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gdb"
- x86_64
- /opt/poky-systemd/1.7.1/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gdb
Next, go to the "Kits" tab and click add. For Name, enter "TS-4900". Set device type to "Generic Linux Device". Set the device to "TS-4900 (default for Generic Linux)". Set the sysroot to "/opt/poky-systemd/1.7.1/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi". Set the compiler to "TS-4900 GCC". Set Debugger to "TS-4900 GDB". Set the QT version to "Qt 5.2.1 (TS-4900)". Finally, click Apply.
At this point QT Creator is set up to begin your first project.