This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/MSP430F5419A: Scripting console, NullPointerException

Part Number: MSP430F5419A

Tool/software: Code Composer Studio

My build configuration names are include special characters like "[,_". So i cant run "setActiveBuildConfig" and "buildProject" functions. I get NullPointerException error. How can i fix this? I don't want to change my build configuration names. 

  • Hello,
    non-alphanumeric characters must be escaped with double backslashes.

    example for a config name "[,_config"

    setActiveBuildConfig("project" , "\\[\\,\\_config")

    fyi - non-alphanumeric characters are not recommended. It may cause further troubles down the road. I would make a plan to eventually change the config names.

    Thanks
    ki
  • Project Name : "@Project"

    Build Conf. Name : "!Debug"

    setActiveBuildConfig("\\@Project","\\!Debug")

    I've opened new project to test this and it works, but it doesn't work on my main project, it gives "wait condition time out"

    BTW i can build project without backslashes or one blackslash

    • buildProject("@Project")  
    • buildProject("\@Project") 

    Edit: 

    I got the problem. It doen't work because of build conf. name's description. If i delete "description", it works. But i can't delete the description for all my build configs. There are more the  80 configuration.

  • The description should not matter.

    You only need to use the backslashes for the configuration name, not the project.

    Try:

    setActiveBuildConfig("@Project","\\!Debug")

    That works for me.

    Thanks
    ki
  • Ki-Soo Lee said:
    The description should not matter.

    You are right, it *does* matter. I'm befuddled why it has an impact. But it looks like a bug to me.

  • Bug filed. Tracking ID: CCSIDE-3597
  • You can set the active build config with description using this syntax. Note that the ".*" at the end of the configuration name. Ideally, you shouldn't need to add the wildcard, the API should include this by default.

    setActiveBuildConfig("@Project", "!Debug.*");

    Regards,
    Patrick