How to add custom_target on NCS2.8.0

I work on NCS 2.8.0

I add follow to CMakeLists.txt

add_custom_target(
    my_release_file
    echo AAAA BBBB CCCC
    DEPENDS all
)
when run "west build -b nrf54l15dk/nrf54l15/cpuapp -t my_release_file"
error occured.
Itry it on NCS 2.6.0, it's success.
How to add custom_target on NCS2.8.0?
Parents
  • 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

Reply
  • 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

Children
  • 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.

Related