Skip to content
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

Include XPCCs generated paths for VSCode C++ includePath #962

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion tools/ide/vscode/module.lb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

import subprocess
import platform
import os

def init(module):
module.name = ":ide:vscode"
Expand Down Expand Up @@ -66,13 +67,18 @@ def post_build(env):
for p in ["release", "debug"]
}

include_path = env.collector_values("::path.include")
if env.has_module("::xpcc:generator"):
os.makedirs( env["::xpcc:generator:path"], exist_ok=True )
include_path.append( env.relcwdoutpath( env["::xpcc:generator:path"] ) )

env.substitutions = {
"configs": configs,
"partname": env[":target"].partname.upper(),
"with_freertos": env.has_module(":freertos"),
"platform": core,
"profiles": profiles,
"include_paths": env.collector_values("::path.include"),
"include_paths": include_path,
"compiler_path": compiler_path,
# FIXME: RTT block is searched for too early.
# See https://github.com/Marus/cortex-debug/wiki/SEGGER-RTT-support#known-issues
Expand Down