nRF Connect VScode project issue with GPIO configuration

Hi,

I created a simple project in VS Code and I have defined the custom board configuration files that I want.

In the xxx_defconfig file I have defined CONFIG_GPIO=y but after building the project with the following main.c 

where #include <zephyr/drivers/gpio.h> is underlined as a warning

/*
 * Copyright (c) 2012-2014 Wind River Systems, Inc.
 *
 * SPDX-License-Identifier: Apache-2.0
 */

#include <stdio.h>
#include <zephyr/kernel.h>
#include <zephyr/drivers/gpio.h>

int main(void)
{
	printf("Hello World! %s\n", CONFIG_BOARD);
	return 0;
}

I get a warning saying

"[{
    "resource": "/c:/ncs/myProjects/newExample/src/main.c",
    "owner": "Kconfig options",
    "code": "missing_kconfig_param",
    "severity": 4,
    "message": "The GPIO drivers must be enabled by CONFIG_GPIO to be included in the build",
    "startLineNumber": 9,
    "startColumn": 1,
    "endLineNumber": 9,
    "endColumn": 34
}]"

WHen I set the CONFIG_GPIO=y in the prj.config file the warning dissapears.

But why it comes up the first place  since it is already enabled in the xxx_defconfig ?

Also I get the following warning regarding the xxx_defconfig file

[{
    "resource": "/C:/ncs/my_boards/boards/arm/pdneuro_nrf52840/pdneuro_nrf52840_defconfig",
    "owner": "Kconfig no context",
    "severity": 4,
    "message": "The active build context 'build' does not use this file.",
    "startLineNumber": 1,
    "startColumn": 1,
    "endLineNumber": 1,
    "endColumn": 1
}]

But again.. why is that happening?

I have created a workspace in vs code for the custom board files and the example application and  I have also set the "my_boards" folder correctly in the Nrf-connect: Board Roots

as C:\ncs:\my_boards. WHat am I doing wrong here....?

Related