zephyr RTOS task event creation

Hi team,

    we create basic task with event flag wait condition, but we got following error while try to build the application and it look like linker error. 

Event creation code:

    struct k_event my_event;

    k_event_init(&my_event);

Firmware details: nRF connect sdk V2.6.0
Board selection : nrf7002dk_nrf5340_cpuapp_ns

Here i attach the error statement for your reference


c:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: app/libapp.a(main.c.obj): in function `k_event_init':
E:/nRF_Software/ncs/v2.6.0/zephyr/samples/basic/blinky/build/zephyr/include/generated/syscalls/kernel.h:794: undefined reference to `z_impl_k_event_init'
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\cf2149caf2\opt\bin\cmake.EXE' --build 'e:\nRF_Software\ncs\v2.6.0\zephyr\samples\basic\blinky\build'



Related