Error when Library Optimization turned off

Sysprogs forums Forums VisualGDB Error when Library Optimization turned off

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #29688
    tboutain
    Participant

    I am somewhat new to using VisualGDB, so my apologies if I’m missing something stupid.  Here is my setup

    I have an Arduino Project base on SAMD21J18 processor. I have no issues compiling, uploading, and debugging with Jlink.

    However under VisualGDB Project Properties, if I check the “Arduino Libraries” under “Debug build disables optimization for:”, then it won’t compile and I get the following error.

    “Command-line action failed”

    From what I can tell the only different on the command to compile is on the arguments line it changes the unoptimize argument from “-unoptimize=sketch” to “-unoptimize=sketch,libraries”

    I also tried with just libraries checked so it would be “-unoptimize=libraries” but that gave the same issue,

    I have a library I would like to debug, so would  be nice if I could get it to work. As without it, the variables in the library just show <optimized out> when running the debugger.

    Let me know if need to copy a log or something. I didn’t as I’m not even sure what you would need.

    Thanks,

    Tom

    #29689
    support
    Keymaster

    Hi,

    The “disable optimization” option in VisualGDB simply replaces the optimization flags such as “-O2” with “-O0” when passed to gcc. This works for most libraries and platforms, however, if the library you are trying to build specifically relies on optimization, it may indeed break the build.

    As the library does not come from us, we will not be able to help troubleshoot it, so our best advice would be to check the entire build output from the VisualGDB Build window for anything suspicious, and try editing the library to work around the issues raised by disabling optimization.

    #29697
    tboutain
    Participant

    Ok thanks – I just copied the library in question into my project as header/src files to make it work vs referencing as a library.

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