This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Creating custom target configuration in Segger Embedded Studio as different make file target

It's easy for me to create make file target but I am not able to identify where and how to add the custom target in the Segger Embedded Studio(SES).

My default build configuration has debug and release. I want to create three different firmware using a compile-time constant macro. But I am not able to get the result what I wanted.

In my build configuration at the public config, I added two target v1 and v2, in addition, to debug and release. I selected the config on th project exlporer ide as v1, v2, debug and release all give the same results. In the C code, I added like this,

 #if V_1
   NRF_LOG_INFO("Targert1");
 #elif V_2
  NRF_LOG_INFO("Targert2");
 #else
  NRF_LOG_INFO("Target 3 SC");
 #endif

The output is always Target 3.

Can someone guide me how to add custom build target in the SES.

Related