Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[Keil][VSCode] Keil integration into VSCode

mrtombou

Newbie
Joined
Oct 8, 2021
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
6
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 :)
 

niciki

Full Member level 3
Joined
Apr 11, 2018
Messages
177
Helped
33
Reputation
66
Reaction score
36
Trophy points
38
Location
Gdańsk, Poland
Activity points
1,646
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.
 

coarist

Newbie
Joined
Feb 4, 2022
Messages
1
Helped
0
Reputation
0
Reaction score
1
Trophy points
3
Activity points
93
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:

niciki

Full Member level 3
Joined
Apr 11, 2018
Messages
177
Helped
33
Reputation
66
Reaction score
36
Trophy points
38
Location
Gdańsk, Poland
Activity points
1,646
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.
 

niciki

Full Member level 3
Joined
Apr 11, 2018
Messages
177
Helped
33
Reputation
66
Reaction score
36
Trophy points
38
Location
Gdańsk, Poland
Activity points
1,646
(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".
 

niciki

Full Member level 3
Joined
Apr 11, 2018
Messages
177
Helped
33
Reputation
66
Reaction score
36
Trophy points
38
Location
Gdańsk, Poland
Activity points
1,646
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
 

LaTeX Commands Quick-Menu:

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top