RISC-V搭建嵌入式QT开发环境

发布时间:2023年12月22日

安装环境:
Ubuntu18.04
GCC:gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)
CROOSS-tools:gcc version 8.3.0 (crosstool-NG 1.24.0)

下载5.12安装包,解压后修改qmake.conf配置参数,将编译工具修改为交叉编译器

/qt-everywhere-src-5.12.12$ vi qtbase/mkspecs/linux-arm-gnueabi-g++/qmake.conf
#
# qmake configuration for building with arm-linux-gnueabi-g++
#

MAKEFILE_GENERATOR      = UNIX
CONFIG                 += incremental
QMAKE_INCREMENTAL_STYLE = sublib


QT_QPA_DEFAULT_PLATFORM = linuxfb #eglfs

QMAKE_CFLAGS_RELEASE   += -O2 -march=armv7-a

QMAKE_CXXFLAGS_RELEASE += -O2 -march=armv7-a


include(../common/linux.conf)
include(../common/gcc-base-unix.conf)
include(../common/g++-unix.conf)

# modifications to g++.conf
QMAKE_CC           = /home/luckfox/workspace/luckfox-pico/tools/linux/toolchain/arm-rockchip830-linux-uclibcgnueabihf/bin/arm-rockchip830-linux-uclibcgnueabihf-gcc
QMAKE_CXX          = /home/luckfox/workspace/luckfox-pico/tools/linux/toolchain/arm-rockchip830-linux-uclibcgnueabihf/bin/arm-rockchip830-linux-uclibcgnueabihf-g++
QMAKE_LINK         = /home/luckfox/workspace/luckfox-pico/tools/linux/toolchain/arm-rockchip830-linux-uclibcgnueabihf/bin/arm-rockchip830-linux-uclibcgnueabihf-g++
QMAKE_LINK_SHLIB   = /home/luckfox/workspace/luckfox-pico/tools/linux/toolchain/arm-rockchip830-linux-uclibcgnueabihf/bin/arm-rockchip830-linux-uclibcgnueabihf-g++

# modifications to linux.conf
QMAKE_AR           = /home/luckfox/workspace/luckfox-pico/tools/linux/toolchain/arm-rockchip830-linux-uclibcgnueabihf/bin/arm-rockchip830-linux-uclibcgnueabihf-ar cqs
QMAKE_OBJCOPY     = /home/luckfox/workspace/luckfox-pico/tools/linux/toolchain/arm-rockchip830-linux-uclibcgnueabihf/bin/arm-rockchip830-linux-uclibcgnueabihf-objcopy
QMAKE_NM           = /home/luckfox/workspace/luckfox-pico/tools/linux/toolchain/arm-rockchip830-linux-uclibcgnueabihf/bin/arm-rockchip830-linux-uclibcgnueabihf-nm -P
QMAKE_STRIP        = /home/luckfox/workspace/luckfox-pico/tools/linux/toolchain/arm-rockchip830-linux-uclibcgnueabihf/bin/arm-rockchip830-linux-uclibcgnueabihf-strip
load(qt_config)
文章来源:https://blog.csdn.net/u010584870/article/details/135145045
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。