Giter VIP home page Giter VIP logo

iar's Introduction

IAR Embedded Workbench extension

This extension provides IAR Embedded Workbench project integration to automatize build and Intellisense support. As IAR works on Windows environment only, the extension is not been tested on different systems.

This is NOT an official IAR Systems extension.

Getting Started:

1) Create iar.json file inside .vscode folder:

Example iar.json configuration, customize it according to your setup:

{
    "version": 1,
    "path": "C:\\Program Files (x86)\\IAR Systems\\Embedded Workbench 8.0\\",
    "project": "C:\\Projects\\TEST\\TEST.ewp",
    "config": "Debug"
}

2) Enable the extension on your workspace settings, settings.json file inside .vscode folder:

{
    "iar.enabled":true
}

3) Run ctrl+shift+b to start build.

The extension automatically replaces your c_cpp_properties.json Microsoft C++ Tools configuration to matches the IAR Project ones. It supports browsing to external files, includepath, common defines and user included one.

Debug

Example launch.json configuration for debug with J-Link:

{
    "version": "0.2.1",
    "configurations": [
      {
        "name": "Debug J-Link",
        "type": "cppdbg",
        "request": "launch",
        "program": "C:/Projects/TEST.out",
        "stopAtEntry": true,
        "cwd": "${workspaceRoot}",
        "externalConsole": false,
        "MIMode": "gdb",
        "miDebuggerPath": "arm-none-eabi-gdb.exe",
        "debugServerPath": "JLinkGDBServerCL.exe",
        "debugServerArgs": "-if swd -singlerun -strict -endian little -speed auto -port 3333 -device STM32FXXXXX -vd -strict -halt",
        "serverStarted": "Connected\\ to\\ target",
        "serverLaunchTimeout": 5000,
        "filterStderr": false,
        "filterStdout": true,
        "setupCommands": [
          {"text": "target remote localhost:3333"},
          {"text": "monitor flash breakpoints = 1"},
          {"text": "monitor flash download = 1"},
          {"text": "monitor reset"},
          {"text": "load C:/Projects/TEST.out"},
          {"text": "monitor reset"}
        ]
      }
    ]
  }

iar's People

Contributors

alkaes avatar gammac0de avatar politoleo avatar tiwalun avatar willson556 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

iar's Issues

Unable to compile

I've installed the extension, but if I run ctrl+shift+b, build doesn't start.
immagine

This is my iar.json in my .vscode folder
{ "version": 1, "path": "C:/Program Files (x86)/IAR Systems/Embedded Workbench 7.0/", "project": "${workspaceRoot}/project.ewp", "config": "Debug_GC" }

and these are my workspace settings
{ // estensione IAR abilitata "iar.enabled": true }

Conflict building the intellisense database with compiler objects

Hi,

trying to have a powerful IDE instead of IAR EWARM, the combination with this extension is really promising.
But I have faced a problem and hope for some help here.

Description:
IAR linker reports missing object files, although the files had been successfully compiled before

Steps to reproduce:
Start a build on a project with a few dozen files in a fresh, clean environment shortly after startup of VSCode

Suggested reason:
Building up the intellisense database in the background seems to conflict with the real build. As seen with Windows Process Explorer, there are multiple calls "IarBuild.exe c:\Projects\x\project.ewp -dryrun Debug -log all" for about 10 Minutes after start of VSCode.
I tried on the console and this "dryrun" command seems to delete existing object files :-(
I was using IAR 8.40.2 (but also tried with version 9 without difference)

iar extension doesnt show after installing in the workspace

Hi
I did everything mentioned in the getting started session but still vs code doesnt find the iar ide.
I took a look at setting.jason file and iar.enabled was true but i couldnt give th compiler path to it (actually i didnt know how to do this).
Can anyone help me?
image

installing problem

Hi,
Thank you for this extension but when ı want to install am taking "Couldn't find a compatible version of IAR Embedded Workbench with this version of Code." this error. What is my mistake ? I installed iar workbecnh and ı am using the iar for stn8 with code limit licence during along time. When ı see this extention ı want to install but ı took this error.

Thank you for your helping

Debugadapterprocess ended with "read error"

Hello,

I'm trying to debug my STM32 project with this extension. Compiling works fine, but the debugging fails with a "read error".

I just don't know where i can find some informations on this error. Is there any common place (like a log output) where i can find the reason for this read error?

Thanks a lot

c_cpp_properties.json doesn't generate

After I configure the iar.json & workspace, then I Run ctrl+shift+b to start build,there are only "Building configuration: debug" in output, nothing happened, neither generate the file: c_cpp_properties.json, I tried to reload the workspace、IAR Enbedded Workbench、restart computer , but it's no use.

Error on running build: "Error while starting IarBuild.exe."

I am hitting an error when trying to run a build:

Building configuration: Debug
Error while starting IarBuild.exe. Open it with IAR Ide to fix it.
Something went wrong...

The workspace settings.json is:

{
    "iar.enabled":true
}

and then my iar.json is:

{
    "iar.enabled":true,
    "version": 1,
    "path": "C:\\Program Files (x86)\\IAR Systems\\Embedded Workbench 8.0\\",
    "project":  "C:\\path\\to\\my\\project\\project1\\myproj.ewp",
    "config": "Debug",
    "verbose": true
}

One note is that my workspace root is C:\\path\\to\\my\\project\\, where I have an EWT file with several subdirs, each with their own EWP and code, and one for common code between the IAR projects.
I am sure that the "project" option is correct, since I can copy and paste it into a command line, unescape it, and prepend it with dir, and the file exists.

If I open a new VSCode window and open it to the root of the directory the project is in, and use the same iar.json and settings.json, then it will successfully build.
Due to the use of the common code dir, I would really prefer to get this working using VSCode open in the EWT root.

I am sure it is something obvious and simple, but I can't figure it out, and I am eager to move away from the IAR editor entirely.

`c_cpp_properties.json` doesn't update.

In your package description, there's mention of the update of the c proprieties config file:

The extension automatically replaces your c_cpp_properties.json Microsoft C++ Tools configuration to matches the IAR Project ones. It supports browsing to external files, includepath, common defines and user included one.

I'm not exactly sure what you mean by "automatically", but when i build my project with ctrl+shift+b, everything build correctly, but my c_cpp_properties.json is not updated.
Updating the c_cpp file would be incredible to facilitate the use of the nice feature of vscode.

Additional information:

OS: Win10 x64
Vscode: 1.24.1
IAR Workbench: 8.22.2

Thanks for your time.

Change of config is not used

If I change the iar.json - config value, save the file, and issue IAR Build, the previous config value is used. In order for the new value to be used I must restart VSCode.

__cplusplus asserted for .c files

My project has a combination of C and C++ files. After I do a build I end up with __cplusplus asserted in c_cpp_properties.json which causes a few squiggle errors in C source files. Removing it from the json file cleans up the errors but then the C++ files don't have it asserted. What is the best way to deal with this?

c_cpp_properties doesn't generate anymore

Hi. I have a project and started using 1.5 months ago. It worked flawlessly. Now if i create a new project using the same folder structure or checked out on a second pc.

The cpp properties file doesnt generate anymore.
Somehow the latest update to either vscode, the extension, or the c++ extension doesn't work anymore.

c_cpp_properties.json doesn't have my own includePath and defines

Hi, The extension does automatically generate the c_cpp_properties, but in the c proprieties config file ,it doesnot have my own includePath and defines, It just like this

"includePath": [
                "C:\\Program Files (x86)\\IAR Systems\\Embedded Workbench 8.0\\arm\\inc\\c",
                "C:\\Program Files (x86)\\IAR Systems\\Embedded Workbench 8.0\\arm\\inc"
            ],

So ,without my project includePath ,Compile Error like this:

Fatal Error[Pe1696]: cannot open source file "board.h"
...

What should I do now ?
Regards.

Allow relative path for project file

It would be a nice feature to allow relative path for project file. We work in team on the same project and having an absolute path is quite cumbersome and we need to gitignore the iar.json file.

iar.json

Hello,

I can't find an iar.json file in .vscode folder? Do I just create one and add just these three lines in there?
{
"iar.enabled":true
}

What about the bit in 'configuration' sections?
I have the launch.json file. Can I use this extension with E2 lite as well?

Regards,

I am unable to build using visual studio code

Can you please explain me step by step how to use visual studio code for build the IAR code.
I already installed your extension but now I don't understand what to do please help me.

Add a more detailed documentation

I didn't managed to get this extension working. I think overall a more detailed installation process & setup could be useful.
I keep getting an error "no debug configuration"; I assume it is linked to the config:"debug" line; but how should I create this debug configuration ?

Same for lauchinga debug session an exmaple of a json is good, but having a detailed documentation would make the extension easily usable without having to spend a long time on it to figure it out.

Error building without any additional info

Hi,

I got the following error, no additional info, how can I enable Verbose mode for the build process of the extension?

Building configuration: App
 
ERROR, Command failed: make
 
Building database...
 
Errors: 0
Warning: 0 

Thanks!

IAR system include path should be place at the end of includePath in c_cpp_properties.json

As the IAR official development guide description:

If the compiler encounters the name of an #include file in angle brackets, such as:
#include <stdio.h>
it searches these directories for the file to include:
1 The directories specified with the -I option, in the order that they were
specified, see -I, page 282.
2 The directories specified using the C_INCLUDE environment variable, if any, see
Environment variables, page 251.
3 The automatically set up library system include directories. See --dlib_config,
page 276.

the compiler will search the header in the path that user configured in the project firstly.
If I write the header file "errno.h" in my project, I find that the vscode cannot find the correct header file in my project; instead it find the file provided in the IAR system path. so it is recommended to list the system include header at the end of includePath in c_cpp_properties.json

Auto add user create source file to IAR's ewp and ewt

This is a good extension,but when I use it,I found when I create a new c source file,CTRL+SHIFT+B get make error.after my research,I found the file isn't add in IAR's ewp and ewt file, so can it auto add the user new source file to the both file(ewp and ewt)?ths~ ^_^

Add a LICENSE

Adding an appropriate open-source license would clarify what this software can be used for and what restrictions are placed upon people who modify it.

As an example, the Microsoft C/C++ plugin uses the MIT license.

settings.json problem

I'm trying to get the plugin to work, but I am stuck at settings.json

image

It has been working before, but it did not update the paths in MS intellisense json file, so i decided to start over again. - Deleted all .vscode folders, opend my source folder, saved the workspace added iar.json and settings.json and now nothing works. :-( ... Compare with picture
Any help appreciated.
regards GM

Support for MSP430 projects?

Hello,

I am currently using IAR to work on a MSP430 project. Decided I'd give your extension a try and while I can use it to build my project there does not seem to be any Intellisense beyond basic tag matching (and Code complains about not knowing IAR's MSP430 headers). No c_cpp_properties.json file is generated for me either. I glanced at the source and it seems this extension mainly works with ARM.

I'm new to IAR and VS Code extensions but can help in any way I can if this is possible to do.

Thanks!

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.