Polyspace as YouCode analysis failed because header not found / define not expanded

1 次查看(过去 30 天)
Hello, a polyspace as you code analysis for a file failed because on header could not included -the path to header is listed in options file generated from compile_commands.json
And second issue, a macro could not be expanded but the header where the macro are defined would be included.
The line of the options file is very long
-options-for-sources C:/UserData/git_ws/nexus_var_02/output/zf_neXusCONNECT_01/gensrc/TskMon/TskMon_C1_MixedAsil0.cpp;-I C:/UserData/git_ws/nexus_var_02/output/zf_neXusCONNECT_01/gensrc/TskMon;-I C:/UserData/git_ws/nexus_var_02/repos/Core/source/SwCpt/RstFct/src;-I C:/UserData/git_ws/nexus_var_02/output/zf_neXusCONNECT_01/gensrc/RstFct;-I C:/UserData/git_ws/nexus_var_02/repos/Core/source/_Common/Configheader;-I C:/UserData/git_ws/nexus_var_02/repos/Core/source/_Common/Declarations;-I C:/UserData/git_ws/nexus_var_02/output/zf_neXusCONNECT_01/tc38x/Config;-I C:/UserData/conan/a141bd/1/source;-I C:/UserData/conan/127e87/1;-I C:/UserData/conan/05fb2f/1;-I C:/UserData/conan/360c5c/1/src;-I C:/UserData/conan/db0ab9/1/src;-I C:/UserData/git_ws/nexus_var_02/repos/Core/source/_Common/dff_cfg;-I C:/UserData/git_ws/nexus_var_02/arch;-I C:/UserData/git_ws/nexus_var_02/output/zf_neXusCONNECT_01/tc38x/mcgen;-I C:/UserData/conan/97a59c/1/source/default_cfg;-I C:/UserData/conan/97a59c/1/source;-I C:/UserData/git_ws/nexus_var_02/source/_Common/Mapping;-I C:/UserData/conan/54c576/1/Components/BswM/Implementation;-I C:/UserData/conan/54c576/1/Components/Can/Implementation;-I C:/UserData/conan/54c576/1/Components/CanIf/Implementation;-I C:/UserData/conan/54c576/1/Components/CanSM/Implementation;-I C:/UserData/conan/54c576/1/Components/CanNm/Implementation;-I C:/UserData/conan/54c576/1/Components/CanTp/Implementation;-I C:/UserData/conan/54c576/1/Components/CanTrcv_30_Tja1043/Implementation;-I C:/UserData/conan/54c576/1/Components/CanTrcv_30_Tja1040/Implementation;-I C:/UserData/conan/54c576/1/Components/CanXcp/Implementation;-I C:/UserData/conan/54c576/1/Components/Com/Implementation;-I C:/UserData/conan/54c576/1/Components/ComM/Implementation;-I C:/UserData/conan/54c576/1/Components/Crc/Implementation;-I C:/UserData/conan/54c576/1/Components/Dcm/Implementation;-I C:/UserData/conan/54c576/1/Components/Det/Implementation;-I C:/UserData/conan/54c576/1/Components/EcuM/Implementation;-I C:/UserData/conan/54c576/1/Components/MemIf/Implementation;-I C:/UserData/conan/54c576/1/Components/Nm/Implementation;-I C:/UserData/conan/54c576/1/Components/NvM/Implementation;-I C:/UserData/conan/54c576/1/Components/Os/Implementation;-I C:/UserData/conan/54c576/1/Components/PduR/Implementation;-I C:/UserData/conan/54c576/1/Components/VStdLib/Implementation;-I C:/UserData/conan/54c576/1/Components/Xcp/Implementation;-I C:/UserData/conan/54c576/1/Components/WdgIf/Implementation;-I C:/UserData/conan/54c576/1/Components/WdgM/Implementation;-I C:/UserData/conan/54c576/1/ThirdParty/Mcal_Tc3xx/Supply/MC-ISAR_AS422_TC3xx_BASIC_2.10.0/DemoWorkspace/McalDemo/TC38A/0_Src/BaseSw/Infra/Autosar_Srv;-I C:/UserData/conan/54c576/1/ThirdParty/Mcal_Tc3xx/Supply/MC-ISAR_AS422_TC3xx_BASIC_2.10.0/McIsar/Src/Mcal/Tricore/McalLib/ssc/inc;-I C:/UserData/conan/54c576/1/ThirdParty/Mcal_Tc3xx/Supply/MC-ISAR_AS422_TC3xx_BASIC_2.10.0/McIsar/Src/Mcal/Tricore/McalLib/ssc/inc/AS422;-I C:/UserData/conan/54c576/1/ThirdParty/Mcal_Tc3xx/Supply/MC-ISAR_AS422_TC3xx_BASIC_2.10.0/McIsar/Src/Mcal/Tricore/Fee/ssc/inc;-I C:/UserData/conan/54c576/1/ThirdParty/Mcal_Tc3xx/Supply/MC-ISAR_AS422_TC3xx_BASIC_2.10.0/McIsar/Src/Mcal/Tricore/Fls_17_Dmu/ssc/inc;-I C:/UserData/conan/54c576/1/ThirdParty/Mcal_Tc3xx/Supply/MC-ISAR_AS422_TC3xx_BASIC_2.10.0/McIsar/Src/Mcal/Tricore/Dio/ssc/src;-I C:/UserData/conan/54c576/1/ThirdParty/Mcal_Tc3xx/Supply/MC-ISAR_AS422_TC3xx_BASIC_2.10.0/McIsar/Src/Mcal/Tricore/Dio/ssc/inc;-I C:/UserData/conan/54c576/1/ThirdParty/Mcal_Tc3xx/Supply/MC-ISAR_AS422_TC3xx_BASIC_2.10.0/McIsar/Src/Mcal/Tricore/Wdg_17_Scu/ssc/src;-I C:/UserData/conan/54c576/1/ThirdParty/Mcal_Tc3xx/Supply/MC-ISAR_AS422_TC3xx_BASIC_2.10.0/McIsar/Src/Mcal/Tricore/Wdg_17_Scu/ssc/inc;-I C:/UserData/conan/54c576/1/ThirdParty/Mcal_Tc3xx/Supply/MC-ISAR_AS422_TC3xx_BASIC_2.10.0/McIsar/Src/Infra_Prod/Sfr/TC38xA/_Reg;-I C:/UserData/git_ws/nexus_var_02/source/Vector/DaVinciOutput/src;-I C:/UserData/git_ws/nexus_var_02/source/Vector/DaVinciOutput/src/Components;-I C:/UserData/git_ws/nexus_var_02/source/Vector/DaVinciOutput/src/inc;-I C:/UserData/git_ws/nexus_var_02/output/zf_neXusCONNECT_01/gensrc/OsTrustedFct;-I C:/UserData/git_ws/nexus_var_02/repos/Core/source/_Common/SWIT;-I C:/UserData/git_ws/nexus_var_02/output/zf_neXusCONNECT_01/gensrc/SWIT_stubs;-I C:/UserData/git_ws/nexus_var_02/output/zf_neXusCONNECT_01/tc38x/SWIT/neXusCore_main;-I C:/UserData/git_ws/nexus_var_02/source/Vector/DaVinciOutput/src_zf;-I C:/UserData/git_ws/nexus_var_02/source/Vector/_Callouts/src;-I C:/UserData/git_ws/nexus_var_02/source/BusCommunication/gen_output;-I C:/UserData/git_ws/nexus_var_02/repos/Core/source/SwLib/CompilerAbstraction/Tasking;-I C:/UserData/git_ws/nexus_var_02/source/Vector/_Common;-I C:/UserData/git_ws/nexus_var_02/source/Vector/_Bypass;-I C:/UserData/git_ws/nexus_var_02/source/_Configuration/src;-I C:/UserData/conan/fc7941/1/var_s/src/pfc;-I C:/UserData/git_ws/nexus_var_02/repos/Core/source/_Common;-I C:/UserData/git_ws/nexus_var_02/source/Arti/src;-include C:/UserData/git_ws/nexus_var_02/output/zf_neXusCONNECT_01/tc38x/gensrc/PreInclude.HIL.h;-include C:/UserData/git_ws/nexus_var_02/output/zf_neXusCONNECT_01/tc38x/gensrc/OsApp_C1_MixedAsil0/PreInclude.h;-D COMPONENT_ROOT=C:/UserData/git_ws/nexus_var_02/repos/Core;-D DATA_ROOT_DIRECTORY=C:/UserData/git_ws/nexus_var_02/repos/Core;-D SWIT_PRAGMA_H=MAPPING_H;-D TOOLS_ROOT_DIRECTORY=C:/UserData/git_ws/nexus_var_02/repos/Core;-D USE_VARCODER_H=1;-D WERKZEUGDEFINITION_ZFARB_TC38X_TASKING=1;-D _TYPEN_TBOOL_MIGRATION=1
Have anybody an idea where the problem, options path to long, case sensitive problem, include order ??????

回答(1 个)

Ronit
Ronit 2025-7-23
Hello,
Please refer to the following troubleshooting steps:
  • Windows has a path length limit (usually 260 characters). If your include paths or file locations are too long, Polyspace might fail to resolve them. Try moving your project to a directory with a shorter path to see if this helps.
  • Polyspace may run in a case-sensitive environment (especially on Linux). Double check that the case of your header file names matches exactly with the file system.
  • If a macro is not expanded, it might be because the header where it is defined is not actually being included (possibly due to the header not being found) or the macro is conditionally defined.
  • Check Polyspace logs for any specific errors or warnings about missing files or macros.
If you are still facing the same issue, I recommend contacting the MathWorks Technical Support: https://www.mathworks.com/support/contact_us.html
  1 个评论
Horst Dreßel
Horst Dreßel 2025-7-24
Problem fixed / clarified
We use the tasking control program cctc.exe which not supported by polyspace, map the compiler depended on file extension to tasking ctc for c-files and tasking cptc for cpp files

请先登录,再进行评论。

产品


版本

R2024a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!