Cross Compiling Qt for ARM w/ custom makespecs



  • I'm having some trouble getting qt compiled with makespecs I wrote.

    Here's my output...

    C:\uh\HEAD\Qt>configure -debug -embedded -arch arm -xplatform
    freeRTOS-arm-g++ -skip webkit -skip tools

    • cd qtbase
    • C:\uh\HEAD\Qt\qtbase\configure.bat -top-level -debug -embedded -arch arm -use
      gold-linker -xplatform freeRTOS-arm-g++ -skip webkit -skip tools
      Which edition of Qt do you want to use ?
      Type 'c' if you want to use the Commercial Edition.
      Type 'o' if you want to use the Open Source Edition.
      o

    This is the Qt for ??? Open Source Edition.

    You are licensed to use this software under the terms of
    the GNU Lesser General Public License (LGPL) version 2.1
    or the GNU Lesser General Public License (LGPL) version 3.

    Type '3' to view the Lesser GNU General Public License version 3 (LGPLv3).
    Type 'L' to view the Lesser GNU General Public License version 2.1 (LGPLv2.1).
    Type 'y' to accept this license offer.
    Type 'n' to decline this license offer.

    Do you accept the terms of the license?
    Y
    Creating qmake...

    Microsoft (R) Program Maintenance Utility Version 12.00.21005.1
    Copyright (C) Microsoft Corporation. All rights reserved.

    Running configuration tests...
    arm-none-eabi-g++.EXE: error: unrecognized command line option '--via'
    NMAKE : fatal error U1077: 'C:\uh\4.9_2014q4\GNUToolsARMEmbedded\bin\arm-none-e
    bi-g++.EXE' : return code '0x1'
    Stop.
    Could not find output file 'arch.exe' or 'arch' in C:/uh/HEAD/Qt/qtbase/config.
    ests/arch : No such file or directory

    ...................................................................................................................................................................
    qmake.conf
    ...................................................................................................................................................................

    qmake configuration for building with arm-none-gnueabi-g++

    include(../common/freeRTOS.conf) # formally unix.conf
    include(../common/gcc-base-freeRTOS.conf) # formally gcc-base-unix.conf
    include(../common/g++-freeRTOS.conf) # formally g++-unix.conf

    MAKEFILE_GENERATOR = MINGW
    CONFIG += no_import_libs no_generated_target_info

    modifications to g++.conf

    QMAKE_CC = $(ARM_BIN)\arm-none-eabi-gcc
    QMAKE_CXX = $(ARM_BIN)\arm-none-eabi-g++
    QMAKE_LINK = $(ARM_BIN)\arm-none-eabi-g++
    QMAKE_LINK_SHLIB = $(ARM_BIN)\arm-none-eabi-g++
    QMAKE_LIB = $(ARM_BIN)\arm-none-eabi-ar
    QMAKE_AR = $(ARM_BIN)\arm-none-eabi-ar cqs
    QMAKE_OBJCOPY = $(ARM_BIN)\arm-none-eabi-objcopy
    QMAKE_STRIP = $(ARM_BIN)\arm-none-eabi-strip

    QMAKE_RUN_CC = $(CC) -c $(CFLAGS) $(INCPATH) -o $obj $src
    QMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<
    QMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $obj $src
    QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
    QMAKE_INCDIR =
    QMAKE_INCDIR_QT = $(QT_INSTALL_HEADERS)
    QMAKE_LIBDIR_QT = $(QT_INSTALL_LIBS)
    QMAKE_MOC = $(QT_INSTALL_BINS)\moc.exe
    QMAKE_UIC = $(QT_INSTALL_BINS)\uic.exe
    QMAKE_IDC = $(QT_INSTALL_BINS)\idc.exe
    QMAKE_COPY = copy /y
    QMAKE_COPY_DIR = xcopy /s /q /y /i
    QMAKE_MOVE = move
    QMAKE_DEL_FILE = del
    QMAKE_MKDIR = mkdir
    QMAKE_DEL_DIR = rmdir
    QMAKE_CHK_DIR_EXISTS = if not exist
    QMAKE_IDL = midl
    QMAKE_ZIP = zip -r -9

    ARM_CFLAGS = -mthumb -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16
    #TARGET_SYSROOT = #sysroot path goes here
    TARGET_QTDIR = /QtEmbedded-5.5.0-arm

    #modifications to gcc-base.conf
    QMAKE_CFLAGS += $$ARM_CFLAGS
    QMAKE_CXXFLAGS += $$ARM_CFLAGS
    QMAKE_LIBS +=
    QMAKE_LFLAGS += $${QMAKE_LFLAGS_RPATH}$$[QT_INSTALL_LIBS]

    load(qt_config)

    .,.....................................................................................................................................

    Any suggestions would be much appreciated!



  • Have you tried sourcing your environment setup script before configuration? The cross-platform compiler that I use provides a simple script that exports the correct environment including architecture.



  • @justin1122

    Can you be more specific? I feel like I've tried everything to resolve this problem...

    Are there any resources online that use qt on the freeRTOS operating system on arm?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.