[Keil][VSCode] Keil integration into VSCode

Status
Not open for further replies.
Hello niciki,

I have a question to "5. Choose Keil's project target by "C/C++: Select a Configuration..." command in VSCode;"

I don't know, where the command is. Coud you show me this step with more details?

thanks
 

Hi mrtombou,

Make sure you have a C/C++ plugin installed to VSCode.
Then hit F1 and start typing "select conf".
You should see "C/C++: Select a Configuration..." below. Click on it and choose your target.
 

I have added more description to this point in this blog entry.
 

Thank you for sharing this topic. It is a set of awesome tool that I found useful. Here are some notes that I hope will help others and also being considered in future releases. They concern the files in the "Scripts" folder.

(1) multi-process compiler option is set to -j0. Users who have more than one processor core may increase to -j4 to spawn 4 threads when building the project which may give some speed improvement.

build.bat
clean.bat
program_flash.bat
rebuild.bat

(2) Line 5 in _program_size_summary_cf.py imports terminaltables, but Python failed this line. In my case, I changed "python" to "python3" in the following files to resolve this condition:

_parse_keil_project.bat
_parse_Keil_project.py
_summary.bat

(3) Changes to VsCode "IntelliSense Configurations - C/C++ Configurations" such as Include Paths and Defines do not persist across a "build" action. Both (UI) and (JSON) will be over-written with the value obtained from file:

_parse_keil_project.py

The user may wish to edit the values in this file instead.

(4) Building Keil uVision 5 project from VsCode is successful in my case. The post-build step of reporting build summary is yet to be resolved, though. The post-build output is shown below for other users' reference:

Fri 02/04/2022 12:24: Mxxx8
Mxxx8: Keil's compiler optimization: "Level 0 (-O0)"
\output\Mxxx8.map: Code (inc. data) RO Data RW Data ZI Data Debug
\output\Mxxx8.map: 572368 45578 194468 7144 32452 563452 Grand Totals
\output\Mxxx8.map: 572368 45578 194468 1008 0 0 ROM Totals
\output\Mxxx8.map: Total ROM Size (Code + RO Data + RW Data) 767844 ( 749.85kB)

| Build time | Target | BL Size | APP Size | BL+APP Size | Total FLASH Size | Memory used [%] | Memory left |


Last operation failed - errorlevel was non-zero. Aborting.
The terminal process "C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -Command G:\Documents\Keil\Mxxx8/Scripts/start_ALL_rebuild.bat" terminated with exit code: 1
.
 
Last edited:
Hi coarist,

Thank you very much for your post.
I am happy that you managed to build your project in VSCode after all the hassle.

Could you write all your issues here: https://gitlab.com/niciki/keil_integration_with_vscode/-/issues ?
It will be easier for me to fix them with gitlab workflow, especially when commit message can close an issue when fixed.
We could also have a small chat about every issue there when needed.
 

(4) (...) The post-build step of reporting build summary is yet to be resolved, though.
The reason why it shows nothing is the date format. I must to change regex to be more general - it is now expecting format "YYYY.MM.DD" or "YYYY-MM-DD" and not (what is in your case) "Day DD/MM/YYYY".
 

I have updated the repo:
(1) Changed from -j0 to -j8
(2) Added note about Python 3 and the way to satisfy all Python's requirements used by this toolset
(3) Still to come in next release...
(4) Updated summary with more general RegEx for data/time
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…