iarsystems / iar-vsc-build

Visual Studio Code extension for developing and building IAR projects
https://marketplace.visualstudio.com/items?itemName=iarsystems.iar-build
Mozilla Public License 2.0
38 stars 5 forks source link

Support workspace (.eww) files, batch builds, stronger Intellisense #35

Closed gcampbell-msft closed 1 year ago

gcampbell-msft commented 1 year ago

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:

  1. Easier viewing of a project from the IAR IDE, since .eww files are often (if not always) used in the IDE.
  2. Stronger Intellisense. Currently if a file isn't in the project the Intellisense could be much better. Expanding the Intellisense to files inside of the entire workspace, rather than just the active project, would be great.
  3. Batch builds. I think this would start down the path of supporting batch builds, which is something that is very helpful for users.

Another note: It may make sense to split these into separate issues, but I created it as one for now.

schmitzel76 commented 1 year ago

Could definitely use this. We use batch build to make sure the projects are build in the correct order, but with vscode we now have to manually select and build each project.

JanWielgus commented 1 year ago

I found a workaround for batch build. I created a VS Code tasks where each task build's one subproject and then one vsc task that runs subtasks in a sequence. You can create such task clicking Ctrl+Shift+p, then Tasks: Configure Task and then type iar and choose iar: Build Project Example task will be created for you. You can change path to your IAR ewp project.

image image

leihen0525 commented 1 year ago

log: `... Updating build tree...

0 file(s) deleted. Updating build tree...

ERROR, Unknown argument variable: Failed to expand argument variable "$WS_DIR$"`

I have some public files that need workspaces as paths to boot, but VSC IAR doesn't support EWW, it would be nice if I could parse EWW

HampusAdolfsson commented 1 year ago

@leihen0525 Workspace support is one of the features we're looking to implement next, but we can't give an exact date for it yet.

In the meantime, you can manually specify the value of $WS_DIR$ by creating a file with the extension ‘.custom_argvars’ somewhere in your VS Code workspace with the following contents:

<?xml version="1.0" encoding="UTF-8"?>
<iarUserArgVars>
    <group name="MyGroup" active="true">
        <variable>
            <name>WS_DIR</name>
            <value>$PROJ_DIR$</value>
        </variable>
    </group>
</iarUserArgVars>

This file should be picked up and displayed in the extension configuration under “Custom Argument Variables File”. This will have $WS_DIR$ take the value of the project directory (the .ewp file directory), but you can change the value to whatever you need. It should solve any problems you have with building or generating intellisense configurations.

leihen0525 commented 1 year ago

@HampusAdolfsson This method works. Thank you very much for your help. Thank you!!!

HampusAdolfsson commented 1 year ago

Workspace and batch build support was just released in 1.30.1! Please open new issues if you have any feedback or problems with it.