microsoft / microsoft/vscode-cpptools

Support Compiler of IAR extensions

Open
#7,653 2 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

embedded Feature Request Language Service parser
Dominant language
TypeScript
Stars
6.2k
Forks
1.7k
Avg merge
14h 46m
Merged PRs (30d)
61

Description

Type: Feature Request

Hello! I‘m a vscode user.

Sorry to submit a new issue be similar to existing issues. I use GNU Arm Embedded toolchain before, It works very well on vscode with C++ Intellisense("intelliSenseMode": "gcc-arm", "compilerPath": "xxx/gcc-arm-none-eabi.exe"). Recently, I use vscode as the editor of IAR to develop arm program. And I found that vscode does not support some keywords of ICC(IAR-CC ARM).

define symbol

There are some symbols that can cheat the compiler by defines, such as bit in MCS51:

xxx.c:

bit a = 0;

c_cpp_properties.json:

"defines": [
   "bit=bool"
],
other keyword

But there are some keyword that still report errors, such as interrupt in MCS51 or @ in IAR :

static rt_device_t xxx_dev @ ".ccmram";
void Timer_isr(void) interrupt 1
{
   //...
}

This code means to define the variable in ".ccmram" area, and define a function for timer interrupt.

user code

I can define a macro #define NVIC(n) interrupt n if __VSCODE__ is not defined. But this only applies to user code, I shouldn't have to modify the firmware library code.

Of course, this doesn't affect programming, and I don't know how does compiler support work. So it's just a suggestion.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the IAR examples in the issue, including the interrupt keyword and @ placement syntax, and review how compiler extensions are handled by the extension. Done means IAR firmware code can be parsed without diagnostics for these constructs, without requiring changes to the firmware library.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, cpp
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.