Author Topic: Getting to know Active Configuration  (Read 3986 times)

bremenpl

  • Community Member
  • Posts: 90
  • Hero Points: 0
  • Electrical Engineer
Getting to know Active Configuration
« on: March 04, 2015, 11:32:53 AM »
Hello there,
I am using a custom script to program my ARM device:
Code: [Select]
#include "slick.sh"
_command at91load() name_info(','VSARG2_MACRO|VSARG2_MARK|VSARG2_REQUIRES_MDI_EDITORCTL)
{
shell("JLink.exe M:\\10.10.10.5\\Software\\trunk\\Embedded\\AutomaticFeeders_v2\\Controller_v4\\loadscript.txt");
}

In the loadscript.txt is a fixed path to my Debug output file.bin. I was wondering, is it possible to know in the macro section, what is my active configuration. Thanks to that, I could use different loadscripts. What would be the construction? I would like to get this functionality:
Code: [Select]
#include "slick.sh"
_command at91load() name_info(','VSARG2_MACRO|VSARG2_MARK|VSARG2_REQUIRES_MDI_EDITORCTL)
{
        if (active configuration == "Debug")
     shell("JLink.exe M:\\10.10.10.5\\Software\\trunk\\Embedded\\AutomaticFeeders_v2\\Controller_v4\\loadscript_debug.txt");
        else if (active configuration == "Release")
             shell("JLink.exe M:\\10.10.10.5\\Software\\trunk\\Embedded\\AutomaticFeeders_v2\\Controller_v4\\loadscript_release.txt");
}

I would aprichiate all help.

Graeme

  • Senior Community Member
  • Posts: 2796
  • Hero Points: 347
Re: Getting to know Active Configuration
« Reply #1 on: March 04, 2015, 11:43:32 AM »

if (GetCurrentConfigName() == "Release")


bremenpl

  • Community Member
  • Posts: 90
  • Hero Points: 0
  • Electrical Engineer
Re: Getting to know Active Configuration
« Reply #2 on: March 05, 2015, 09:15:43 AM »
Just what I needed. Thank you.