reMarkableWiki

Everything about the reMarkable Paper Tablet

User Tools

Site Tools


devel:qt_creator

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
devel:qt_creator [2018/04/07 14:05]
ctxz
devel:qt_creator [2021/04/12 14:43] (current)
thomasvs
Line 10: Line 10:
 </​code>​ </​code>​
  
 +Note: On Linux Mint the qtcreator package is outdated. Please install the Qt Creator IDE via the [[https://​www.qt.io/​download-qt-installer?​hsCtaTracking=99d9dd4f-5681-48d2-b096-470725510d34%7C074ddad0-fdef-4e53-8aa8-5e8a876d6ab4 | Qt Online Installer]].
 ==== Arch Linux ==== ==== Arch Linux ====
 <​code>​ <​code>​
Line 21: Line 22:
  
 For other Linux distributions,​ please refer to the distribution specific package manager and package list. Optionally, or if your distribution does not provide a qt-creator package, you may follow [[http://​doc.qt.io/​qtcreator/​ |the official Qt Creator Manual]] and build Qt Creator from source. For other Linux distributions,​ please refer to the distribution specific package manager and package list. Optionally, or if your distribution does not provide a qt-creator package, you may follow [[http://​doc.qt.io/​qtcreator/​ |the official Qt Creator Manual]] and build Qt Creator from source.
- 
- 
  
 ===== Toolchain ===== ===== Toolchain =====
  
 For applications to be able to run on the reMarkable, they must be compiled for the ARM architecture For applications to be able to run on the reMarkable, they must be compiled for the ARM architecture
-using the toolchain ​provided by [[https://​remarkable.engineering/​deploy/​sdk/​|reMarkable engineering]]. +using toolchain. (See [[toolchain]] for ways to download the official toolchain and for information about alternative toolchains.) 
- +In the following, it is assumed that you downloaded the official ​toolchain installer ​to a file named ''​install-toolchain.sh''​
-Download ​the toolchain installer ​on your host machine +Before executing ​the toolchain installer, ensure that ''​bsdtar''​ is installed. Then execute the toolchain installer:
- +
-<​code>​ +
-$ curl https://​remarkable.engineering/​deploy/​sdk/​poky-glibc-x86_64-meta-toolchain-qt5-cortexa9hf-neon-toolchain-2.1.3.sh -o install-toolchain.sh +
-</​code>​ +
- +
-Execute ​the toolchain installer+
  
 <​code>​ <​code>​
Line 42: Line 35:
 </​code>​ </​code>​
  
-You will be prompted to specify an installation path. It is highly recommended to use the default SDK path as it is used trough ​out this article.+You will be prompted to specify an installation path. It is highly recommended to use the default SDK path as it is used through ​out this article.
  
 ===== Configuring QT Creator ===== ===== Configuring QT Creator =====
  
-The QT Creator IDE must first be configured to support cross-compiling for the reMarkable tablet. It is assumed that the toolchain has been installed to ''/​opt/poky/2.1.3/''​+The QT Creator IDE must first be configured to support cross-compiling for the reMarkable tablet. It is assumed that the toolchain has been installed to ''/​usr/local/oecore-x86_64''​
  
-Open the options menu under Tools > Options > Build & Run and follow the latter steps+Open the options menu under ''​Tools'' ​''​Options'' ​''​Kits'' ​and follow the latter steps
  
 ==== QT Version ==== ==== QT Version ====
  
-Under the QT Versions tab, click on ''​Add...''​ and select the qmake binary located in ''/​opt/poky/2.1.3/​sysroots/​x86_64-pokysdk-linux/​usr/​bin/qt5/​qmake''​. Set the Version name to reMarkable 5.6.to follow up with this guide.+Under the QT Versions tab, click on ''​Add...''​ and select the qmake binary located in ''/​usr/local/oecore-x86_64/​sysroots/​x86_64-oesdk-linux/​usr/​bin/​qmake''​. Set the Version name to reMarkable 5.11.to follow up with this guide.
  
 ==== Compiler ==== ==== Compiler ====
Line 58: Line 51:
 Under the compilers tab, click ''​Add''​ > ''​GCC''​. From there you'll have to add a C and C++ compiler. Under the compilers tab, click ''​Add''​ > ''​GCC''​. From there you'll have to add a C and C++ compiler.
  
-Set the path of both compilers to ''/​opt/poky/2.1.3/​sysroots/​x86_64-pokysdk-linux/​usr/​bin/​arm-poky-linux-gnueabi/​arm-poky-linux-gnueabi-gcc''​ and name them reMarkable GCC each.+Set the path of both compilers to ''/​usr/local/oecore-x86_64/​sysroots/​x86_64-oesdk-linux/​usr/​bin/​arm-oe-linux-gnueabi/​arm-oe-linux-gnueabi-gcc''​ and name them reMarkable GCC each and keep the ABI settings at ''​arm-linux-generic-elf-32bit''​.
  
 ==== Debugger ==== ==== Debugger ====
  
-Under the debuggers tab, click ''​Add''​ and set the path to ''/​opt/poky/2.1.3/​sysroots/​x86_64-pokysdk-linux/​usr/​bin/​arm-poky-linux-gnueabi/​arm-poky-linux-gnueabi-gdb''​.+Under the debuggers tab, click ''​Add''​ and set the path to ''/​usr/local/oecore-x86_64/​sysroots/​x86_64-oesdk-linux/​usr/​bin/​arm-oe-linux-gnueabi/​arm-oe-linux-gnueabi-gdb''​.
 Set the name to reMarkable GDB Set the name to reMarkable GDB
  
Line 69: Line 62:
 Under the kits tab, click ''​Add''​. From there ensure all properties are set as shown in the following table : Under the kits tab, click ''​Add''​. From there ensure all properties are set as shown in the following table :
  
-^ Property ​         ^ Value                                                        +^ Property ​         ^ Value                                                             ​
-| File system name  |                                                              +| File system name  |                                                                   ​
-| Device Type       | Generic Linux Device ​                                        ​+| Device Type       | Generic Linux Device ​                                             
-| Device ​           |                                                              +| Device ​           |                                                                   ​
-| Sysroot ​          | /opt/poky/2.1.3/​sysroots/​cortexa9hf-neon-poky-linux-gnueabi ​ +| Sysroot ​          | /usr/local/oecore-x86_64/​sysroots/​cortexa9hf-neon-oe-linux-gnueabi| 
-| Compiler (C)      | reMarkable GCC                                               ​+| Compiler (C)      | reMarkable GCC                                                    
-| Compiler (C++)    | reMarkable GCC                                               ​+| Compiler (C++)    | reMarkable GCC                                                    
-| Environment ​      | No changes to apply. ​                                        ​+| Environment ​      | No changes to apply. ​                                             
-| Debugger ​         | reMarkable GDB                                               ​+| Debugger ​         | reMarkable GDB                                                    
-| Qt version ​       | reMarkable 5.6.2                                             +| Qt version ​       | reMarkable 5.11.3                                                 
-| Qt mkspec ​        | linux-oe-g++ ​                                                ​|+| Qt mkspec ​        | linux-oe-g++ ​                                                     |
  
  
-CMake related properties have been left out from the table as they should remain unmodified.+CMake related properties have been left out from the table as they should remain unmodified. Should Qt creator report that the Qt Version already exists, simply alter the name to something different.
  
 ===== Adding your device ===== ===== Adding your device =====
  
-QT has to be able to establish connection to your device for it to directly install and execute code on it.+Qt has to be able to establish connection to your device for it to directly install and execute code on it.
  
-You must add an entry for your reMarkable tablet under Tools > Options > Devices. From there click Add > Generic Linux Device.+Add an entry for your reMarkable tablet under ''​Tools'' ​''​Options'' ​''​Devices''​. From there go to the ''​Devices''​ tab and click ''​Add'' ​''​Generic Linux Device''​.
  
-Set a name for the device, such as reMarkable, and under the **Type Specific** section ​specify the necessary [[http://​remarkablewiki.com/​index.php?​title=Methods_of_access#​SSH|SSH credentials]] to access your device.+Set a name for the device, such as reMarkable, and specify the necessary [[http://​remarkablewiki.com/​index.php?​title=Methods_of_access#​SSH|SSH credentials]] to access your device.
  
 ===== After Configuration ===== ===== After Configuration =====
  
-After all steps above have been completed, close the current ​session of Qt Creator and source the toolchain environment.+After all steps above have been completed, close the current Qt Creator ​session ​and source the toolchain environment
 +<​code>​ 
 +$ source /​usr/​local/​oecore-x86_64/​environment-setup-cortexa9hf-neon-oe-linux-gnueabi 
 +</​code>​
  
-From the very same terminal you may then open Qt Creator+Then start Qt creator from the same sh session:
 <​code>​ <​code>​
-$ source /​opt/​poky/​2.1.3/​environment-setup-cortexa9hf-neon-poky-linux-gnueabi 
 $ qtcreator $ qtcreator
 </​code>​ </​code>​
Line 104: Line 99:
 **On every new shell session, the toolchain environment must be sourced before Qt Creator has been opened.*** **On every new shell session, the toolchain environment must be sourced before Qt Creator has been opened.***
  
-At this point, Qt Creator should be able to build and execute code on your reMarkable tablet as long as its unlocked and connected (via SSH) to the host machine.+At this point, Qt Creator should be able to build and execute code on your reMarkable tablet as long as it'​s ​unlocked and connected (via SSH) to the host machine.
  
 **Tip:** **Tip:**
  
-The device'​s graphical interface, [[tech:​xochitl]],​ may undesirably interfere and overlap with the executed Qt Application. To stop this behavior from reoccurring,​ stop the xochitl service on your reMarkable trough systemctl+The device'​s graphical interface, [[tech:​xochitl]],​ may undesirably interfere and overlap with the executed Qt Application. To stop this behavior from reoccurring,​ stop the xochitl service on your reMarkable trough systemctl:
  
 <​code>​remarkable:​ ~/ systemctl stop xochitl</​code>​ <​code>​remarkable:​ ~/ systemctl stop xochitl</​code>​
  
-To start the GUI again, either restart the device or start xochitl from systemctl ​+To start the GUI again, either restart the device or start xochitl from systemctl:
  
 <​code>​remarkable:​ ~/ systemctl start xochitl</​code>​ <​code>​remarkable:​ ~/ systemctl start xochitl</​code>​
 +
 +===== Remarkable 2 =====
 +For running your apps on the remarkable 2, you must have [[https://​github.com/​ddvk/​remarkable2-framebuffer|rm2fb]] installed (possible from toltec) and run your apps with <​code>​LD_PRELOAD=/​opt/​lib/​librm2fb_client.so.1.0.0/​librm2fb_client.so.1.0.0 <​rmapp></​code>​. You can add this in qtcreator by going to Projects > Build & Run > Remarkable > Run > Run environment and add here the key <​code>​LD_PRELOAD</​code>​ and value <​code>/​opt/​lib/​librm2fb_client.so.1.0.0</​code>​ (or where you've installed rm2fb).
  
devel/qt_creator.1523102722.txt.gz · Last modified: 2018/04/07 14:05 by ctxz