nrf5340 network core DTS problem

I'm using led1 alisa for indication that network core is runing. But if I compile program, variable is not initiated from DTS. It looks like compiler does not init dtLed variable.

If I use same code in application core program it works.

Is there some limitation using DTS in network core.

I'm using VS Code and nRF Connect SDK 1.7.1. Configuration file prj.conf is empty.

// This is part of main.c file
struct gpio_dt_spec dtLed = GPIO_DT_SPEC_GET(DT_ALIAS(led1), gpios);

void main (void)
{
	gpio_pin_configure_dt(&dtLed, 0);

	//LOG_INF("Starting net app!");

	while(1){
		k_sleep(K_MSEC(1000));
		gpio_pin_toggle_dt(&dtLed);
	}
}

// This is CMakeList.txt
cmake_minimum_required(VERSION 3.20.0)

find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(test_net)

target_sources(app PRIVATE src/main.c)

Related