VisualGDB build variables remain unresolved during toolchain test

Sysprogs forums Forums VisualGDB VisualGDB build variables remain unresolved during toolchain test

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #7216
    apettel
    Participant

    Hello,

    VisualGDB build variables and also user variables, which contain VisualGDB build variables, remain unresolved during toolchain test.

    I use Visual Studio 2015, VisualGDB 5.0 and the SysProgs 5.2.0 ARM toolchain.

    My project settings:

    ###########################################################

    “VisualGDB Project Properties” -> “Embedded Project” -> “LD Flags”:
    -Wl,-gc-sections -flto –specs=nano.specs –specs=nosys.specs -Wl,-L$(SourceDir)\$(LinkerScriptDir) -T$(LinkerScript)

    ###########################################################

    Output of the Toolchain Test:

    Tool arguments: -Wl,–start-group “L:\TEMP\/VisualGDB_TrivialProgram.o” -o “L:\TEMP\/VisualGDB_TrivialProgram.bin” -Wl,-gc-sections -flto –specs=nano.specs –specs=nosys.specs -Wl,-L$(SourceDir)\Linker_Scripts -Tstm32.lds -mcpu=cortex-m0 -mthumb -lcompactcpp -Wl,–end-group
    c:/arm/gcc/5.2.0_sysprogs/bin/../lib/gcc/arm-eabi/5.2.0/../../../../arm-eabi/bin/ld.exe: cannot open linker script file stm32.lds: No such file or directory
    collect2.exe: error: ld returned 1 exit status

    ###########################################################

     

    The normal build of the project fails too, as $(SourceDir) is not resolved.

    To work around this problem, i defined a user variable “SourceDirMake”, which contains $(SourceDir) and is propagated to the GNU Make environment. With this modification the normal build works, but the toolchain test still fails with the same error message as above, since $(SourceDirMake) is resolved to the string “$(SourceDir)” and not to the actual path.

     

    Is there a solution for this problem ?

     

     

    #7231
    support
    Keymaster

    Hi,

    The VisualGDB variables are only resolved directly in command lines. Variables that are saved in Makefiles will not be resolved unless you specify them explicitly in Make command line (e.g. make SourceDir=$(SourceDir)). That said, you don’t need to use the $(SourceDir) in your settings. Simply specify the relative paths (e.g. subdir/LinkerScript.lds).

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.