Compiler flags in vscode with nRF connecy extension

I want to add compiler  flags to my  build configuration i.e _DEBUG, etc

My understanding is that  a build is done by  build task

nRF Connect extension allows to create a tasks.json from a default nRF Connect build task

In  Terminal->Configure tasks I can select nrf Connect build and it creates the following tasks.json file

{
    "version": "2.0.0",
    "tasks": [
        {
           
            "type": "nrf-connect-build",
            "config": "c:\\<project>\\build",
            "runCmake": false,
            "problemMatcher": [
                "$gcc",
                "$cmake",
                "$kconfig",
                "$kconfig_syntax",
                "$kconfig_syntax_files",
                "$dts",
                "$dts_syntax"
            ],
            "group": "build",
            "label": "My app(Debug)"
        }
    ]
}
The problem is that I cannot add the "args" property - at least in other discussions I saw it being used to add compiler flags 
When I add it I get an error "args is not allowed"
How can I add compile flags to my nrf connect build task ? Or is there another way to do this?
My ultimate goal is to create a debug and release configurations with some defines present in one but not the other 
Thanks
Parents Reply
  • Another question. The build configuration generated by the nRF extension has hard coded paths that are specific to my PC

    I am not the only developer working on this project. Which means that they will have to recreate the build configuration on their machine? And add <all> extra compile flags? Is there a way to add compile flags in such a way that it can be shared across the team?

Children
No Data
Related