c_user_include_directories with macro expansion breaks build

Comments

6 comments

  • Avatar
    Michael Johnson

    Macros should be set using Tools | Macros

    0
    Comment actions Permalink
  • Avatar
    Chrisw

    I don't see "Tools|Macros" but I do see "Project|Macros".

    When I change "Crossworks->Preferences->Building" Build Macros it changes the value in "Project|Macros" so It seems the macro is getting set just fine because the first one works just fine. But for some reason the second one fails. Not sure why maybe there is a limit for how long a single path can be?

     

    0
    Comment actions Permalink
  • Avatar
    Chrisw

    @Michael,

     

    Any thoughts on this. Would it help if I attach the project file both with absolute path and also macro defined path?

     

    BTW,

     

    This is the version of CrossWorks I am running:

    CrossWorks for ARM
    Release 3.3.1.2014121602.22877
    Mac OS x86

    0
    Comment actions Permalink
  • Avatar
    Michael Johnson

    I'd set the output window to echo the build commands and check the differences. Alternatively you can right click and select "Export Build" on the file in the project explorer and diff the command lines.

    0
    Comment actions Permalink
  • Avatar
    Chrisw

    Yup, that helped. It is a bug in CrossWorks but now I see the the problem and a work around for the problem :)

     

    In case you are interested here is how to reproduce the issue:

    Version: 

    CrossWorks for ARM
    Release 3.3.1.2014121602.22877
    Mac OS x86

     

    1. Launch CrossWorks

    2. Open a project that are not using a macro for a path in "c_user_include_directories"

    3. Select Menu->CrossWorks->Preferences->Building

    4. Double click on property "Build Macros"

    5. Define a new macro "NRF_SDK" and point it to the SDK path

    6. Close preference window

    7. Select project in "Project Items" window

    8. Edit "User Include Directories"

    9. Change an absolute path to "$(NRF_SDK)"

    10. Right click on project and choose "Export Build" not none of the macros were expanded.

     

    Here is the work around:

    If now you choose Menu->Tools->Macros... and then close it the and export build again it will work just fine.

     

    For now on I will enter my macros through "Tools->Macros" but in my opinion this issue should be resolve by CrossWorks or the option removed from Properties because it is very confusing when things don't work.

    0
    Comment actions Permalink
  • Avatar
    Michael Johnson

    Yes it is a bug - we'll fix it.

    Thanks

    Michael

    0
    Comment actions Permalink

Please sign in to leave a comment.