iarsystems / iar-vsc-build Goto Github PK
View Code? Open in Web Editor NEWVisual Studio Code extension for developing and building IAR projects
License: Mozilla Public License 2.0
Visual Studio Code extension for developing and building IAR projects
License: Mozilla Public License 2.0
Note: This may be a slight duplicate of #30, but I believe it's different enough for its own issue.
Support for workspace files would be make this extension much more like the IAR IDE, which would make it easier to use VSCode for the inner development loop. This would make it more obvious to use overall.
I believe that supporting workspace would make the following things available:
Another note: It may make sense to split these into separate issues, but I created it as one for now.
Problem:
As title states, when deleting a file from within the IAR Build explorer, a new group is created with the same name as a group in that directory.
Intention is to delete these two files from the group
On confirming the delete, the file is not removed from the group and a new group within that group has been created
Deleting the group results in a new group of the same name being created.
Deleting the base_comms.c file causes the number of groups to be duplicated!
Adding groups gives similar results
Print from IAR Build output on deleting the a group:
[01/07/2022, 13:04:54][Debug] 'c:\Users\Jack\Desktop\GitHub\project_Firmware\EWARM\project.ewp' changed on disk
[01/07/2022, 13:04:54][Debug] Loading project 'project' using thrift...
[01/07/2022, 13:04:54][Debug] Loading project context for 'project'
[01/07/2022, 13:04:54][Debug] Loaded extended project 'project'
No outputs from IAR Config Generator or IarServiceManager
In vscode __FILE__
use lower case of driver letter like "d:" while in iar workbench use upper case like "D:".
This could cause a verification error when build again in vscode and then debug without downloading in iar workbench.
It appears that the extension converts "$PROJ_DIR$" paths from the .ewp file include directories to absolute paths before providing to
the Microsoft C/C++ extension configuration file, visible in file ".vscode\c_cpp_properties.json" under section "includePath".
It would make sense to translate IAR token "$PROJ_DIR$" paths to the equivalent "${workspaceFolder}" token to prevent invalid paths if the c_cpp_properties.json file is checked into source control and then checked out and compiled by another user. However, this only affects the red squiggles VS Code produces, as IAR compilation will still work fine using the .ewp file.
If the build task (iar: Build Project) fails, depending tasks are still run. This should not be the case.
{
"tasks": [
{
"type": "iar",
"command": "build",
"project": "${command:iar-config.project-file}",
"config": "${command:iar-config.project-configuration}",
"builder": "${command:iar-config.toolchain}/common/bin/iarbuild.exe",
"label": "iar: Build Project",
"problemMatcher": [
"$iar-cc",
"$iar-linker"
]
},
{
"label": "Flash Board",
"type": "shell",
"command": "C:\\Program Files\\SEGGER\\JLink\\JFlash.exe",
"args": [...],
"dependsOn": [
"iar: Build Project"
]
},
]
}
I use a .custom_argvars file
to inject build data from my CI system at compile time.
This file is generated before running IarBuild.exe
The VS Code plugin recognizes this file and selects that as the Custom Argument Variables File for the project.
Problem 1:
There is no option to deselect a .custom_argvars
file after one has been detected.
Problem 2:
If the .custom_argvars
is deleted, the VC Code plugin will still try to call IarBuild.exe
with the old arg-file as input. This predictably fails.
Even though the UI shows: "No .custom_argvars file found"
If any of this happens I have to add a dummy .custom_argvars
with no entries. Otherwise I can only compile using EW.
It could be very usefull to have the compilation output on VSCode Output tabs instaed of Terminal one.
==> Output tabs could be use color to highlight Error, Warning and others ...
For example, I combined this 2 extensions :
And the error is highlight in RED, and Warning in Orange. It is really cool :)
Intellisense is not working correctly because an incorrect intellisense configuration is supplied:
IAR Build log:
[22.6.2022, 10:39:21][Debug] Activating extension
[22.6.2022, 10:39:26][Debug] Found 13 project(s) in the workspace
[22.6.2022, 10:39:27][Debug] Project: selected 'cm7_0' (index 9)
[22.6.2022, 10:39:27][Debug] Configuration: selected 'Debug' (index 1)
[22.6.2022, 10:39:27][Debug] Not loading project 'cm7_0' using thrift, no appropriate workbench selected...
[22.6.2022, 10:39:27][Debug] Loaded extended project 'undefined'
[22.6.2022, 10:39:28][Debug] Collected 2 toolchains
[22.6.2022, 10:39:28][Debug] Toolchain: selected 'Embedded Workbench 9.0 (Arm)' (index 0)
[22.6.2022, 10:39:28][Debug] Loading thrift workbench 'Embedded Workbench 9.0 (Arm)'...
[22.6.2022, 10:39:30][Debug] Generating intellisense config for 'cm7_0':'Debug'...
[22.6.2022, 10:39:30][Debug] 1 new toolchain(s) added
[22.6.2022, 10:39:32][Debug] Loaded thrift workbench 'Embedded Workbench 9.0 (Arm)'
[22.6.2022, 10:39:32][Debug] Loading project 'cm7_0' using thrift...
[22.6.2022, 10:39:32][Debug] Loading project context for 'cm7_0'
[22.6.2022, 10:39:35][Debug] Loaded extended project 'cm7_0'
[22.6.2022, 10:39:37][Debug] Intellisense config changed. Notifying cpptools.
[22.6.2022, 10:39:37][Debug] Providing intellisense configuration(s) for: c:\Projects\Project\main.c
IAR Config Generator:
Done!
Generating intellisense information for c:\Projects\Project\main.c
C/C++ extension log:
sending compilation args for C:\Projects\Project\main.c
include: C:\PROJECTS\PROJECT\SRC
...(more includes)
define: _DEBUG
define: UNICODE
define: _UNICODE
stdver: ms_c17
intelliSenseMode: windows-msvc-x64
It does work for files which are not in the current project (although it is the wrong configuration for these files):
IAR Build log:
[22.6.2022, 10:39:37][Debug] Using fallback intellisense configuration for: c:\Projects\Project\main2.c
C/C++ extension log:
sending compilation args for C:\Projects\Project\main2.c
include: C:\PROJECTS\PROJECT\SRC
...(more includes)
define: __fp16=float
define: __CHAR_BITS__=8
define: __CHAR_MAX__=0xff
define: __CHAR_MIN__=0
define: __CHAR_SIZE__=1
define: __UNSIGNED_CHAR_MAX__=0xff
define: __SIGNED_CHAR_MAX__=127
... (more defines)
stdver: c17
intelliSenseMode: windows-clang-arm
Any help would be appreciated!
When I start Visual Studio Code with the IAR Build plugin installed it seems to scan through the workspace and deletes the output files of all projects in the workspace folder. This causes libraries to be deleted even when they are not part of the IAR project that has been selected.
The IAR Config Generator output screen displays this when opening Visual Studio code:
Building configuration: FlashSTM32F429_NOR - FlashSTM32F429_NOR
Updating build tree...
c:\[I removed the start of the path here]\FlashLoader\FlashSTM32F429_NOR\Exe\FlashSTM32F429_NOR.out
1 file(s) deleted.
I don't think it should delete that file just because it is under the workspace directory. That .out file is a flashloader I am using that only needed to be built once. Building all IAR projects in the workspace directory also seems unnecessary.
Hi,
Is there a way to make this extension working on Mac and Linux?
Silabs is able to do it with there IDE using Wine. See link below
Thanks for you help, and thank you for this amazing tool :)
Alex
When a file path has a space in it, it cannot be clicked since both parts are see as separate paths:
'c:\Projects\SomeProject\Some Folder\SomeFile.cpp'
will be linked as 2 separate paths:
c:\Projects\SomeProject\Some
Folder\SomeFile.cpp
Just a query if there's specific reason v7.x isn't supported anymore on the updated official plugin.
I assume likely due to improved integration of some sort?
I have been using the IAR VS Code extension since my project upgraded to IAR 9. I noticed that if I add a file to the project in VS Code, for any group at the same level as the new file, a new empty group with the same name also gets created.
This happens regardless of the alphabetical order of the new file:
I am using EWARM 9.20.4 and v1.20.1 of the IAR Build extension on Windows 10.
A project I inherited includes a vendor sdk that has a plethora of ewp files I need to exclude to preserve sanity (both NXP and ST tend to do this). I am not afforded the option of pruning them from our repository. The issue is startup time for opening a folder becomes ridiculous coupled with the unwanted searching for the correct project in the dropdown.
I cannot manage to construct a proper regex to do this. In this case, it would be useful to be able to ignore (or not search) one or more designated directory trees. I can't imagine this is a unique problem. I have seen other extensions that make this sort of option more user friendly.
iarsystems.iar-build-unresponsive.cpuprofile.txt
Performance
iar-build
1.10.2
Windows_NT x64 10.0.19044
1.68.0
file:///c%3A/Users/RAMIRE~1/AppData/Local/Temp/iarsystems.iar-build-unresponsive.cpuprofile.txt
Find more details here: https://github.com/microsoft/vscode/wiki/Explain-extension-causes-high-cpu-load
Hello,
Is there a way to customize the build toolbar?
We have a script that signs a .bin file and then uploads it to the target. I would like to have a toolbar button that performs this procedure. Similar to the customize feature of the IAR Workbench Tools menu.
Thanks,
Mike
There are lots of workflows where it is necessary to attach to a running target in order to debug hardware in it's current state. It can be difficult to use the Download cycle in order to try and get the board back into the state that I'm trying to debug.
Editing of the IAR-project seetings still needs to be done from the IAR-Workbench. It would be nice to support the editing of the *.eww configuration within Visual Studio, thus reducing the needed switch between both tools.
I'm working on a project with several Git submodules, some of which contain an IAR project (.ewp file). When the submodules are loaded after opening VS Code, the IAR Build extension opens the CMSIS package manager for these projects and closes it again shortly after. This can happen multiple times in a row. It seems to happen on other occasions as well, but the reason is not clear to me. One can prevent this behavior by adding the .ewp files to the files.exclude setting of VS code. I have this problem with IAR 9.32.1, IAR Build extension 1.20.3 and VS Code 1.75.1.
The IAR Build extensions should not open the CMSIS Package Manager automatically. It also would be nice if the IAR Build extensions would excluded the projects listed in .gitignore, so one can use patterns like the follwing, which currently are not possible in both the files.exclude and the iar-build.projectsToExclude settings
# Exclude all projects except the application
/**/*.ewp
!/**/application.ewp
ERROR, Unknown argument variable: Failed to expand argument variable "$DATE$"
Source configuration did not complete: Process exited with code: 3221226505
<?xml version="1.0" encoding="UTF-8"?>
<project>
<fileVersion>3</fileVersion>
<configuration>
<toolchain>
<name>ARM</name>
</toolchain>
<debug>0</debug>
<settings>
<name>OBJCOPY</name>
<archiveVersion>0</archiveVersion>
<data>
<option>
<name>OOCOutputFile</name>
<state>$DATE$_$PROJ_FNAME$_$CONFIG_NAME$.bin</state>
</option>
</data>
</settings>
</configuration>
</project>
The preprocessor symbols defined in the IAR project settings are not evaluated properly, leading to the wrong code regions to be shown as inactive (i.e. dimmed). This is the case with IAR Build extension v1.20.1, but wasn't before.
I have a problem with the newest version (v1.20.3). When I open the IAR project in VS Code and click on the IAR icon on the left panel, in about 10 seconds this extension opens ~30 IAR Build Utility processes out of nowhere, that uses in total 100% of the processor. I waited for about 30 minutes, but nothing happens and PC is barely usable.
In Task Manager it looks like this:
I have IAR Embedded Workbench 8.3
Everything works on version 1.20.2 and 1.20.1 (those versions I tested)
Thank you for your help!
When there is an error or a warning at compilation, a click on error in build terminal open the defect file but only at line 1, not at the error line.
Hi all !
I'm currently evaluating the feasibility of developing with IAR projects under a Linux environment.
I gave a try to BX and I really like it, the build performances are great, it's lightning fast compared to my windows env.
It also integrates well in VSCode.
But, not being able to render the project files in the view is a huge drawback for me, it makes everything painful (searching for files, modifying the project...)
In my opinion, this extension needs to provide more compatibility with Linux to really take advantage of BX from a developer perspective.
Hope something can be done ! :)
It's at least two times longer !
When I define a structure which contain an anonymous structs or unions, the IntelliSense will report error that [struct xxx has no field yyy.], but build result is success.
For example:
typedef struct test
{
int a;
int b;
union _u
{
char c;
short d;
float e;
double f;
};
} test_t;
void test_func()
{
test_t t1;
t1.c = '\n'; //IntelliSense will report [struct "test" has no field "c"]
}
But if I disable the IAR build extension and use my own "c_cpp_properties.json", there is no error reported.
I´m often finding functions what seem not be fully indexed by IntelliSense and it´s just jump to prototype declaration in header file. It is typically for case when header and source file names are not exactly same - for example xxx_common.h / yyy.c etc
For this case the "Go To Definition" function is not functional until the .c file with definition is opened. Then the found declaration-definition linkage is somehow cached and it works until VSCode IAR project is closed.
Is this problem related to cooperation between IAR extensions and IntelliSense or just IntelliSense itself?
EDIT: Building and Debug works without a problem
When opening a project folder which use EWARM 8.22.1 in VS Code, it failed to generate Intellisense information with the following error message. And Intellisense does not work for C standard libraries header.
Click "Show output window", then could see the following error.
<there was iarbuild log. it succeeded>
..
WARN: Builder closed without reaching linking stage.
Intellisense configuration did not complete: Process exited with code: 2
Intellisense configuration did not complete for 'BasicDebugging': Process exited with code: 2
No intellisense configurations were generated
Intellisense configuration did not complete: No intellisense configurations were generated
Regards,
On the first line of every file a squiggle is displayed with the warning "command-line error: invalid macro definition: __EDG_VERSION__=602".
Versions:
IAR Build log:
[23.6.2022, 14:21:13][Debug] Activating extension
[23.6.2022, 14:21:14][Debug] Found 1 project(s) in the workspace
[23.6.2022, 14:21:14][Debug] Project: selected 'test' (index 0)
[23.6.2022, 14:21:14][Debug] Configuration: selected 'Debug' (index 0)
[23.6.2022, 14:21:14][Debug] Not loading project 'test' using thrift, no appropriate workbench selected...
[23.6.2022, 14:21:14][Debug] Loaded extended project 'undefined'
[23.6.2022, 14:21:14][Debug] Collected 5 toolchains
[23.6.2022, 14:21:14][Debug] Toolchain: selected 'Embedded Workbench 9.1 (Arm)' (index 3)
[23.6.2022, 14:21:14][Debug] Loading thrift workbench 'Embedded Workbench 9.1 (Arm)'...
[23.6.2022, 14:21:14][Debug] Generating intellisense config for 'test':'Debug'...
[23.6.2022, 14:21:14][Debug] 4 new toolchain(s) added
[23.6.2022, 14:21:14][Debug] Loaded thrift workbench 'Embedded Workbench 9.1 (Arm)'
[23.6.2022, 14:21:14][Debug] Loading project 'test' using thrift...
[23.6.2022, 14:21:14][Debug] Loading project context for 'test'
[23.6.2022, 14:21:16][Debug] Loaded extended project 'test'
[23.6.2022, 14:21:16][Debug] Intellisense config changed. Notifying cpptools.
[23.6.2022, 14:21:16][Debug] Providing intellisense configuration(s) for: c:\tmp\test\project\main.cpp
IAR Config Generator:
Generating compilation database...
IAR Command Line Build Utility V9.1.1.9611
Copyright 2002-2022 IAR Systems AB.
test - Debug
Build description written to C:\Users\102-anmu\AppData\Local\Temp\iar-jsondb198d14b135b7cf23fe8ece61eb9c0a81.json
Done!
Generating intellisense information for c:\tmp\test\project\main.cpp
I have added a minimal sample project that shows this issue and the full C/C++ extension log, as it quite long.
Hi,
CMake Tools extension provide a command to retrieve the path to the executable: ${command:cmake.launchTargetPath}
It would be great to have a similar feature for this IAR extension, as it helps to create generic launch configurations, shared among teams.
Thanks a lot !
Please add support also for earlier versions od IAR like 7.5 and 7.0. I think there is still lot of projects which require these older IAR versions. These projects have to be maintained still but there is no plan to update their IAR version requirement and conditions.
I have multiple projects that compile flawlessly, but IntelliSense detects multiple issues. The error messages point in the direction that IntelliSense cannot find the definitions. If I change the order of the includes, IntelliSense can resolve them. I broke one of the projects down to a minimum sample and checked the includes and I'm quite sure that there are no issues with them.
Also, if I re-add the previously used c_cpp_properties.json file to the project and remove the line "C_Cpp.default.configurationProvider": "iarsystems.iar-build"
from the settings.json file, IntelliSense works regardless of the order of the includes and detects no errors.
c_cpp_properties.json.txt
This issue might be related to Incorrect intellisense configuration #6.
I would also be happy to provide the sample project privately.
IAR Build Log
[23.6.2022, 14:58:29][Debug] Activating extension
[23.6.2022, 14:58:29][Debug] Collected 5 toolchains
[23.6.2022, 14:58:29][Debug] Toolchain: selected 'Embedded Workbench 9.1 (Arm)' (index 3)
[23.6.2022, 14:58:29][Debug] Loading thrift workbench 'Embedded Workbench 9.1 (Arm)'...
[23.6.2022, 14:58:29][Debug] 4 new toolchain(s) added
[23.6.2022, 14:58:29][Debug] Found 3 project(s) in the workspace
[23.6.2022, 14:58:29][Debug] Project: selected 'bootloader-ra6m5' (index 0)
[23.6.2022, 14:58:29][Debug] Configuration: selected 'Debug' (index 0)
[23.6.2022, 14:58:29][Debug] Generating intellisense config for 'bootloader-ra6m5':'Debug'...
[23.6.2022, 14:58:29][Debug] Loaded thrift workbench 'Embedded Workbench 9.1 (Arm)'
[23.6.2022, 14:58:29][Debug] Loading project 'bootloader-ra6m5' using thrift...
[23.6.2022, 14:58:29][Debug] Loading project context for 'bootloader-ra6m5'
[23.6.2022, 14:58:29][Debug] Loading project 'bootloader-ra6m5' using thrift...
[23.6.2022, 14:58:30][Debug] Intellisense config changed. Notifying cpptools.
[23.6.2022, 14:58:30][Debug] Providing intellisense configuration(s) for: c:\Projekte\test\src\main.cpp
IAR Config Generator Log
Generating compilation database...
IAR Command Line Build Utility V9.1.1.9611
Copyright 2002-2022 IAR Systems AB.
bootloader-ra6m5 - Debug
Build description written to C:\Users\102-anmu\AppData\Local\Temp\iar-jsondbabcda958c3e05e627317c4b1d245b754.json
Done!
Generating intellisense information for c:\Projekte\test\src\main.cpp
C/C++ Extension Log
iar: Rebuild Project
'c:\IAR784/common/bin/iarbuild.exe' 'e:\TTC_TC_20200423_V3.3_Release\examples\rtos\CC2640R2_LAUNCHXL\sysbios\hello\tirtos\iar\hello.ewp' '-build' 'Debug' '-log' 'info' '-parallel' '4'
IAR Command Line Build Utility V7.5.6.4719
Copyright 2002-2017 IAR Systems AB.
Building configuration: hello - Debug
Updating build tree...
0 file(s) deleted.
Updating build tree...
Configuration is up-to-date.
Similar to the current project configuration it would be great if one could use the current project as variable in the tasks.
For example using ${command:iar-config.project} to access the hex file depending on the currently selected project:
{
"label": "My Custom Task",
"type": "process",
"command": "test.exe",
"args": [
" --hex_file ${workspaceFolder}\\path\\to\\iar\\${command:iar-config.project}\\${command:iar-config.project-configuration}\\Exe\\out.hex",
]
}
Last thing missing for me to be able to use this extension is support for .custom_argvars files. As a workaround i can just add the "-varfile C:\path\to\project.custom_argvars" to the extraBuildArguments in the workspace settings. But this only works with an absolute path and because variables are not allowed in the settings, it is not very portable. Would be great if some general support for these files could be added!
@HampusAdolfsson Thanks for getting workspace and batch build support enabled!
I just tested it out and the UI looks great! However, I noticed that while WS_DIR is supported in certain contexts, it isn't working for me in batch builds, as it doesn't seem to be propagating the WS_DIR value replacement into the custom_argvars files.
I was able to make a slight modification in the code to get this to work, though I doubt it's a long term solution as it modifies the custom_argvars files in place, which wouldn't do great with git repos (as it replaces the
This is my code that I modified in eworkspace.ts
.
getArgvarsFile(): string | undefined {
const argvarsPath = Path.join(
Path.dirname(this.path),
Path.basename(this.path, ".eww") + ".custom_argvars"
);
if (Fs.existsSync(argvarsPath)) {
const data = Fs.readFileSync(argvarsPath);
Fs.writeFileSync(argvarsPath, data.toString().replace(/\$WS_DIR\$/, Path.dirname(this.path)));
return argvarsPath;
}
return undefined;
}
A possible better way that I can think of is to create a temporary file with WS_DIR replaced and use this as the custom_arguments file.
Thanks!
I'm using this extension in combination with an custom build system (CMake based), so i don't use iarbuild.exe or something else.
I would like to use the problem matchers "$iar-cc" and "$iar-linker" in my setup but it does not work (the problem view remains empty) if I set the following in my build task:
"problemMatcher": [
"$iar-cc",
"$iar-linker"
],
but if i add a custom problemMatcher it works like expected:
"problemMatcher": [
{
"owner": "iar-cc",
"fileLocation": "absolute",
"pattern": {
"regexp": "^\"?([^\",]*)\"?,(\\d+)\\s+(Fatal error|Warning|Error)\\[([^\\]]*)\\]:(\\s*.*)$",
"file": 1,
"line": 2,
"severity": 3,
"code": 4,
"message": 5
}
},
]
Is there anything else to consider while using this extension with CMake or any custom build system?
PS: I use "--no_wrap_diagnostics" as compiler and linker options.
The default build tasks that wrap IarBuild.exe are inefficient, and do not take full advantage of system resources even when utilizing -parallel
. On an example project on a Windows 10 VM under Parallels Desktop, a project built with IarBuild takes 40+ seconds to build using anything over 4 threads and uses ~50% CPU.
When using a custom build task that first invokes IarBuild.exe PROJECTFILE -ninja debug
, then ninja.exe
to build, the same build executes in <15 seconds.
In order to get a reasonable textual build output, I need to set the following environment variables on the build task:
"env": {
"QCCARM": "--silent",
"IASMARM": "-S",
"ILINKARM_CMD_LINE": "--silent",
}
It seems the $iar-cc
problem matcher does not match problems in the build output, though.
Hello, I am trying to use an IAR project of my company with vscode, but I encounter difficulties. The IAR project view is unavailable.
The logs seems to indicate that the wrong workbench is selected, yet, when i open the project directly from this IAR workbench (The version from C:\Program Files (x86)\IAR Systems\EW_ARM 9.20) everything is working fine.
I don't know if this could be related, but this is a project that have been created with IAR 8.40.1, then it has been converted to a version 9.20.4
Do you now what the error code 3221225477 is ? Could it be related to the use of argvars ?
IAR build
[28/07/2022, 09:16:59][Debug] Activating extension
[28/07/2022, 09:17:00][Debug] Collected 5 toolchains
[28/07/2022, 09:17:00][Debug] Toolchain: selected 'EW_ARM 9.20 (Arm)' (index 0)
[28/07/2022, 09:17:00][Debug] Loading thrift workbench 'EW_ARM 9.20 (Arm)'...
[28/07/2022, 09:17:01][Debug] 2 new toolchain(s) added
[28/07/2022, 09:17:01][Debug] Found 10 project(s) in the workspace
[28/07/2022, 09:17:02][Debug] Project: selected 'Project1' (index 4)
[28/07/2022, 09:17:02][Debug] Configuration: selected 'Debug' (index 0)
[28/07/2022, 09:17:02][Debug] Generating intellisense config for 'Project1':'Debug'...
[28/07/2022, 09:17:04][Debug] Loaded thrift workbench 'EW_ARM 9.20 (Arm)'
[28/07/2022, 09:17:04][Debug] Loading project 'Project1' using thrift...
[28/07/2022, 09:17:04][Debug] Loading project context for 'Project1'
[28/07/2022, 09:17:04][Debug] Loading project 'Project1' using thrift...
[28/07/2022, 09:17:12][Error] Thrift workbench 'EW_ARM 9.20 (Arm)' crashed (code 3221225477)
[28/07/2022, 09:17:12][Debug] Loaded thrift workbench 'undefined'
[28/07/2022, 09:17:12][Debug] Not loading project 'Project1' using thrift, no appropriate workbench selected...
[28/07/2022, 09:17:12][Debug] Loaded extended project 'undefined'
[28/07/2022, 09:17:16][Debug] Intellisense config changed. Notifying cpptools.
IarServiceManager
IAR Service Launcher V9.0.11.9006
Copyright 2018-2022 IAR Systems AB.
[9164]
Service registry running on local socket on port: 60184
Also available in serialized form in CSpyServer2-ServiceRegistry.txt
[9164] Starting service manager service...
[9164] Service: com.iar.ProjectManager
[9164] Loading native library C:\Program Files (x86)\IAR Systems\EW_ARM 9.20\common\bin\ProjectManagerHandler
[9164] Loaded module: 00007FFCFD670000
[9164] Calling entry point to start service.
[9164] Location:
[9164] Service started: com.iar.ProjectManager
[9164] Entering main loop...
Registry Exited (3221225477)
Hi !
When I use the iar extension on latest version, the Extension Host crashes when loading the extension.
I don't have the issue on 1.20.2 so far, and I'm running ubuntu 20.04.
Following is the log from the Extension Host output:
2023-05-12 09:19:04.307 [info] ExtensionService#_doActivateExtension iarsystems.iar-build, startup: true, activationEvent: 'workspaceContains:**/*.ewp'
2023-05-12 09:19:05.445 [error] Error: View is not attached yet
at new l (/home/nxf49031/.vscode/extensions/iarsystems.iar-build-1.20.3/out/src/extension/main.js:2:908992)
at t.activate (/home/nxf49031/.vscode/extensions/iarsystems.iar-build-1.20.3/out/src/extension/main.js:2:881536)
at kn.eb (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:112:14705)
at kn.db (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:112:14409)
at /usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:112:12432
at async v.n (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:96:6644)
at async v.m (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:96:6607)
at async v.l (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:96:6064)
When selecting an MSP430 toolchain the compiler executable is not found.
The extension looks for the folder by toolchainId, which is MSP430
, however the folder for the MSP430 toolchain is simply called 430
(eg: C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.5\430\bin
) resulting in the executable not being found and no configuration being provided to intellisense.
IAR config generator log:
IAR Command Line Build Utility V8.5.1.7337/W32
Copyright 2002-2021 IAR Systems AB.
Building configuration: MSP430F5257_clocktest - Debug
Updating build tree...
e:\MSP430F5257_clocktest\Debug\Obj\main.r43
e:\MSP430F5257_clocktest\Debug\Exe\MSP430F5257_clocktest.d43
e:\MSP430F5257_clocktest\Debug\List\MSP430F5257_clocktest.map
3 file(s) deleted.
Updating build tree...
main.cpp
icc430.exe "e:\MSP430F5257_clocktest\main.cpp" "-o" "e:\MSP430F5257_clocktest\Debug\Obj" "--no_cse" "--no_unroll" "--no_inline" "--no_code_motion" "--no_tbaa" "--debug" "-D__MSP430F5257__" "-e" "--double=32" "--dlib_config" "c:\Program Files (x86)\IAR Systems\Embedded Workbench 8.5\430\lib\dlib\dl430xlsfn.h" "--core=430X" "--data_model=small" "-Ol" "--multiplier=32" "--eec++" "--hw_workaround=CPU40" "--code_model=large"
Done!
Generating intellisense information for e:\MSP430F5257_clocktest\main.cpp
WARN: Compiler gave error: Error: spawn c:\Program Files (x86)\IAR Systems\Embedded Workbench 8.5\msp430\bin\icc430.exe ENOENT
IAR build log:
[29/08/2022, 19:36:24][Debug] Activating extension
[29/08/2022, 19:36:24][Error] Failed to fetch toolchains from registry: Error: Process exited with code: 1
[29/08/2022, 19:36:24][Debug] Collected 1 toolchains
[29/08/2022, 19:36:24][Debug] Toolchain: selected 'undefined' (index undefined)
[29/08/2022, 19:36:24][Debug] 1 new toolchain(s) added
[29/08/2022, 19:36:24][Debug] Loaded thrift workbench 'undefined'
[29/08/2022, 19:36:24][Debug] Loaded extended project 'undefined'
[29/08/2022, 19:36:25][Debug] Found 1 project(s) in the workspace
[29/08/2022, 19:36:25][Debug] Project: selected 'MSP430F5257_clocktest' (index 0)
[29/08/2022, 19:36:25][Debug] Configuration: selected 'Debug' (index 0)
[29/08/2022, 19:36:25][Debug] Not loading project 'MSP430F5257_clocktest' using thrift, no appropriate workbench selected...
[29/08/2022, 19:36:25][Debug] Loaded extended project 'undefined'
[29/08/2022, 19:36:41][Debug] Message from settings view: {"subject":"Workbench","index":0}
[29/08/2022, 19:36:41][Debug] Toolchain: selected 'Embedded Workbench 8.5 (MSP430)' (index 0)
[29/08/2022, 19:36:41][Debug] Generating intellisense config for 'MSP430F5257_clocktest':'Debug'...
[29/08/2022, 19:36:41][Debug] Loaded thrift workbench 'undefined'
[29/08/2022, 19:36:41][Debug] Not loading project 'MSP430F5257_clocktest' using thrift, no appropriate workbench selected...
[29/08/2022, 19:36:41][Debug] Loaded extended project 'undefined'
[29/08/2022, 19:36:41][Error] Didn't find a compiler for MSP430 in c:\Program Files (x86)\IAR Systems\Embedded Workbench 8.5.
[29/08/2022, 19:36:42][Debug] Intellisense config changed. Notifying cpptools.
[29/08/2022, 19:36:54][Debug] Providing intellisense configuration(s) for: e:\MSP430F5257_clocktest\main.cpp
[29/08/2022, 19:36:54][Debug] Generated intellisense configuration(s) in 5 ms.
[29/08/2022, 19:41:10][Debug] Message from settings view: {"subject":"AddWorkbench","index":0}
[29/08/2022, 19:41:24][Debug] Collected 0 toolchains
[29/08/2022, 19:41:38][Debug] Message from settings view: {"subject":"AddWorkbench","index":0}
error message is generated here:
iar-vsc-build/src/extension/cpptools/configurationprovider.ts
Lines 272 to 283 in 8e665f1
toolchainId is set here
iar-vsc-build/src/iar/project/parsing/xmlconfig.ts
Lines 36 to 41 in 01a04f7
toolchain name is parsed from project EWP file:
iar-vsc-build/src/iar/project/parsing/ewpfile.ts
Lines 68 to 69 in 01a04f7
entry in EWP file
[...]
<toolchain>
<name>MSP430</name>
</toolchain>
[...]
I like to use clang-tidy as my static analysis tool inside VS Code. This extension does not initialize the include paths that are needed for it, or any other extension needing paths to work properly since the proper header files annot be found.
Hi,
when executing task "iar: Iar Build" (with a source file open in editor), this error message appears:
While all other tasks work without problems:
Versions:
iarsystems.iar-build v1.10.3
VSCode 1.68.1
tasks.json (as generated !?)
{ "version": "2.0.0", "tasks": [ { "type": "iar", "command": "build", "project": "${command:iar-settings.project-file}", "config": "${command:iar-settings.project-configuration}", "builder": "${command:iar-settings.workbench}/common/bin/IarBuild.exe", "label": "iar: Iar Build", "problemMatcher": [ "$iar-cc", "$iar-linker" ], "group": { "kind": "build", "isDefault": true } } ] }
When using binary constants in my project, IntelliSense marks them as errors, even though the project builds and runs without any issues. This happens only when C/C++ configuration provider is set to IAR Build.
As far as I know, IAR supports binary literals since version 9.20, but I'm having this issue using both 9.20.2 and 9.30.1 with VSCode.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.