NCS: How to check which board is selected?

I have custom board defined in DTS file. There will be multiple variants of boards, therefore I need to check which board is selected. How to check which board is selected by its "model" property? I need to check this compile time and also runtime if it is possible.

One more question how to flash additional hex file in nRF Connect extension of VS Code, I need to do it dependent on selected build configuration.

Related