Unable to solve error ".o uses VFP register arguments, .elf does not"

Ah, the problem was that the flags have to be set accross all construction environments. Also it must be hard float.

Import("env")
Import("projenv")

for e in [env, projenv, DefaultEnvironment()]:
    e.Append(
        CCFLAGS=[
            "-mfloat-abi=hard",
            "-mfpu=fpv5-sp-d16",
        ],
        LINKFLAGS=[
            "-mfloat-abi=hard",
            "-mfpu=fpv5-sp-d16",
        ]
    )

Worked fine with the basic most

[env:nucleo_f756zg]
platform = ststm32
board = nucleo_f756zg
framework = stm32cube
build_flags =
    -Isrc/BSEC/Inc
    -Lsrc/BSEC
    -lalgobsec
extra_scripts = SetFlags.py

and a src/main.c of just

#include <stm32f7xx_hal.h>
/* BSEC header files are available in the inc/ folder of the release package */
#include "bsec_interface.h"
#include "bsec_datatypes.h"

int main() {
    bsec_version_t ver;
    bsec_get_version(&ver);
    return 0;
}

grafik

1 Like