Comments (8)
@MaJerle C/C++: Log Diagnostics should appear when you have a C/C++ file active.
from vscode-cmake-tools.
I agree, thanks. it is below.
Some notes:
- CMake tools does not use GCC from mingw, but compiler is ARM GCC instead. Not sure why it shows path to msys64 (I have GCC compiler there, but we don't compile target with this one)
- file
iwdg.c
is added to the target withtarget_sources
cmake functions. This file works fine - file
adc.c
is added to the target viaadd_subdirectory(...)
and then we link the library from the subdirectory. This file has problems
There is clearly a disrepancy.
I tested same project with 2
different computers and result is always the same.
-------- Diagnostics - 5/24/2024, 8:01:02 PM
Version: 1.20.5
Current Configuration:
{
"name": "STM32",
"configurationProvider": "ms-vscode.cmake-tools",
"intelliSenseMode": "windows-gcc-x64",
"compilerPathIsExplicit": false,
"cStandardIsExplicit": false,
"cppStandardIsExplicit": false,
"intelliSenseModeIsExplicit": false,
"configurationProviderInCppPropertiesJson": "ms-vscode.cmake-tools",
"includePath": [
"C:\\msys64\\mingw64\\include\\c++\\12.2.0",
"C:\\msys64\\mingw64\\include\\c++\\12.2.0\\x86_64-w64-mingw32",
"C:\\msys64\\mingw64\\include\\c++\\12.2.0\\backward",
"C:\\msys64\\mingw64\\lib\\gcc\\x86_64-w64-mingw32\\12.2.0\\include",
"C:\\msys64\\mingw64\\include",
"C:\\msys64\\mingw64\\lib\\gcc\\x86_64-w64-mingw32\\12.2.0\\include-fixed",
"C:\\msys64\\mingw64\\x86_64-w64-mingw32\\include"
],
"macFrameworkPath": [],
"cStandard": "c17",
"cppStandard": "gnu++17",
"mergeConfigurations": false,
"compilerPath": "C:\\msys64\\mingw64\\bin\\gcc.exe",
"browse": {
"path": [
"C:\\msys64\\mingw64\\include\\c++\\12.2.0",
"C:\\msys64\\mingw64\\include\\c++\\12.2.0\\x86_64-w64-mingw32",
"C:\\msys64\\mingw64\\include\\c++\\12.2.0\\backward",
"C:\\msys64\\mingw64\\lib\\gcc\\x86_64-w64-mingw32\\12.2.0\\include",
"C:\\msys64\\mingw64\\include",
"C:\\msys64\\mingw64\\lib\\gcc\\x86_64-w64-mingw32\\12.2.0\\include-fixed",
"C:\\msys64\\mingw64\\x86_64-w64-mingw32\\include",
"${workspaceFolder}"
],
"limitSymbolsToIncludedHeaders": true
}
}
Custom browse configuration:
{
"browsePath": [
"c:/path/to/project/app/source",
"c:/path/to/project/app/source/lib",
"c:/path/to/project/lib/cjson",
"c:/path/to/project/build/app/cmakefiles",
"c:/path/to/project/include",
"c:/path/to/project/lib/drivers/cmsis/device/st/stm32u5xx/include",
"c:/path/to/project/lib/drivers/cmsis/include",
"c:/path/to/project/lib/mbedtls/include",
"c:/path/to/project/lib/drivers/stm32u5xx_hal_driver/inc",
"c:/path/to/project/lib/drivers/stm32u5xx_hal_driver/inc/legacy",
"c:/path/to/project/lib/lwprintf/src/include",
"c:/path/to/project/build/app/lwprintf/lib_inc",
"c:/path/to/project/app/include",
"c:/path/to/project/app/include/lib",
"c:/path/to/project/lib/cjson/include",
"c:/path/to/project/source",
"c:/path/to/project/lib/mbedtls/library",
"c:/path/to/project/lib/drivers/stm32u5xx_hal_driver/src",
"c:/path/to/project/lib/lwprintf/src/lwprintf"
],
"compilerPath": "c:/st/stm32cubeclt/gnu-tools-for-stm32/bin/arm-none-eabi-g++.exe",
"compilerArgs": [],
"compilerFragments": []
}
cpptools version (native): 1.20.5.0
Translation Unit Mappings:
[ C:\path\to\project\app\source\adc.c - source TU]:
[ C:\path\to\project\bootloader\source\bootloader.c - source TU]:
[ C:\path\to\project\source\iwdg.c - source TU]:
C:\path\to\project\include\iwdg.h
C:\path\to\project\lib\drivers\STM32U5xx_HAL_Driver\Inc\stm32u5xx_hal_adc.h
Translation Unit Configurations:
[ C:\path\to\project\app\source\adc.c ]:
Process ID: 41012
Memory Usage: 52 MB
Compiler Path: C:\ST\STM32CubeCLT\GNU-tools-for-STM32\bin\arm-none-eabi-g++.exe
Includes:
C:\ST\STM32CubeCLT\GNU-tools-for-STM32\lib\gcc\arm-none-eabi\12.3.1\include
C:\ST\STM32CubeCLT\GNU-tools-for-STM32\lib\gcc\arm-none-eabi\12.3.1\include-fixed
C:\ST\STM32CubeCLT\GNU-tools-for-STM32\arm-none-eabi\include
Standard Version: c17
IntelliSense Mode: windows-gcc-arm
Other Flags:
--gcc
--gnu_version=120301
[ C:\path\to\project\source\iwdg.c ]:
Process ID: 32976
Memory Usage: 102 MB
Compiler Path: C:\ST\STM32CubeCLT\GNU-tools-for-STM32\bin\arm-none-eabi-gcc.exe
Includes:
C:\path\to\project\include
C:\path\to\project\lib\drivers\CMSIS\Device\ST\STM32U5xx\Include
C:\path\to\project\lib\drivers\CMSIS\Include
C:\path\to\project\lib\mbedtls\include
C:\path\to\project\lib\drivers\STM32U5xx_HAL_Driver\Inc
C:\path\to\project\lib\drivers\STM32U5xx_HAL_Driver\Inc\Legacy
C:\path\to\project\lib\lwprintf\src\include
C:\path\to\project\build\app\lwprintf\lib_inc
C:\path\to\project\app\include
C:\path\to\project\app\include\lib
C:\path\to\project\lib\cJSON\include
C:\ST\STM32CubeCLT\GNU-tools-for-STM32\arm-none-eabi\include\newlib-nano
C:\ST\STM32CubeCLT\GNU-tools-for-STM32\lib\gcc\arm-none-eabi\12.3.1\include
C:\ST\STM32CubeCLT\GNU-tools-for-STM32\lib\gcc\arm-none-eabi\12.3.1\include-fixed
C:\ST\STM32CubeCLT\GNU-tools-for-STM32\arm-none-eabi\include
Defines:
APP_FW_MAX_LEN=0x00060000
APP_FW_START_OFFSET=0x00000400
APP_LOAD_ADDR=0x08020000
BOOTLOADER_FW_MAX_LEN=0x00020000
BOOTLOADER_LOAD_ADDR=0x08000000
DEBUG
DOWNLOAD_SLOT_FW_MAX_LEN=0x00060000
DOWNLOAD_SLOT_LOAD_ADDR=0x08080000
IS_APP=1
IS_BOOTLOADER=0
IS_DEVELOPMENT=0
STM32U575xx
USE_FULL_LL_DRIVER
USE_HAL_DRIVER
VERSION_FW_MAJOR=0
VERSION_FW_MINOR=0
VERSION_FW_PATCH=1
VERSION_FW_REV=0
VERSION_FW_TYPE=0
VERSION_HW_MAJOR=0
VERSION_HW_MINOR=0
VERSION_HW_PATCH=0
Standard Version: c11
IntelliSense Mode: windows-gcc-arm
Other Flags:
--gcc
--gnu_version=120301
Total Memory Usage: 209 MB
------- Workspace parsing diagnostics -------
Number of files discovered (not excluded): 3788
from vscode-cmake-tools.
Update: for test, I moved from the add_subdirectory
approach, to file(GLOB_RECURSE...)
instead.
Now all files are added to the project as a target, and not as a library anymore.
And it works fine.
Is it therefore vscode-cmake-tools issue?
from vscode-cmake-tools.
@MaJerle I think so. From your logging, I don't see a configuration being sent from CMake Tools.
from vscode-cmake-tools.
Edit: No, after I closed the window and opened again, it stopped working again, regardless of how cmake is configured.
from vscode-cmake-tools.
@MaJerle Sorry, I thought our Log Diagnostics logging showed the "Custom configurations received:" logging but it's actually in our main C/C++ logging when C_Cpp.loggingLevel is set to "Debug". Do you see the correct "Custom configurations received:" info being sent from CMake Tools? i.e. the correct includes/defines/args/compilerFragments.
from vscode-cmake-tools.
I'm not getting correct data if I well understood your point.
I'm testing on 2 PCs, same project, and something seems to be wrong with CMake Tools extension, because suddenly it starts working (random) and as soon as I restart vscode, errors appear again
from vscode-cmake-tools.
Related Issues (20)
- After clicking Run Tests an error is reported HOT 1
- Configure raises an error if CTest scripts print to stdout HOT 6
- presets: setting cmake.buildToolArgs in configuration leads to build failures HOT 3
- FR: support the terminal.integrated.automationProfile.* when launch target without debug
- The test process will remain loaded after clicking “Debug Tests” HOT 3
- Annoying unnecessary logging related to expanding strings that don't require expansion
- Doubling of cpack arguments via package preset
- Need to clean-configure when running workflow with workflow-configure-preset different than project-configure-preset
- Fix UI issues in the CMake left panel related to package preset override of settings
- Improve CMakeLists.txt support - auto formatting and auto add to CMakeLists.txt when adding files HOT 1
- Selecting CMake Tools as configuration provider has error squiggles for all standard library includes HOT 3
- IntelliSense picks up wrong include path and shows false-positive error squiggles HOT 3
- Intellisense Suddenly Stopped Working For Standard Headers & Included Directories HOT 5
- Edit CacheUI broken since last release? HOT 1
- Filename not mentioned in error HOT 3
- Extension display language not right HOT 2
- How to set the default ``cmake_minimum_required`` version in QuickStart command HOT 2
- Customer request: Add a setting for hierarchy delimiter to Test Explorer HOT 1
- CTest as the run-layer
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-cmake-tools.