Uses vfp register arguments error

[BUG] uses VFP register arguments, output does not #1326 Comments LOCAL_PATH := $(call my-dir) this is Android.mk file! error is:uses VFP register arguments, output does not include $(CLEAR_VARS) LOCAL_MODULE :=libobjectbox LOCAL_SRC_FILES := $(LOCAL_PATH)/libs/$ (TARGET_ARCH_ABI)/libobjectbox.so include $(PREBUILT_SHARED_LIBRARY) include $(CLEAR_VARS) LOCAL_MODULE := blurLap LOCAL_SRC_FILES := native-lib.cpp lapls.cpp #include/flatcc-src/builder.c #include/flatcc-src/emitter.c #include/flatcc-src/refmap.c LOCAL_C_INCLUDES += $(LOCAL_PATH)/ LOCAL_C_INCLUDES += $(LOCAL_PATH)/ […]

Содержание

  1. [BUG] uses VFP register arguments, output does not #1326
  2. Comments
  3. Cortex-M4F: xxx.elf uses VFP register arguments, yyy.o does not #2660
  4. Comments
  5. Uses vfp register arguments error
  6. Re: VFP register arguments error C++
  7. Re: VFP register arguments error C++
  8. Re: VFP register arguments error C++

[BUG] uses VFP register arguments, output does not #1326

LOCAL_PATH := $(call my-dir)
this is Android.mk file! error is:uses VFP register arguments, output does not
include $(CLEAR_VARS)
LOCAL_MODULE :=libobjectbox
LOCAL_SRC_FILES := $(LOCAL_PATH)/libs/$ (TARGET_ARCH_ABI)/libobjectbox.so
include $(PREBUILT_SHARED_LIBRARY)

include $(CLEAR_VARS)
LOCAL_MODULE := blurLap
LOCAL_SRC_FILES := native-lib.cpp
lapls.cpp
#include/flatcc-src/builder.c
#include/flatcc-src/emitter.c
#include/flatcc-src/refmap.c

LOCAL_C_INCLUDES += $(LOCAL_PATH)/
LOCAL_C_INCLUDES += $(LOCAL_PATH)/
LOCAL_C_INCLUDES += $(LOCAL_PATH)/include/
LOCAL_C_INCLUDES += $(LOCAL_PATH)/include/flatcc/

LOCAL_LDLIBS := -lz
LOCAL_LDLIBS += -L$(SYSROOT)/usr/lib

LOCAL_ARM_NEON := true
LOCAL_SHARED_LIBRARIES += libobjectbox

LOCAL_CFLAGS += -O3 -mfpu=vfp -D_NDK_MATH_NO_SOFTFP=1 -march=armv7-a -mfloat-abi=softfp

The text was updated successfully, but these errors were encountered:

This needs more info to be actionable. Please attach source files and clearly state what you expected that is different with the output. The bug title could mean any number of things, but it isn’t obvious without seeing the input source files.

Thank you for reply .Does ndk support for building libraries with (-mhard-float )or(-mfloat-abi=hard) ?

The short answer: the defaults are correct and you don’t need to worry about it.

The long answer: the 32-bit Arm ABI for Android is softfp. This only affects the calling convention, not the instructions available to apps. Your apps use hard float math, but can’t use the floating point registers for passing arguments to functions. Since the system ABI is softfp, you cannot use -mfloat-abi=hard without breaking that interface. Any other libraries you use are also going to be softfp, so you’d be breaking your interface to them as well. If there are functions in your own code (aside from the JNI interface) that would benefit from the hard float calling convention you can annotate them individually with __attribute__((pcs(«aapcs-vfp»))) (https://gcc.gnu.org/onlinedocs/gcc-6.1.0/gcc/ARM-Function-Attributes.html#ARM-Function-Attributes), but you should definitely be using a profiler to guide that.

But I’m honestly not sure if that addresses the bug you filed, because it’s not clear what the problem is. What is the actual error message you saw and where did it come from? What version of the NDK are you using? We need the information that was in the bug template.

Источник

Cortex-M4F: xxx.elf uses VFP register arguments, yyy.o does not #2660

When I compile default example by «make BOARD=stmf32f4discovery»

Is it because of the compile itself error?which version are you using to compile arm family application? can any one help me?I appreciate it very much

The text was updated successfully, but these errors were encountered:

Your installed newlib version is built for soft float, the RIOT application is built for hard float. If you don’t want to change your newlib you can try adding -mfloat-abi=softfp to your CFLAGS and do a make clean

@gebart , thanks for your answer,after I added -mfloat-abi=softfp both in Makefile.cflags and boards/stm32f4discovery/Makefile.include, I still get the following error messages:

Could you help me to find what is wrong with this arm compile problem?

Try different combinations of the float configuration flags -msoft-float , -mfloat-abi=

@OlegHahm please help me to find what’s wrong?

What have you tried so far?

Is there a reason not to use the recommended ARM toolchain from launchpad?

Since the original poster has not responded for a long time and the toolchain is not the recommended one I will now close this issue.

I ran into the same issue trying to compile a project for the Teensy 3.6. with arm-none-eabi 4.8.4. The issue was that gcc was linking to libarm_cortexM4l_math.a, which is the software floating point version of the library. The solution was to force it to link to libarm_cortexM4lf_math.a, the hardware floating point version, instead.

I ran into the same issue trying to compile a project for the Teensy 3.6. with arm-none-eabi 4.8.4. The issue was that gcc was linking to libarm_cortexM4l_math.a, which is the software floating point version of the library. The solution was to force it to link to libarm_cortexM4lf_math.a, the hardware floating point version, instead.

Can you explain pls how to do this? Thanks!

Hmm, well it’s been a while. If I remember correctly my solution was pretty inelegant. I simply went into the arm-none-eabi folder and renamed libarm_cortexM4lf_math.a to libarm_cortexM4l_math.a.

@rykerDial that indeed is inelegant and would still compile using software float. Have you figured out a way to link the hard float library while compiling?

Источник

Uses vfp register arguments error

I try to build project finger print scan project file received from finger print vendor develop by use QT creator and C++ on Linux fedora 32 bit
when i test on raspberry pi 3 while building project got error message at below.
Every one can help me for this error ?

15:42:47: Running steps for project rtdemo.
15:42:47: Configuration unchanged, skipping qmake step.
15:42:47: Starting: «/usr/bin/make»
g++ -march=armv7-a -mfloat-abi=hard -o rtdemo main.o MainDialog.o moc_Maindialog.o -L/usr/lib/arm-linux-gnueabihf -L/home/pi/32bit/rtdemo/ -lfpengine -lQtGui -lQtCore -lpthread
/usr/bin/ld: error: rtdemo uses VFP register arguments, /usr/lib/arm-linux-gnueabihf/libfpengine.a(fpengine.o) does not
/usr/bin/ld: failed to merge target specific data of file /usr/lib/arm-linux-gnueabihf/libfpengine.a(fpengine.o)
/usr/bin/ld: error: rtdemo uses VFP register arguments, /usr/lib/arm-linux-gnueabihf/libfpengine.a(fprotocol.o) does not
/usr/bin/ld: failed to merge target specific data of file /usr/lib/arm-linux-gnueabihf/libfpengine.a(fprotocol.o)
/usr/bin/ld: error: rtdemo uses VFP register arguments, /usr/lib/arm-linux-gnueabihf/libfpengine.a(fpdevice.o) does not
/usr/bin/ld: failed to merge target specific data of file /usr/lib/arm-linux-gnueabihf/libfpengine.a(fpdevice.o)
/usr/bin/ld: error: rtdemo uses VFP register arguments, /usr/lib/arm-linux-gnueabihf/libfpengine.a(pusb-linux.o) does not
/usr/bin/ld: failed to merge target specific data of file /usr/lib/arm-linux-gnueabihf/libfpengine.a(pusb-linux.o)
/usr/bin/ld: error: rtdemo uses VFP register arguments, /usr/lib/arm-linux-gnueabihf/libfpengine.a(serial.o) does not
/usr/bin/ld: failed to merge target specific data of file /usr/lib/arm-linux-gnueabihf/libfpengine.a(serial.o)
/usr/bin/ld: error: rtdemo uses VFP register arguments, /usr/lib/arm-linux-gnueabihf/libfpengine.a(sync.o) does not
/usr/bin/ld: failed to merge target specific data of file /usr/lib/arm-linux-gnueabihf/libfpengine.a(sync.o)
/usr/bin/ld: error: rtdemo uses VFP register arguments, /usr/lib/arm-linux-gnueabihf/libfpengine.a(core.o) does not
/usr/bin/ld: failed to merge target specific data of file /usr/lib/arm-linux-gnueabihf/libfpengine.a(core.o)
/usr/bin/ld: error: rtdemo uses VFP register arguments, /usr/lib/arm-linux-gnueabihf/libfpengine.a(descriptor.o) does not
/usr/bin/ld: failed to merge target specific data of file /usr/lib/arm-linux-gnueabihf/libfpengine.a(descriptor.o)
/usr/bin/ld: error: rtdemo uses VFP register arguments, /usr/lib/arm-linux-gnueabihf/libfpengine.a(io.o) does not
/usr/bin/ld: failed to merge target specific data of file /usr/lib/arm-linux-gnueabihf/libfpengine.a(io.o)
/usr/bin/ld: error: rtdemo uses VFP register arguments, /usr/lib/arm-linux-gnueabihf/libfpengine.a(linux_usbfs.o) does not
/usr/bin/ld: failed to merge target specific data of file /usr/lib/arm-linux-gnueabihf/libfpengine.a(linux_usbfs.o)
collect2: error: ld returned 1 exit status
make: *** [rtdemo] Error 1
Makefile:105: recipe for target ‘rtdemo’ failed
15:42:48: The process «/usr/bin/make» exited with code 2.
Error while building/deploying project rtdemo (kit: Qt 4.8.7 in PATH (qt4))
When executing step «Make»
15:42:48: Elapsed time: 00:02.

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/6/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v —with-pkgversion=’Raspbian 6.3.0-18+rpi1′ —with-bugurl=file:///usr/share/doc/gcc-6/README.Bugs —enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ —prefix=/usr —program-suffix=-6 —program-prefix=arm-linux-gnueabihf- —enable-shared —enable-linker-build-id —libexecdir=/usr/lib —without-included-gettext —enable-threads=posix —libdir=/usr/lib —enable-nls —with-sysroot=/ —enable-clocale=gnu —enable-libstdcxx-debug —enable-libstdcxx-time=yes —with-default-libstdcxx-abi=new —enable-gnu-unique-object —disable-libitm —disable-libquadmath —enable-plugin —with-system-zlib —disable-browser-plugin —enable-java-awt=gtk —enable-gtk-cairo —with-java-home=/usr/lib/jvm/java-1.5.0-gcj-6-armhf/jre —enable-java-home —with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-6-armhf —with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-6-armhf —with-arch-directory=arm —with-ecj-jar=/usr/share/java/eclipse-ecj.jar —with-target-system-zlib —enable-objc-gc=auto —enable-multiarch —disable-sjlj-exceptions —with-arch=armv6 —with-fpu=vfp —with-float=hard —enable-checking=release —build=arm-linux-gnueabihf —host=arm-linux-gnueabihf —target=arm-linux-gnueabihf
Thread model: posix
gcc version 6.3.0 20170516 (Raspbian 6.3.0-18+rpi1)
pi@raspberrypi:

#############################################################################
# Makefile for building: rtdemo
# Generated by qmake (2.01a) (Qt 4.8.7) on: Fri Jan 26 13:39:38 2018
# Project: rtdemo.pro
# Template: app
# Command: /usr/lib/arm-linux-gnueabihf/qt4/bin/qmake -spec /usr/share/qt4/mkspecs/linux-g++ -o Makefile rtdemo.pro
#############################################################################

####### Compiler, tools and options

CC = gcc
CXX = g++
DEFINES = -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
CFLAGS = -march=armv7-a -mfloat-abi=hard -D_REENTRANT $(DEFINES)
CXXFLAGS = -march=armv7-a -mfloat-abi=hard -D_REENTRANT $(DEFINES)
INCPATH = -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -I.
LINK = g++
LFLAGS = -march=armv7-a -mfloat-abi=hard
LIBS = $(SUBLIBS) -L/usr/lib/arm-linux-gnueabihf -L/home/pi/32bit/rtdemo/ -lfpengine -lQtGui -lQtCore -lpthread
AR = ar cqs
RANLIB =
QMAKE = /usr/lib/arm-linux-gnueabihf/qt4/bin/qmake
TAR = tar -cf
COMPRESS = gzip -9f
COPY = cp -f
SED = sed
COPY_FILE = $(COPY)
COPY_DIR = $(COPY) -r
STRIP = strip
INSTALL_FILE = install -m 644 -p
INSTALL_DIR = $(COPY_DIR)
INSTALL_PROGRAM = install -m 755 -p
DEL_FILE = rm -f
SYMLINK = ln -f -s
DEL_DIR = rmdir
MOVE = mv -f
CHK_DIR_EXISTS= test -d
MKDIR = mkdir -p

SOURCES = main.cpp
MainDialog.cpp moc_Maindialog.cpp
OBJECTS = main.o
MainDialog.o
moc_Maindialog.o
DIST = /usr/share/qt4/mkspecs/common/unix.conf
/usr/share/qt4/mkspecs/common/linux.conf
/usr/share/qt4/mkspecs/common/gcc-base.conf
/usr/share/qt4/mkspecs/common/gcc-base-unix.conf
/usr/share/qt4/mkspecs/common/g++-base.conf
/usr/share/qt4/mkspecs/common/g++-unix.conf
/usr/share/qt4/mkspecs/qconfig.pri
/usr/share/qt4/mkspecs/features/qt_functions.prf
/usr/share/qt4/mkspecs/features/qt_config.prf
/usr/share/qt4/mkspecs/features/exclusive_builds.prf
/usr/share/qt4/mkspecs/features/default_pre.prf
/usr/share/qt4/mkspecs/features/release.prf
/usr/share/qt4/mkspecs/features/default_post.prf
/usr/share/qt4/mkspecs/features/shared.prf
/usr/share/qt4/mkspecs/features/unix/gdb_dwarf_index.prf
/usr/share/qt4/mkspecs/features/warn_on.prf
/usr/share/qt4/mkspecs/features/qt.prf
/usr/share/qt4/mkspecs/features/unix/thread.prf
/usr/share/qt4/mkspecs/features/moc.prf
/usr/share/qt4/mkspecs/features/resources.prf
/usr/share/qt4/mkspecs/features/uic.prf
/usr/share/qt4/mkspecs/features/yacc.prf
/usr/share/qt4/mkspecs/features/lex.prf
/usr/share/qt4/mkspecs/features/include_source_dir.prf
rtdemo.pro
QMAKE_TARGET = rtdemo
DESTDIR =
TARGET = rtdemo

first: all
####### Implicit rules

.SUFFIXES: .o .c .cpp .cc .cxx .C

.cpp.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o «$@» «$

Re: VFP register arguments error C++

The linker is telling you that you are compiling for hardfp (floating point values are passed between functions using the floating point registers and the stack) whereas libfpengine.a contains code compiled with softfp (floating point values are passed using integer registers and the stack) or possibly even softfloat (similar to softfp but code compiled with no use of floating point instructions, any floating point operations will make function calls for the C library to handle).

You need a hardfp version of libfpengine.a to link against.

Re: VFP register arguments error C++

Thank you very much for your reply.

File libfpengine.a i received from vendor. Last time i contact them for make new library.
Finger print vendor said library can’t run on raspberry PI 3 just for linux Fedora 32 bit only.
Can i config C++ Complier before build this project ? If it possible. How to config ?
Please recommend me step by step.

Re: VFP register arguments error C++

You can’t mix hardfp with softfp, everything has to use the same abi. The abi specifies exactly how data is passed between functions, e.g. if a function compiled with hardfp makes a function call passing a single float parameter it will store that value in the first floating point register, if the function being called was compiled with softfp then it will be expecting the value to be in the first integer register, things would go south very quickly as you will be effectively passing random values.

All libraries that are used must match, including any shared libraries, so the only effective way to use a softfp or soft float library is to have the entire system compiled the same way.

If the vendor is unwilling to provide a hardfp version then your only options are to find another vendor that will or switch to a distro that is compiled for softfp. Though I’d want to know why they say the RPi3 is unable to run it, the only reason I can think of would be if it relied on x86 assembly and they were unwilling to re-write that part in Arm or even C) but if they have supplied you with an Arm compiled library.

Источник

This article is not about running Linux on ARM.

It is about compiling code for an ARM processor, taking advantage of its FPU.

Prepare the toolchain

Building with crossdev

If nanolib, hardfloat and C++ support are not important, you may proceed to building.

Building

We use crossdev to create a local ebuild repo with symlinks to your «regular» Gentoo ebuild repository.
The ebuilds are thus the same as for your x86_64 system, but are now used for cross-compiling to ARM.

The simplest command to build a toolchain with gcc’s the default target configuration:

root #crossdev --target arm-none-eabi

Depending on your CPU, this may not be enough though:

Important
Since there’s many differences between the ARM CPU families, your gcc needs to support them.

To see currently available targets:

user $arm-none-eabi-gcc --print-multi-lib

This output is also used by newlib at buildtime to create suitable libc binaries!
For example, if you use a Thumb-only Cortex-M CPU and no thumb-only libc (or libc_nano) archives available — you may encounter illegal instructions on your CPU since it tries to execute non-thumb instructions!

You can use with-multilib-list to support more target CPUs.

There are several profiles to enable ARM CPU targets in the gcc source code.
This feature is documented in gccsource/INSTALL/configure.html or info gccinstall -n Configuration searching for with-multilib-list:

ARM GCC CPU profiles

profile_name CPU family gcc source file
aprofile Cortex-A CPUs gcc/config/arm/t-aprofile
rmprofile Cortex-R and Cortex-M CPUs gcc/config/arm/t-rmprofile

These can be set (also multiple profiles with comma separation) when installing gcc with --with-multilib-list

root #crossdev --target arm-none-eabi --genv 'EXTRA_ECONF="--with-multilib-list=$profile_name"'

Enable C++ support

Just enable the cxx USE flag in your cross compiler package cross-arm-none-eabi/gcc.

After you set the flag, rebuild the package.

Enable nanolib support

To enable the nano C library, cross-arm-none-eabi/newlib needs the nano USE flag.

Create a ARM gdb

Either build sys-devel/gdb with multitarget USE flag, or emerge the dedicated cross-arm-none-eabi/gdb.

Build for specific CPUs

You probably don’t need this when you installed the toolchain with gcc rmprofile (see above).
Using it, your toolchain supports all various sub-architectures and flavors with floating point units and without.

To build toolchains for specific CPUs:

Quoting Embedded Artistry[1]:

Note

SOFT

The soft option enables full software floating-point support. The compiler will not generate FPU instructions in soft mode. Instead, the compiler generates library calls to handle floating point operations. The compiler also generates prologue and epilogue functions to pass floating-point arguments (float, double) into integer registers (one for float, two for double).

SOFTFP

The softfp option is a hybrid between hard and soft. The compiler is allowed to generate hardware floating-point instructions, but it still uses the soft-float ABI. Like with soft, the compiler generates functions to pass floating-point arguments to integer registers. Depending on the chosen FPU (-mfpu), the compiler can choose when to use emulated or hardware floating-point instructions.

HARD

The hard option enables full hardware floating-point support. The compiler generates floating-point instructions and uses the floating-point ABI. Floating-point function arguments are passed directly into FPU registers. Since there are no function prologue or epilogue requirements, no pipeline stalls are incurred with floating-point arguments. The hard float option will provide you with the highest performance, but does limit your compiled binary to the selected FPU.

When using the hard option, you must define an FPU using -mfpu.

It’s a bit tricky to enable hard floating point targets.
One way to enable it, supposing the target processor has an FPU unit, is the following:

root #crossdev --target arm-hardfloat-eabi --env

           'EXTRA_ECONF="--with-cpu=cortex-m4 
                         --with-float-abi=hard 
                         --with-mode=thumb"'

Analyzing the above command, we replaced -none- with -hardfloat- in the cross-compile target speficier.

As for the EXTRA_ECONF flags, they were copied from a readme.txt file found in the ARM toolchain source’s root or the following path for the pre-built version: share/doc/gcc-arm-none-eabi/. Here are the contents of the readme.txt for convenience:

user $cat readme.txt

--------------------------------------------------------------------------
| Arm core   | Command Line Options                       | multilib     |
|------------|--------------------------------------------|--------------|
| Cortex-M0+ | -mthumb -mcpu=cortex-m0plus                | thumb        |
| Cortex-M0  | -mthumb -mcpu=cortex-m0                    | /v6-m        |
| Cortex-M1  | -mthumb -mcpu=cortex-m1                    |              |
|------------|--------------------------------------------|--------------|
| Cortex-M3  | -mthumb -mcpu=cortex-m3                    | thumb        |
|            |                                            | /v7-m        |
|------------|--------------------------------------------|--------------|
| Cortex-M4  | -mthumb -mcpu=cortex-m4                    | thumb        |
| (No FP)    |                                            | /v7e-m       |
|------------|--------------------------------------------|--------------|
| Cortex-M4  | -mthumb -mcpu=cortex-m4 -mfloat-abi=softfp | thumb        |
| (Soft FP)  |                                            | /v7e-m+fp    |
|            |                                            | /softfp      |
|------------|--------------------------------------------|--------------|
| Cortex-M4  | -mthumb -mcpu=cortex-m4 -mfloat-abi=hard   | thumb        |
| (Hard FP)  |                                            | /v7e-m+fp    |
|            |                                            | /hard        |
|------------|--------------------------------------------|--------------|
| Cortex-M7  | -mthumb -mcpu=cortex-m7                    | thumb        |
| (No FP)    |                                            | /v7e-m       |
|            |                                            | /nofp        |
|------------|--------------------------------------------|--------------|
| Cortex-M7  | -mthumb -mcpu=cortex-m7 -mfloat-abi=softfp | thumb        |
| (Soft FP)  |                                            | /v7e-m+dp    |
|            |                                            | /softfp      |
|------------|--------------------------------------------|--------------|
| Cortex-M7  | -mthumb -mcpu=cortex-m7 -mfloat-abi=hard   | thumb        |
| (Hard FP)  | -mfpu=fpv5-sp-d16                          | /v7e-m+dp    |
|            |                                            | /hard        |
|------------|--------------------------------------------|--------------|
| Cortex-M23 | -mthumb -mcpu=cortex-m23                   | thumb        |
|            |                                            | /v8-m.base   |
|------------|--------------------------------------------|--------------|
| Cortex-M33 | -mthumb -mcpu=cortex-m33                   | thumb        |
|  (No FP)   |                                            | /v8-m.main   |
|            |                                            | /nofp        |
|------------|--------------------------------------------|--------------|
| Cortex-M33 | -mthumb -mcpu-cortex-m33                   | thumb        |
| (Soft FP)  | -mfloat-abi=softfp                         | /v8-m.main+fp|
|            |                                            | /softfp      |
|------------|--------------------------------------------|--------------|
| Cortex-M33 | -mthumb -mcpu=cortex-m33                   | thumb        |
| (Hard FP)  | -mfloat-abi=hard                           | /v8-m.main+fp|
|            |                                            | /hard        |
|------------|--------------------------------------------|--------------|
| Cortex-R4  | [-mthumb] -mcpu=cortex-r?                  | thumb        |
| Cortex-R5  |                                            | /v7          |
| Cortex-R7  |                                            | /nofp        |
| Cortex-R8  |                                            |              |
| (No FP)    |                                            |              |
|------------|--------------------------------------------|--------------|
| Cortex-R5  | [-mthumb] -mcpu=cortex-r?                  | thumb        |
| Cortex-R7  | -mfloat-abi=softfp                         | /v7+fp       |
| Cortex-R8  |                                            | /softfp      |
| (Soft FP)  |                                            |              |
|------------|--------------------------------------------|--------------|
| Cortex-R5  | [-mthumb] -mcpu=cortex-r?                  | thumb        |
| Cortex-R7  | -mfloat-abi=hard                           | /v7+fp       |
| Cortex-R8  |                                            | /hard        |
| (Hard FP)  |                                            |              |
|------------|--------------------------------------------|--------------|
| Cortex-R52 | [-mthumb] -mcpu=cortex-r52                 | thumb        |
| (No FP)    |                                            | /v7          |
|            |                                            | /nofp        |
|------------|--------------------------------------------|--------------|
| Cortex-R52 | [-mthumb] -mcpu=cortex-r52                 | thumb        |
| (Soft FP)  | -mfloat-abi=softfp                         | /v7+fp       |
|            |                                            | /softfp      |
|------------|--------------------------------------------|--------------|
| Cortex-R52 | [-mthumb] -mcpu=cortex-r52                 | thumb        |
| (Soft FP)  | -mfloat-abi=hard                           | /v7+fp       |
|            |                                            | /hard        |
|------------|--------------------------------------------|--------------|
| Cortex-A*  | [-mthumb] -mcpu=cortex-a*                  | thumb        |
| (No FP)    |                                            | /v7          |
|            |                                            | /nofp        |
|------------|--------------------------------------------|--------------|
| Cortex-A*  | [-mthumb] -mcpu=cortex-a*                  | thumb        |
| (Soft FP)  | -mfloat-abi=softfp                         | /v7+fp       |
|            |                                            | /softfp      |
|------------|--------------------------------------------|--------------|
| Cortex-A*  | [-mthumb] -mcpu=cortex-a*                  | thumb        |
| (Hard FP)  | -mfloat-abi=hard                           | /v7+fp       |
|            |                                            | /hard        |
--------------------------------------------------------------------------

Using the pre-built toolchain

A pre-built toolchain is the GNU Arm Embedded Toolchain. Remember to update your PATH by prepending the location of the toolchain’s bin folder:

user $export PATH="/path/to/toolchain/bin:$PATH"

Writing code

Error message: …. uses VFP register arguments … does not

This probably means that some of the libraries being linked, were compiled with hardfloat (-mfloat=hardfloat) while others with floatfp or float. This can also happen when the compiler was compiled in an opposite to the code manner.

Error message: undefined reference to `__stack_chk_guard’

The __stack_chk* symbols are defined by libc.a and are used for stack smashing protection.

In the case of compilation errors like undefined reference to `__stack_chk_guard', you can disable stack smashing guards by disabling the ssp USE for cross-arm*/gcc.

Using Mbed

Mbed is an online platform for writing and compiling code for various boards. It has an export function that enables retrieving the said code including a Makefile and the imported libraries.

Note
If arm-hardfloat-eabi or -mfloat=hard is used, the Makefile must be adapted since it uses arm-none-eabi and -march=floatfp.

Important
If instead of the mbed-os library, the mbed one is included, being precompiled, it might not link against hardfloatly compiled code.

Missing mbed_config.h

If compilation fails with a missing mbed_config.h file, Makefile needs to be adapted with a point to the root folder’s mbed_config.h file.

Using STM32CubeMX

STM32CubeMX can be used to initialize code. In provides a graphical user interface to choose pin modes and clocks.

Using pre-built toolchain’s samples

The pre-built GNU Arm Embedded Toolchain, comes with code samples and Makefiles.

See also

External resources

  1. Embedded Artistry explains the difference between hard, softfp and soft (the three ARM floating point compiler options).
  2. Discussion on the problems enabling hardfloat.
  3. Another similar discussion in the Gentoo forums.

Referencies

  1. Phillip Johnston. «Demystifying ARM Floating Point Compiler Options», October 11, 2017. Retrieved on 2019-09-30

Hi

I try to build project finger print scan project file received from finger print vendor develop by use QT creator and C++ on Linux fedora 32 bit
when i test on raspberry pi 3 while building project got error message at below.
Every one can help me for this error ?

15:42:47: Running steps for project rtdemo…
15:42:47: Configuration unchanged, skipping qmake step.
15:42:47: Starting: «/usr/bin/make»
g++ -march=armv7-a -mfloat-abi=hard -o rtdemo main.o MainDialog.o moc_Maindialog.o -L/usr/lib/arm-linux-gnueabihf -L/home/pi/32bit/rtdemo/ -lfpengine -lQtGui -lQtCore -lpthread
/usr/bin/ld: error: rtdemo uses VFP register arguments, /usr/lib/arm-linux-gnueabihf/libfpengine.a(fpengine.o) does not
/usr/bin/ld: failed to merge target specific data of file /usr/lib/arm-linux-gnueabihf/libfpengine.a(fpengine.o)
/usr/bin/ld: error: rtdemo uses VFP register arguments, /usr/lib/arm-linux-gnueabihf/libfpengine.a(fprotocol.o) does not
/usr/bin/ld: failed to merge target specific data of file /usr/lib/arm-linux-gnueabihf/libfpengine.a(fprotocol.o)
/usr/bin/ld: error: rtdemo uses VFP register arguments, /usr/lib/arm-linux-gnueabihf/libfpengine.a(fpdevice.o) does not
/usr/bin/ld: failed to merge target specific data of file /usr/lib/arm-linux-gnueabihf/libfpengine.a(fpdevice.o)
/usr/bin/ld: error: rtdemo uses VFP register arguments, /usr/lib/arm-linux-gnueabihf/libfpengine.a(pusb-linux.o) does not
/usr/bin/ld: failed to merge target specific data of file /usr/lib/arm-linux-gnueabihf/libfpengine.a(pusb-linux.o)
/usr/bin/ld: error: rtdemo uses VFP register arguments, /usr/lib/arm-linux-gnueabihf/libfpengine.a(serial.o) does not
/usr/bin/ld: failed to merge target specific data of file /usr/lib/arm-linux-gnueabihf/libfpengine.a(serial.o)
/usr/bin/ld: error: rtdemo uses VFP register arguments, /usr/lib/arm-linux-gnueabihf/libfpengine.a(sync.o) does not
/usr/bin/ld: failed to merge target specific data of file /usr/lib/arm-linux-gnueabihf/libfpengine.a(sync.o)
/usr/bin/ld: error: rtdemo uses VFP register arguments, /usr/lib/arm-linux-gnueabihf/libfpengine.a(core.o) does not
/usr/bin/ld: failed to merge target specific data of file /usr/lib/arm-linux-gnueabihf/libfpengine.a(core.o)
/usr/bin/ld: error: rtdemo uses VFP register arguments, /usr/lib/arm-linux-gnueabihf/libfpengine.a(descriptor.o) does not
/usr/bin/ld: failed to merge target specific data of file /usr/lib/arm-linux-gnueabihf/libfpengine.a(descriptor.o)
/usr/bin/ld: error: rtdemo uses VFP register arguments, /usr/lib/arm-linux-gnueabihf/libfpengine.a(io.o) does not
/usr/bin/ld: failed to merge target specific data of file /usr/lib/arm-linux-gnueabihf/libfpengine.a(io.o)
/usr/bin/ld: error: rtdemo uses VFP register arguments, /usr/lib/arm-linux-gnueabihf/libfpengine.a(linux_usbfs.o) does not
/usr/bin/ld: failed to merge target specific data of file /usr/lib/arm-linux-gnueabihf/libfpengine.a(linux_usbfs.o)
collect2: error: ld returned 1 exit status
make: *** [rtdemo] Error 1
Makefile:105: recipe for target ‘rtdemo’ failed
15:42:48: The process «/usr/bin/make» exited with code 2.
Error while building/deploying project rtdemo (kit: Qt 4.8.7 in PATH (qt4))
When executing step «Make»
15:42:48: Elapsed time: 00:02.

pi@raspberrypi:~ $ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/6/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v —with-pkgversion=’Raspbian 6.3.0-18+rpi1′ —with-bugurl=file:///usr/share/doc/gcc-6/README.Bugs —enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ —prefix=/usr —program-suffix=-6 —program-prefix=arm-linux-gnueabihf- —enable-shared —enable-linker-build-id —libexecdir=/usr/lib —without-included-gettext —enable-threads=posix —libdir=/usr/lib —enable-nls —with-sysroot=/ —enable-clocale=gnu —enable-libstdcxx-debug —enable-libstdcxx-time=yes —with-default-libstdcxx-abi=new —enable-gnu-unique-object —disable-libitm —disable-libquadmath —enable-plugin —with-system-zlib —disable-browser-plugin —enable-java-awt=gtk —enable-gtk-cairo —with-java-home=/usr/lib/jvm/java-1.5.0-gcj-6-armhf/jre —enable-java-home —with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-6-armhf —with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-6-armhf —with-arch-directory=arm —with-ecj-jar=/usr/share/java/eclipse-ecj.jar —with-target-system-zlib —enable-objc-gc=auto —enable-multiarch —disable-sjlj-exceptions —with-arch=armv6 —with-fpu=vfp —with-float=hard —enable-checking=release —build=arm-linux-gnueabihf —host=arm-linux-gnueabihf —target=arm-linux-gnueabihf
Thread model: posix
gcc version 6.3.0 20170516 (Raspbian 6.3.0-18+rpi1)
pi@raspberrypi:~ $

#############################################################################
# Makefile for building: rtdemo
# Generated by qmake (2.01a) (Qt 4.8.7) on: Fri Jan 26 13:39:38 2018
# Project: rtdemo.pro
# Template: app
# Command: /usr/lib/arm-linux-gnueabihf/qt4/bin/qmake -spec /usr/share/qt4/mkspecs/linux-g++ -o Makefile rtdemo.pro
#############################################################################

####### Compiler, tools and options

CC = gcc
CXX = g++
DEFINES = -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
CFLAGS = -march=armv7-a -mfloat-abi=hard -D_REENTRANT $(DEFINES)
CXXFLAGS = -march=armv7-a -mfloat-abi=hard -D_REENTRANT $(DEFINES)
INCPATH = -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -I.
LINK = g++
LFLAGS = -march=armv7-a -mfloat-abi=hard
LIBS = $(SUBLIBS) -L/usr/lib/arm-linux-gnueabihf -L/home/pi/32bit/rtdemo/ -lfpengine -lQtGui -lQtCore -lpthread
AR = ar cqs
RANLIB =
QMAKE = /usr/lib/arm-linux-gnueabihf/qt4/bin/qmake
TAR = tar -cf
COMPRESS = gzip -9f
COPY = cp -f
SED = sed
COPY_FILE = $(COPY)
COPY_DIR = $(COPY) -r
STRIP = strip
INSTALL_FILE = install -m 644 -p
INSTALL_DIR = $(COPY_DIR)
INSTALL_PROGRAM = install -m 755 -p
DEL_FILE = rm -f
SYMLINK = ln -f -s
DEL_DIR = rmdir
MOVE = mv -f
CHK_DIR_EXISTS= test -d
MKDIR = mkdir -p

####### Output directory

OBJECTS_DIR = ./

####### Files

SOURCES = main.cpp
MainDialog.cpp moc_Maindialog.cpp
OBJECTS = main.o
MainDialog.o
moc_Maindialog.o
DIST = /usr/share/qt4/mkspecs/common/unix.conf
/usr/share/qt4/mkspecs/common/linux.conf
/usr/share/qt4/mkspecs/common/gcc-base.conf
/usr/share/qt4/mkspecs/common/gcc-base-unix.conf
/usr/share/qt4/mkspecs/common/g++-base.conf
/usr/share/qt4/mkspecs/common/g++-unix.conf
/usr/share/qt4/mkspecs/qconfig.pri
/usr/share/qt4/mkspecs/features/qt_functions.prf
/usr/share/qt4/mkspecs/features/qt_config.prf
/usr/share/qt4/mkspecs/features/exclusive_builds.prf
/usr/share/qt4/mkspecs/features/default_pre.prf
/usr/share/qt4/mkspecs/features/release.prf
/usr/share/qt4/mkspecs/features/default_post.prf
/usr/share/qt4/mkspecs/features/shared.prf
/usr/share/qt4/mkspecs/features/unix/gdb_dwarf_index.prf
/usr/share/qt4/mkspecs/features/warn_on.prf
/usr/share/qt4/mkspecs/features/qt.prf
/usr/share/qt4/mkspecs/features/unix/thread.prf
/usr/share/qt4/mkspecs/features/moc.prf
/usr/share/qt4/mkspecs/features/resources.prf
/usr/share/qt4/mkspecs/features/uic.prf
/usr/share/qt4/mkspecs/features/yacc.prf
/usr/share/qt4/mkspecs/features/lex.prf
/usr/share/qt4/mkspecs/features/include_source_dir.prf
rtdemo.pro
QMAKE_TARGET = rtdemo
DESTDIR =
TARGET = rtdemo

first: all
####### Implicit rules

.SUFFIXES: .o .c .cpp .cc .cxx .C

.cpp.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o «$@» «$<«

.cc.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o «$@» «$<«

.cxx.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o «$@» «$<«

.C.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o «$@» «$<«

.c.o:
$(CC) -c $(CFLAGS) $(INCPATH) -o «$@» «$<«

####### Build rules

all: Makefile $(TARGET)

$(TARGET): /home/pi/32bit/rtdemo/libfpengine.a ui_maindialog.h $(OBJECTS)
$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)

Makefile: rtdemo.pro /usr/share/qt4/mkspecs/linux-g++/qmake.conf /usr/share/qt4/mkspecs/common/unix.conf
/usr/share/qt4/mkspecs/common/linux.conf
/usr/share/qt4/mkspecs/common/gcc-base.conf
/usr/share/qt4/mkspecs/common/gcc-base-unix.conf
/usr/share/qt4/mkspecs/common/g++-base.conf
/usr/share/qt4/mkspecs/common/g++-unix.conf
/usr/share/qt4/mkspecs/qconfig.pri
/usr/share/qt4/mkspecs/features/qt_functions.prf
/usr/share/qt4/mkspecs/features/qt_config.prf
/usr/share/qt4/mkspecs/features/exclusive_builds.prf
/usr/share/qt4/mkspecs/features/default_pre.prf
/usr/share/qt4/mkspecs/features/release.prf
/usr/share/qt4/mkspecs/features/default_post.prf
/usr/share/qt4/mkspecs/features/shared.prf
/usr/share/qt4/mkspecs/features/unix/gdb_dwarf_index.prf
/usr/share/qt4/mkspecs/features/warn_on.prf
/usr/share/qt4/mkspecs/features/qt.prf
/usr/share/qt4/mkspecs/features/unix/thread.prf
/usr/share/qt4/mkspecs/features/moc.prf
/usr/share/qt4/mkspecs/features/resources.prf
/usr/share/qt4/mkspecs/features/uic.prf
/usr/share/qt4/mkspecs/features/yacc.prf
/usr/share/qt4/mkspecs/features/lex.prf
/usr/share/qt4/mkspecs/features/include_source_dir.prf
/usr/lib/arm-linux-gnueabihf/libQtGui.prl
/usr/lib/arm-linux-gnueabihf/libQtCore.prl
$(QMAKE) -spec /usr/share/qt4/mkspecs/linux-g++ -o Makefile rtdemo.pro
/usr/share/qt4/mkspecs/common/unix.conf:
/usr/share/qt4/mkspecs/common/linux.conf:
/usr/share/qt4/mkspecs/common/gcc-base.conf:
/usr/share/qt4/mkspecs/common/gcc-base-unix.conf:
/usr/share/qt4/mkspecs/common/g++-base.conf:
/usr/share/qt4/mkspecs/common/g++-unix.conf:
/usr/share/qt4/mkspecs/qconfig.pri:
/usr/share/qt4/mkspecs/features/qt_functions.prf:
/usr/share/qt4/mkspecs/features/qt_config.prf:
/usr/share/qt4/mkspecs/features/exclusive_builds.prf:
/usr/share/qt4/mkspecs/features/default_pre.prf:
/usr/share/qt4/mkspecs/features/release.prf:
/usr/share/qt4/mkspecs/features/default_post.prf:
/usr/share/qt4/mkspecs/features/shared.prf:
/usr/share/qt4/mkspecs/features/unix/gdb_dwarf_index.prf:
/usr/share/qt4/mkspecs/features/warn_on.prf:
/usr/share/qt4/mkspecs/features/qt.prf:
/usr/share/qt4/mkspecs/features/unix/thread.prf:
/usr/share/qt4/mkspecs/features/moc.prf:
/usr/share/qt4/mkspecs/features/resources.prf:
/usr/share/qt4/mkspecs/features/uic.prf:
/usr/share/qt4/mkspecs/features/yacc.prf:
/usr/share/qt4/mkspecs/features/lex.prf:
/usr/share/qt4/mkspecs/features/include_source_dir.prf:
/usr/lib/arm-linux-gnueabihf/libQtGui.prl:
/usr/lib/arm-linux-gnueabihf/libQtCore.prl:
qmake: FORCE
@$(QMAKE) -spec /usr/share/qt4/mkspecs/linux-g++ -o Makefile rtdemo.pro

dist:
@$(CHK_DIR_EXISTS) .tmp/rtdemo1.0.0 || $(MKDIR) .tmp/rtdemo1.0.0
$(COPY_FILE) —parents $(SOURCES) $(DIST) .tmp/rtdemo1.0.0/ && $(COPY_FILE) —parents Maindialog.h fpengine.h .tmp/rtdemo1.0.0/ && $(COPY_FILE) —parents main.cpp MainDialog.cpp .tmp/rtdemo1.0.0/ && $(COPY_FILE) —parents maindialog.ui .tmp/rtdemo1.0.0/ && (cd `dirname .tmp/rtdemo1.0.0` && $(TAR) rtdemo1.0.0.tar rtdemo1.0.0 && $(COMPRESS) rtdemo1.0.0.tar) && $(MOVE) `dirname .tmp/rtdemo1.0.0`/rtdemo1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/rtdemo1.0.0

clean:compiler_clean
-$(DEL_FILE) $(OBJECTS)
-$(DEL_FILE) *~ core *.core

####### Sub-libraries

distclean: clean
-$(DEL_FILE) $(TARGET)
-$(DEL_FILE) Makefile

check: first

mocclean: compiler_moc_header_clean compiler_moc_source_clean

mocables: compiler_moc_header_make_all compiler_moc_source_make_all

compiler_moc_header_make_all: moc_Maindialog.cpp
compiler_moc_header_clean:
-$(DEL_FILE) moc_Maindialog.cpp
moc_Maindialog.cpp: Maindialog.h
/usr/lib/arm-linux-gnueabihf/qt4/bin/moc $(DEFINES) $(INCPATH) Maindialog.h -o moc_Maindialog.cpp

compiler_rcc_make_all:
compiler_rcc_clean:
compiler_image_collection_make_all: qmake_image_collection.cpp
compiler_image_collection_clean:
-$(DEL_FILE) qmake_image_collection.cpp
compiler_moc_source_make_all:
compiler_moc_source_clean:
compiler_uic_make_all: ui_maindialog.h
compiler_uic_clean:
-$(DEL_FILE) ui_maindialog.h
ui_maindialog.h: maindialog.ui
/usr/lib/arm-linux-gnueabihf/qt4/bin/uic maindialog.ui -o ui_maindialog.h

compiler_yacc_decl_make_all:
compiler_yacc_decl_clean:
compiler_yacc_impl_make_all:
compiler_yacc_impl_clean:
compiler_lex_make_all:
compiler_lex_clean:
compiler_clean: compiler_moc_header_clean compiler_uic_clean

####### Compile

main.o: main.cpp Maindialog.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp

MainDialog.o: MainDialog.cpp Maindialog.h
ui_maindialog.h
fpengine.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o MainDialog.o MainDialog.cpp

moc_Maindialog.o: moc_Maindialog.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_Maindialog.o moc_Maindialog.cpp

####### Install

install: FORCE

uninstall: FORCE

FORCE:

У меня была эта проблема в течение последних нескольких дней, и я не могу понять, что на самом деле здесь происходит, или в чем проблема.

У меня есть make-файл с этими флагами:

CC = arm-linux-gnueabihf-gcc-4.6
FLAGS = -O3 -march=armv7-a -mtune=cortex-a9 -mfpu=neon -ftree-vectorize -mfloat-abi=softfp -std=gnu99

У меня есть библиотека в файле .a, в котором есть некоторые объектные файлы, все, что мне нужно сделать, это связать их с моим исполняемым файлом. Я знаю прототипы и все такое, единственное, на что жалуется, это следующее:

/usr/bin/ld: error: *EXECUTABLE* uses VFP register arguments, *OBJECTFILE* does not
/usr/bin/ld: failed to merge target specific data of file *OBJECTFILE*

Когда я не использую -mfloat-abi = softfp, я получаю еще одну ошибку, связанную с регистрами с плавающей запятой.

Кто-нибудь знает, что вызывает это, и что я могу сделать, чтобы исправить это, например, сделать так, чтобы мой исполняемый файл не использовал аргументы виртуального регистра с плавающей запятой?

x@x:~/Desktop/perf_test$ make
arm-linux-gnueabihf-gcc-4.6 -c -O3 -march=armv7-a -mtune=cortex-a9 -mfpu=neon -ftree-vectorize -std=gnu99 -mfloat-abi=softfp  perf_test.c ../baseline/util.c
arm-linux-gnueabihf-gcc-4.6 -o perf_test perf_test.o util.o  ../baseline/lib.a
/usr/bin/ld: error: perf_test uses VFP register arguments, perf_test.o does not
/usr/bin/ld: failed to merge target specific data of file perf_test.o
/usr/bin/ld: error: perf_test uses VFP register arguments, util.o does not
/usr/bin/ld: failed to merge target specific data of file util.o
/usr/bin/ld: error: perf_test uses VFP register arguments, ../baseline/lib.a(a.o) does not
/usr/bin/ld: failed to merge target specific data of file ../baseline/lib.a(a.o)
/usr/bin/ld: error: perf_test uses VFP register arguments, ../baseline/lib.a(b.o) does not
/usr/bin/ld: failed to merge target specific data of file ../baseline/lib.a(b.o)
/usr/bin/ld: error: perf_test uses VFP register arguments, ../baseline/lib.a(c.o) does not
/usr/bin/ld: failed to merge target specific data of file ../baseline/lib.a(c.o)
/usr/bin/ld: error: perf_test uses VFP register arguments, ../baseline/lib.a(d.o) does not
/usr/bin/ld: failed to merge target specific data of file ../baseline/lib.a(d.o)
/usr/bin/ld: error: perf_test uses VFP register arguments, ../baseline/lib.a(e.o) does not
/usr/bin/ld: failed to merge target specific data of file ../baseline/lib.a(e.o)
/usr/bin/ld: error: perf_test uses VFP register arguments, ../baseline/lib.a(f.o) does not
/usr/bin/ld: failed to merge target specific data of file ../baseline/lib.a(f.o)
collect2: ld returned 1 exit status
make: *** [perf_test] Error 1

Loading…

Generic questions about System Workbench for STM32

Questions

  1. How to automatically save modified file before build ?
  2. Why are my folders not included when building the project ?
  3. Why do I have a VFP register error while building my project ?
  4. How to automatically get notification when new updates are available ?
  5. Where can I get source code for the GPL components of System Workbench
  6. Why did the IDE complains that SysTick_IRQn can’t be resolved when my project compile cleanly?
  7. The «Target» entry in project contextual menu does not appear anymore, how can I get it back ?

Answers


Question:

How to automatically save modified file before build ?

Answer 
By default, you have to save your file before building it with the latest modification. To automatically save before build, go to Window > Preferences > General > Workspace and check the Save automatically before build box then click on the Apply button.


Question:

Why are my folders not included when building the project ?

Answer 

Only the source folders (with the “C” symbol displayed on the folder icon) are scanned for the build. The non-source folders are excluded from the build.

To create a new source folder or convert an existing folder into source folder, Go to the menu File or the contextual menu in the project explorer, then select New > Source Folder.

You can also open the build properties dialog for your folder (folder >> Properties >> C/C++ Build) and uncheck the Exclude resource from build checkbox.


Question:

Why do I have a VFP register error while building my project ?

Answer 

You probably have created a project which use a static library. If an error like “error: ./source.o uses VFP register arguments, myproject.elf does not” is displayed, it means that the project and the static library have not been built with the same floating-point options (-mfloat-abi and -mfpu).

Please, ensure the build options between your executable project and the libraries are consistent in Properties > C/C++ Build > Settings > Tools Settings > MCU Settings.


Question:

How to automatically get notification when new updates are available ?

Answer 
Instead of manually checking for updates, you can check an option to get notified when a new update has been release. Go to Windows > Preferences > Install/Update > Automatic Updates, then check the “Automatically find new updates and notify me” box.


Question:

Where can I get source code for the GPL components of System Workbench

Answer 

System Workbench for STM32 contains a few GPL-licensed components, like the compiler or the debugger.

For the C and C++ compilers and debuggers, as well as the C library, we use the Linaro-provided version of arm-none-gnueabi; you can get both the binary distribution we use and the source code from the Linaro web site at https://www.linaro.org/downloads/Question (the last section on the web page directs you to the latest version, which is usually the one we use).

The only component for which we modify the source code is the OpenOCD debug interface, where we need to add advanced support features to be able to debug the newest STM32 chips and boards. We use patches developped by STMicroelectronics, that they in parallel submit for inclusion in th emailnine OpenOCD source code; however we can’t wait for their inclusion so need to recompile OpenOCD by ourselves.

For OpenOCD we thus maintain our own GIT repository that may be cloned freely to get the current source code base we use. You can clone it by:

git clone git://git.ac6.fr/openocdQuestion

There are tags for all the releases of System Workbench for STM32 where we need to use modified source code; these are named

ac6_1.3.0.20150724

ac6_1.4.0.20150917


Question:

Why did the IDE complains that SysTick_IRQn can’t be resolved when my project compile cleanly?

Answer 

The problem is due to the fact that, in the HAL files, this symbol (and others) are defined by a lot of files (one per supported MCU), only one of them being effectively used in your project (the one describing the MCU you selected).

When trying to resolve this symbol (to be able to display its value) System Workbench then do not know which one to choose, as these files content are not conditionnaly compiled; th efile is rather conditionnaly included by other files.

Thus this symbol cannot be resolved, not because the indexer do not find it, but because it find too many versions of this symbol, in several files…

To solve this error, you should request that System Workbench do not parse files that are not used by your project, by opening th eindexer properties dialog (project >> Properties >> C/C++ General >> Indexer) then check the Enable project specific settings checkbox and uncheck the Index unused headers checkbox.

You may also suppress indexing of unused headers for all projects that do not have project-specific indexer settings by modifying the workspace settings at Window >> Preferences >> C/C++ >> Indexer.

Note that when you create projects using th eSystem Workbench for STM32 wizard, this option is automatically set for the firmware librery projects; however CubeMX currently do not set it in its generated projects.


Question:

The «Target» entry in project contextual menu does not appear anymore, how can I get it back ?

Answer 

The “Target” entry provides direct program and chip erase. It is only accessible from the “Project Explorer” view. For some reason, you might have switch this view to the “Project Navigation” view which is really similar but does not provide same features.

You can restore the normal perspective content by clicking on “Windows >> Perspective >> Reset Perspective” if you don’t know how to display again the default views.

Search:

Newest Forum Posts

  1. Uxe GPIO port defs in variables?, 2023-02-08 17:22
  2. No src or files created for new MCU Executable project by woprbyte, 2023-01-31 17:15
  3. Installation of Workbench on Mac 10.13.6 by laikenwade24, 2023-01-26 23:26
  4. datebest.net — visit website and win smartphone! by ylrao25, 2023-01-17 21:02
  5. @pump_upp — best crypto pumps on telegram ! by Owen27, 2023-01-17 18:10
  6. CAN1_RX0_IRQHandler never fires by rdwdivx, 2022-12-30 06:25
  7. problems installing System Workbench for STM32 on macOS Monterey. by Luca Strano, 2022-12-22 14:47
  8. problems installing System Workbench for STM32 on macOS Monterey. by tang, 2022-12-21 17:51
  9. problems installing System Workbench for STM32 on macOS Monterey. by Luca Strano, 2022-12-20 23:54
  10. System Workbench for STM32 detected as ransomware by firewall by choliver, 2022-12-13 02:05

Newest FAQs

Last-Modified Blogs

Понравилась статья? Поделить с друзьями:
  • Userinit exe ошибка приложения
  • Userdel returned error code 8
  • Userassembly dll genshin impact ошибка
  • User32 dll ошибка windows 7
  • User validation error как переводится