-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#73 Add make target to gen c_cpp_properties.json #111
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Brycey92
reviewed
Nov 2, 2023
@echo " \"${IDF_PATH}/components/**\"" >> $(PROPERTIES_FILE) | ||
@echo " ]," >> $(PROPERTIES_FILE) | ||
@echo " \"defines\": []," >> $(PROPERTIES_FILE) | ||
@echo " \"compilerPath\": \"$(shell which xtensa-esp32s2-elf-gcc)\"," >> $(PROPERTIES_FILE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Output is still doing some oddities with UNIX-style paths on Windows:
{
"configurations": [
{
"name": "esp32s2",
"includePath": [
"${workspaceFolder}/main/**",
"${workspaceFolder}/components/**",
"C:\Users\Bryce\esp\esp-idf/components/**"
],
"defines": [],
"compilerPath": "/c/Users/Bryce/.espressif/tools/xtensa-esp32s2-elf/esp-12.2.0_20230208/xtensa-esp32s2-elf/bin/xtensa-esp32s2-elf-gcc",
"compileCommands": "${workspaceFolder}/build/compile_commands.json",
"cStandard": "c17",
"cppStandard": "c++17",
"intelliSenseMode": "gcc-x86"
}
],
"version": 4
}
Do we have the ability to replace this call with something that puts out Windows paths?
Ah, looks like it's using msys2's 'which' to find that path to the
compiler. There isn't a nice env var to get the compiler unfortunately. I
wonder if there's some better way to find the compiler in a cross platform
way...
…On Thu, Nov 2, 2023 at 3:43 PM Bryce Browner ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In makefile
<#111 (comment)>
:
> +################################################################################
+
+PROPERTIES_FILE=./.vscode/c_cpp_properties.json
+
+gen-vs-properties:
+ @echo "{" >> $(PROPERTIES_FILE)
+ @echo " \"configurations\": [" >> $(PROPERTIES_FILE)
+ @echo " {" >> $(PROPERTIES_FILE)
+ @echo " \"name\": \"esp32s2\"," >> $(PROPERTIES_FILE)
+ @echo " \"includePath\": [" >> $(PROPERTIES_FILE)
+ @echo " \"\$${workspaceFolder}/main/**\"," >> $(PROPERTIES_FILE)
+ @echo " \"\$${workspaceFolder}/components/**\"," >> $(PROPERTIES_FILE)
+ @echo " \"${IDF_PATH}/components/**\"" >> $(PROPERTIES_FILE)
+ @echo " ]," >> $(PROPERTIES_FILE)
+ @echo " \"defines\": []," >> $(PROPERTIES_FILE)
+ @echo " \"compilerPath\": \"$(shell which xtensa-esp32s2-elf-gcc)\"," >> $(PROPERTIES_FILE)
Output is still doing some oddities with UNIX-style paths on Windows:
{
"configurations": [
{
"name": "esp32s2",
"includePath": [
"${workspaceFolder}/main/**",
"${workspaceFolder}/components/**",
"C:\Users\Bryce\esp\esp-idf/components/**"
],
"defines": [],
"compilerPath": "/c/Users/Bryce/.espressif/tools/xtensa-esp32s2-elf/esp-12.2.0_20230208/xtensa-esp32s2-elf/bin/xtensa-esp32s2-elf-gcc",
"compileCommands": "${workspaceFolder}/build/compile_commands.json",
"cStandard": "c17",
"cppStandard": "c++17",
"intelliSenseMode": "gcc-x86"
}
],
"version": 4
}
Do we have the ability to replace this call with something that puts out
Windows paths?
—
Reply to this email directly, view it on GitHub
<#111 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABYODARYLK3C35NY22DN6LYCPZUXAVCNFSM6AAAAAA62IRLGOVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTOMJRGEYTAOJTGE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Added
make gen-vs-properties
to generate.vscode\c_cpp_properties.json
Test Instructions
Deleted
.vscode\c_cpp_properties.json
, ranmake gen-vs-properties
, and validated the output.Ticket Links
#73
Readiness Checklist
make format
to format the changesmake cppcheck
and checked thatcppcheck_result.txt
has no warnings for the changes/*! \file
comments with Design Philosophy, Usage, and Example sections for new headers.make docs
and checked thatdoxy_warnings.txt
has no warnings for the new code