我该如何教有关__fp16的Visual Studio Code?

问题描述

我有一个用arm-none-eabi编译器编译的Cortex-M4F微控制器的makefile项目,并且我将__fp16存储类型用于某些浮点数。我正在使用Visual Studio Code编辑代码,并使用makefile进行编译。

我的代码可以很好地编译,但是Visual Studio Code无法识别__fp16存储类型。

Enter image description here

我正在使用c_cpp_properties.json配置编译器和compile_commands.json。

{
    "configurations": [
        {
            "name": "Mac","includePath": [
                "${workspaceFolder}/**","${workspaceFolder}/../**","/usr/local/FreeRTOSv10.2.0/FreeRTOS/**"
            ],"defines": [
                "DEBUG=1","FIRMWARE_VERSION=\"DUMMY\""
            ],"compilerPath": "/usr/local/bin/gcc-arm-none-eabi-8-2018-q4-major/bin/arm-none-eabi-gcc","compilerArgs": [
                "-mcpu=cortex-m4","-march=armv7+fp","-mfpu=fpv4-sp-d16","-mfloat-abi=hard","-mfp16-format=ieee"
            ],"intelliSenseMode": "gcc-arm","cStandard": "c11","compileCommands": "${workspaceFolder}/compile_commands.json"
        }
    ],"version": 4
}

如何教授有关__fp16存储类型的Visual Studio代码?我以为它会通过compilerArgs设置和-mfp16-format=ieee参数来发现类型,但似乎没有什么不同(我在这里尝试过各种组合...)。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)