こんにちは。NoMaYです。ルネサスさんからRenesas Extensions for Visual Studio Code(テクニカルプレビューバージョン)が出ていましたので触ってみることにしました。Renesas Extensions for Visual Studio Code(テクニカルプレビューバージョン) 製品ページwww.renesas.com/jp/ja/software-tool/renesas_extension_of_vscodeRenesas VS Code Extension Helptool-support.renesas.com/e2studio/vscode/docs/debug/index.html[関連スレッド]最近Atom IDEとかVisual Studio Codeとか新しい開発環境が出て来てますね(Renesas CSplusと連携させる方法を探したいですね)community-ja.renesas.com/cafe_rene/forums-groups/tools/f/forum21/4553/atom-ide-visual-studio-code-renesas-csplusVisual Studio 2022 Community EditionでRX MCUやRL78 MCUのSoftware Developmentが出来るか試してみようと思いますcommunity-ja.renesas.com/cafe_rene/forums-groups/tools/f/forum21/7703/visual-studio-2022-community-edition-rx-mcu-rl78-mcu-software-developmente2 studioでCMakeでビルドする、というアプリケーションノートがあるのですがスマートコンフィグレータは使えるのでしょうか?community-ja.renesas.com/cafe_rene/forums-groups/tools/f/forum21/7713/e2-studio-cmake
こんにちは。NoMaYです。私が良く見るニュースサイトで、AIコーディング副操縦士たるGitHub Copilot + VSCode + Pythonの記事が目に留まりました。なんか凄そうです。(C++言語はサポートされているようですが、C言語はサポートされていないようです。 そんなことでは無くて、CopilotからのC++言語での提案に比べるとCopilotからのC言語での提案はちょっと劣りますよ…
> そもそも、Makeとは何か、何の為にあるのか、同じくMakefileとは、といったことにまで遡っていくような話にも似た話にもなりかねないそれって要するに「記述例を示すなら、CMakeをCMakeらしく使うような記述にしてよ」ってことですかね?
ほや さん、こんにちは。NoMaYです。> それって要するに「記述例を示すなら、CMakeをCMakeらしく使うような記述にしてよ」ってことですかね?かつ、CMakeらしく使うような記述が出来るようにして、ということでもあります。それが、私が以下でやってきた(かつ現在も進行中の)ことだったりするのです。(またも手前味噌だったりしますけれども。)e2 studioでCMakeでビルドする、というアプリケーションノートがあるのですがスマートコンフィグレータは使えるのでしょうか?community-ja.renesas.com/cafe_rene/forums-groups/tools/f/forum21/7713/e2-studio-cmake
> 危惧はしていましたけれども、__evenaccessキーワードがエディタウィンドウや問題ウィンドウでエラー表示されます。幾つか前の投稿に書いた件ですけれども、まだ絶対パスでしか書き方が分かっていませんが、以下のファイルを置くことで回避出来そうです。(とにかく、まずは、取っ掛かり、ということで、、、).vscode/c_cpp_intellisense_helper.hgithub.com/NoMaY-jp/Renesas_CC_compilers_tips_for_VSCode/blob/e5a7e7c/vscode_helper_files_rx/.vscode/c_cpp_intellisense_helper.h.clangd
CompileFlags: Remove: - -* Add: - -D__INTELLISENSE__ - -IC:/Renesas/CS+/CC/CC-RX/V3.05.00/include - --include=C:/Renesas/GitHubDesktop/workspaces/work_vscode/TestCMakeCCxx/tb_rx65n/.vscode/c_cpp_intellisense_helper.h
以下、VSCodeの画面コピーです。施策前施策後
メモです。How can I detect clangd in the preprocessor?clangd.llvm.org/faq#how-can-i-detect-clangd-in-the-preprocessor「clangd uses the clang parser, and defines preprocessor symbols like __clang__. Code that detects compilers will detect it as clang, which is usually good. If a library can’t be parsed by clang, it generally can’t be parsed by clangd either.Clangd does not define any extra symbols allowing you to detect it specifically. But you must write #ifdef _CLANGD, you can configure this:
CompileFlags: Add: [-D_CLANGD=1]
」[追記]source codegithub.com/llvm/llvm-project/tree/main/clang-tools-extra/clangd[追記]issuesgithub.com/clangd/clangd/issues[追記]Forumdiscourse.llvm.org/c/clang/clangd/34
メモです。clangdのコマンドラインオプション(その1(情報が古いかも))releases.llvm.org/10.0.0/tools/clang/tools/extra/docs/clangd/Configuration.htmlclangdのコマンドラインオプション(その2(clangd --version、clangd --help))help.txt
>clangd --version clangd version 15.0.6 (https://github.com/llvm/llvm-project 088f33605d8a61ff519c580a71b1dd57d16a03f8) Features: windows+grpc Platform: x86_64-pc-windows-msvc >clangd --help OVERVIEW: clangd is a language server that provides IDE-like features to editors. It should be used via an editor plugin rather than invoked directly. For more information, see: https://clangd.llvm.org/ https://microsoft.github.io/language-server-protocol/ clangd accepts flags on the commandline, and in the CLANGD_FLAGS environment variable. USAGE: clangd [options] OPTIONS: Generic Options: --help - Display available options (--help-hidden for more) --help-list - Display list of available options (--help-list-hidden for more) --version - Display the version of this program clangd compilation flags options: --compile-commands-dir=<string> - Specify a path to look for compile_commands.json. If path is invalid, clangd will look in the current directory and parent paths of each source file --query-driver=<string> - Comma separated list of globs for white-listing gcc-compatible drivers that are safe to execute. Drivers matching any of these globs will be used to extract system includes. e.g. /usr/bin/**/clang-*,/path/to/repo/**/g++-* clangd feature options: --all-scopes-completion - If set to true, code completion will include index symbols that are not defined in the scopes (e.g. namespaces) visible from the code completion point. Such completions can insert scope qualifiers --background-index - Index project code in the background and persist index on disk. --background-index-priority=<value> - Thread priority for building the background index. The effect of this flag is OS-specific. =background - Minimum priority, runs on idle CPUs. May leave 'performance' cores unused. =low - Reduced priority compared to interactive work. =normal - Same priority as other clangd work. --clang-tidy - Enable clang-tidy diagnostics --completion-style=<value> - Granularity of code completion suggestions =detailed - One completion item for each semantically distinct completion, with full type information =bundled - Similar completion items (e.g. function overloads) are combined. Type information shown where possible --fallback-style=<string> - clang-format style to apply by default when no .clang-format file is found --function-arg-placeholders - When disabled, completions contain only parentheses for function calls. When enabled, completions also contain placeholders for method parameters --header-insertion=<value> - Add #include directives when accepting code completions =iwyu - Include what you use. Insert the owning header for top-level symbols, unless the header is already directly included or the symbol is forward-declared =never - Never insert #include directives as part of code completion --header-insertion-decorators - Prepend a circular dot or space before the completion label, depending on whether an include line will be inserted or not --limit-references=<int> - Limit the number of references returned by clangd. 0 means no limit (default=1000) --limit-results=<int> - Limit the number of results returned by clangd. 0 means no limit (default=100) --project-root=<string> - Path to the project root. Requires remote-index-address to be set. --remote-index-address=<string> - Address of the remote index server clangd miscellaneous options: --check[=<string>] - Parse one file in isolation instead of acting as a language server. Useful to investigate/reproduce crashes or configuration problems. With --check=<filename>, attempts to parse a particular file. --check-lines[=<string>] - If specified, limits the range of tokens in -check file on which various features are tested. Example --check-lines=3-7 restricts testing to lines 3 to 7 (inclusive) or --check-lines=5 to restrict to one line. Default is testing entire file. --enable-config - Read user and project configuration from YAML files. Project config is from a .clangd file in the project directory. User config is from clangd/config.yaml in the following directories: Windows: %USERPROFILE%\AppData\Local Mac OS: ~/Library/Preferences/ Others: $XDG_CONFIG_HOME, usually ~/.config Configuration is documented at https://clangd.llvm.org/config.html -j <uint> - Number of async workers used by clangd. Background index also uses this many workers. --pch-storage=<value> - Storing PCHs in memory increases memory usages, but may improve performance =disk - store PCHs on disk =memory - store PCHs in memory clangd protocol and logging options: --log=<value> - Verbosity of log messages written to stderr =error - Error messages only =info - High level execution tracing =verbose - Low level details --offset-encoding=<value> - Force the offsetEncoding used for character positions. This bypasses negotiation via client capabilities =utf-8 - Offsets are in UTF-8 bytes =utf-16 - Offsets are in UTF-16 code units =utf-32 - Offsets are in unicode codepoints --path-mappings=<string> - Translates between client paths (as seen by a remote editor) and server paths (where clangd sees files on disk). Comma separated list of '<client_path>=<server_path>' pairs, the first entry matching a given path is used. e.g. /home/project/incl=/opt/include,/home/project=/workarea/project --pretty - Pretty-print JSON output
こんにちは。NoMaYです。私が良く見るニュースサイトで、AIコーディング副操縦士たるGitHub Copilot + VSCode + Pythonの記事が目に留まりました。なんか凄そうです。(C++言語はサポートされているようですが、C言語はサポートされていないようです。 そんなことでは無くて、CopilotからのC++言語での提案に比べるとCopilotからのC言語での提案はちょっと劣りますよ、ぐらいなのかなぁ。)第100回 ゼロからはじめるPythonAI頼みで作る迷路ゲーム - GPT搭載のCopilotを試した件news.mynavi.jp/techplus/article/zeropython-100/↑有料会員向け記事ですが無料公開部分だけでも面白いです。↑私も無料公開部分しか読んでいません。[関連リンク]Google検索: Copilot VSCode C言語 OR C++言語www.google.co.jp/search?q=Copilot+VSCode+C言語+OR+C++言語
こんにちは。NoMaYです。ちょっと思ったのですけれども、将来、ルネサスマイコン向けのコードを書こうとしていても、AIコーディング副操縦士さんのGitHub Copilotさんからは、バンバンとSTM32向けのコードが提案されてきたりするのかなぁ、、、[追記]そういえば、今話題のChatGPTで、お勧めのマイコンは何ですか?とか質問出来るのかな?どんな返事が返ってくるのかな?
NoMaYさん
シェルティです、こんにちは。
CMake対応についてコンパイラチームが正式に進めています。本家へのプルリクエストを視野に入れています。一旦コンパイラチームが考える仕様で*.cmakeファイルやCMake本家コードへのパッチが出来上がった段階です。
コンパイラチームはNoMaYさんの書き込みを認識しており、NoMaYさんが現状認識している課題は解消できるものがある、とコメントをいただいていますが、具体的にどのような課題が解消できて、あるいはできないのかまで踏み込んでの議論が未だ出来ていません。
シェルティがNoMaYさんの書き込みから課題をサルベージしてリストアップし、コンパイラチームと議論してみようかなと考えています。いずれにしても何かしら進捗させたいと考えています。
引き続き情報共有させてください。
ちなみに、ChatGPTは便利ですね。思わず月額課金20ドルを支払って有料会員になってしまいました。私の手元ではGitLabのCI/CDを制御するpythonスクリプトとかをChatGPTに生成してもらっており、実業務レベルで大変捗っています。ということで、「ChatGPT的おすすめマイコンは?」と聞いてみました。STとNXPがお好みだそうです。
ルネサスの中の人としてファイティングポーズとっておきました。
#ChatGPT先生のルネサス解説が途中で終わっちゃってますね
以上です
こんにちは。NoMaYです。別スレッドで思いました。> (1) PythonのAPIで、カレントディレクトリのパスを取得する(すみません、私はAPIを暗記していませんので、Pythonのサイトで検索してみて下さい)AIコーディング副操縦士さんのGitHub Copilotさんとか、ChatGPT先生とか、一瞬で、丁寧に、真摯に、答えてくれるのでしょうねぇ、と、、、
こんにちは。NoMaYです。ウェブで調べ物をしていて気付いたのですが、VSCodeのソース中にキッチリとIARコンパイラ対応が入っているのですね。github.com/microsoft/vscode-cmake-tools/blob/main/src/diagnostics/build.ts#L20-L29(行番号はそのうちズレると思いますけれども↑)
export class Compilers { [compiler: string]: RawDiagnosticParser; gcc = new gcc.Parser(); ghs = new ghs.Parser(); diab = new diab.Parser(); gnuLD = new gnu_ld.Parser(); msvc = new mvsc.Parser(); iar = new iar.Parser();}