I work on NCS 2.8.0
I add follow to CMakeLists.txt
I work on NCS 2.8.0
I add follow to CMakeLists.txt
I too know that add_custom_target() works as expected in NCS2.6.0.
The problem is that it doesn't work in NCS2.8.0.
Hi
Susheel is out of office for the time being, so I have been tasked with looking into this case. What kind of error is it that occurs on NCS 2.8.0 on your end? In NCS 2.7.0, Sysbuild was added, and that's what's built for by default. You can set the system build off at the bottom of the build config page in the VS Code extension.

Best regards,
Simon
The error is follow.
-----------------------------------------------------------------------
-- west build: running target my_release_file
ninja: error: unknown target 'my_release_file'
-----------------------------------------------------------------------
What I ultimately want to do is do some post-processing to extract necessary information from the built zephyr.elf and output it to the log.
Hi
Okay, I think you need to put your custom target in the sysbuild.cmake file as well in your project as of NCS 2.8.0, as we moved to using sysbuild in NCS 2.8.0. Please see the sysbuild.cmake file from this sample for reference: https://github.com/nrfconnect/sdk-nrf/blob/main/samples/bluetooth/mesh/dfu/distributor/sysbuild.cmake
Best regards,
Simon
Oh, OK.
It's perfect.
Thank you.