Git Product home page Git Product logo

Comments (7)

HampusAdolfsson avatar HampusAdolfsson commented on September 28, 2024

The support for .custom_argvars files is about to change in the new release of the extension. It will work just like in Embedded Workbench, where you select a .eww file and the extension automatically uses the .custom_argvars file with the same name, if one exists. Does this work for your use case?

Problem 2 will be fixed in this release. The .custom_argvars dropdown has been replaced with a .eww dropdown, but if you remove all .eww files you should no longer see IarBuild.exe using a deleted .custom_argvars file.

from iar-vsc-build.

NotKasperNielsen avatar NotKasperNielsen commented on September 28, 2024

I actually really like that seeing and selecting which argfile is used is so easy right now.

Automatically selecting the argfile that matches the .eww as default is a logical step. But as I see it, that is almost already the case. If it selects the first (or any) of the files it finds, then if you only have one, it is automatically selected.

If this selection becomes automatic and hidden, like in Embedded Workbench, it just makes it more opaque what you are actually building. EW already doesn't tell you which file it is using.

In my CI system I specifically use a different argfile (ignored by git), so I can inject build variables at compile time without "dirtying" my repo status.
If I can't easily switch between argfiles, it makes my workflow more complicated.
Likewise, it would be very nice to easily tell VS Code to not use any argfile. Especially since right now my project is locked-up because it wants an argfile that no longer exist. It won't even allow me to clean the project.
image

This despite actually creating and selecting a new .custom_argvars file.
image

Do you have I indication of when this new release is expected to ship?

// Thanks

from iar-vsc-build.

HampusAdolfsson avatar HampusAdolfsson commented on September 28, 2024

The release is expected to ship on monday.

Unfortunately there are some technical limitations that prevent us from keeping the .custom_argvars selector with the new .eww selector (and we need the .eww selector to enable features like batch builds).

For your use case, it sounds like it would be a good idea to configure the build task(s) manually in a .vscode/tasks.json file. The following is the default task for building:

{
	"version": "2.0.0",
	"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",
			"argumentVariablesFile": "${command:iar-config.argument-variables-file}",
			"problemMatcher": [
				"$iar-cc",
				"$iar-linker"
			]
		}
	]
}

By default, the argumentVariablesFile field uses whatever you've selected in the UI, but you can change it to for example:

  • Use a specific file, and have different build tasks for different .custom_argvars files.
  • Use an Input Variable to make VS Code ask you which .custom_argvars file to use each time.

from iar-vsc-build.

NotKasperNielsen avatar NotKasperNielsen commented on September 28, 2024

OK, that makes sense.

I'll look into manually configuring tasks. Do you know if there is anywhere I can learn more about the IAR specific task config parameters?

Looking forward to Monday 😉

from iar-vsc-build.

HampusAdolfsson avatar HampusAdolfsson commented on September 28, 2024

We don't have any extensive documentation for the tasks.json parameters, but you can use the intelliSense provided by VS Code to get short descriptions of each parameter.

For most parameters, you can either use the command variables in the example above to use whatever is selected in the UI, or provide your own path to a specific file (e.g. a .custom_argvars for argumentVariablesFile or a .ewp for project).

from iar-vsc-build.

NotKasperNielsen avatar NotKasperNielsen commented on September 28, 2024

Thanks.

from iar-vsc-build.

NotKasperNielsen avatar NotKasperNielsen commented on September 28, 2024

I found one workaround for when IAR Build is stuck on a .custom_argvars file that no longer exists.
First: Delete this line in the iar-vsc.json file.
image

Then, importantly: Restart VS Code before doing anything else.
Apparently that actually forces IAR Build to look at the config file.

from iar-vsc-build.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.