跳至内容
remarkable云
跳至内容
Search
搜索
工具
显示页面
修订记录
反向链接
最近更改
媒体管理
网站地图
注册
登录
>
start
研究开发
配置qtcreator
本页面只读。您可以查看源文件,但不能更改它。如果您觉得这是系统错误,请联系管理员。
CKG 可视编辑器
[[https://www.qt.io/qt-features-libraries-apis-tools-and-ide|QT Creator]] is a cross-platform IDE designed to build Qt applications. The Qt Creator IDE is currently the preferred choice to build and run custom qt applications on the reMarkable tablet. ===== Installation ===== ==== Ubuntu ==== <code> $ sudo apt install qtcreator </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 ==== <code> # pacman -S qtcreator </code> ==== Fedora ==== <code> # yum install qt-creator </code> 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 ===== For applications to be able to run on the reMarkable, they must be compiled for the ARM architecture using a 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''. Before executing the toolchain installer, ensure that ''bsdtar'' is installed. Then execute the toolchain installer: <code> $ chmod +x install-toolchain.sh $ ./install-toolchain </code> 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 ===== 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'' > ''Kits'' and follow the latter steps ==== QT Version ==== 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.3 to follow up with this guide. ==== 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 ''/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 ==== 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 ==== QT Kit ==== Under the kits tab, click ''Add''. From there ensure all properties are set as shown in the following table : ^ Property ^ Value ^ | File system name | | | Device Type | Generic Linux Device | | Device | | | Sysroot | /usr/local/oecore-x86_64/sysroots/cortexa9hf-neon-oe-linux-gnueabi| | Compiler (C) | reMarkable GCC | | Compiler (C++) | reMarkable GCC | | Environment | No changes to apply. | | Debugger | reMarkable GDB | | Qt version | reMarkable 5.11.3 | | Qt mkspec | linux-oe-g++ | 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 ===== Qt has to be able to establish connection to your device for it to directly install and execute code on it. 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 specify the necessary [[http://remarkablewiki.com/index.php?title=Methods_of_access#SSH|SSH credentials]] to access your device. ===== After Configuration ===== 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> Then start Qt creator from the same sh session: <code> $ qtcreator </code> **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 it's unlocked and connected (via SSH) to the host machine. **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: <code>remarkable: ~/ systemctl stop xochitl</code> To start the GUI again, either restart the device or start xochitl from systemctl: <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).
Page Tools
站点工具
最近更改
媒体管理
网站地图
Site Tools
页面工具
显示页面
修订记录
反向链接
回到顶部
User Tools
用户工具
注册
登录