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

gcc style __attribute__ not recongnized #34

Closed HiFiPhile closed 1 year ago

HiFiPhile commented 1 year ago

Hi,

For example this code report error:

__attribute__((always_inline))
void BSP_Init()
{
    RCC->APB2ENR |= RCC_APB2ENR_SYSCFGEN;
    RCC->APB1ENR |= RCC_APB1ENR_PWREN;
    RCC->AHB1ENR |= RCC_AHB1ENR_GPIOAEN;
    RCC->AHB1ENR |= RCC_AHB1ENR_GPIOHEN;

}

image

HampusAdolfsson commented 1 year ago

We've received similar reports from others and are working on resolving this.

As a workaround, you can trick intellisense into ignoring the __attribute__ declaration. To do so, go to the extension settings, and under Defines, add the following:

__attribute__(x)=