Mbed problems

Sysprogs forums Forums VisualGDB Mbed problems

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #29072
    LukasK
    Participant

    I have bought VisualGDB Custom licence to evaluate Mbed Support.
    I have a already working mbed project and i want to migrate it for visual gdb. Following problems arised:

    1. I cant select a custom target. How can i select my own targets?
    2. How can I add support for unit testing? Your documentation says, there should be a a Test Case item but it was not created. Is there a possibility to automatically add all already available unit test (+mbed os tests)?
    3. I need to supply my own profile to mbed cli. I cant find an option to set this. I can just decide between debug and release. How can i change the profile path?
    #29073
    support
    Keymaster

    Hi,

    No problem, please see our answers below:

    1. There is no special GUI for custom mbed targets yet. As a workaround, please consider following the regular mbed instructions to create a custom target, and then patch the .vgdbproj file manually to specify the new target name. We are working on supporting custom targets properly and will release an update including this feature next week.
    2. Please make sure you use the Custom edition of VisualGDB and create a separate testing configuration per our tutorial. If it doesn’t work, please share the screenshots of the steps you perform and the output you observe, and we will help you troubleshoot this.
    3. VisualGDB manages the mbed profiles automatically. It will pick the debug/release profile based on the active configuration in Solution Explorer, and can additionally apply any changes made via the regular VS property pages of the project node (e.g. optimization level) by generating a temporary profile file.
    #29163
    LukasK
    Participant

    Thank you for you support. I realized and hadn’t installed the latest version.

    Your comments fixed by problems. thank you.

    But i have another question. Is there a possibility to add defines only for Testing?

    #29164
    LukasK
    Participant

    And another problems occurs with testing.

    Paths while building tests are getting to long for windows to handle. Is there any solution available?

    #29166
    LukasK
    Participant

    I hope it’s okay if I keep posting new problems

    User Defined Variables aren’t resolved for Terminal Settings (COM Port)

    #29180
    support
    Keymaster

    No worries. We have added support for custom Mbed targets to the following build: VisualGDB-5.5.100.3839.msi. You can now right-click on the project and select “Target a Custom Board“. Custom targets will now also appear in the Mbed platform list.

    The test configurations will have the MBED_TEST_MODE macro defined, so you can check it in a commonly included header to define extra macros.

    The building of mbed projects is handled directly by mbed-cli, so VisualGDB is not able to work around the path length limitations. The best workaround would be to check out the project to a shorter location (or to symlink c:\prj to an existing checkout).

    We have added variable expansion to Raw Terminal settings to build linked above.

     

    #29183
    LukasK
    Participant

    I will test the new version right now.

    If i use mbed-cli without visual gdb, i am able to run all my tests…
    This is a path which is generated using visual gdb: Build\\WD_CORE_G1\\Tests__Debug_\\WdIoT.Firmware.Lib\\util\\ledsignaling\\TARGET_WD_CORE\\TARGET_WD_CORE_G1\\TESTS\\ledsignaling\\ledutils\\WdIoT.Firmware.Lib\\util\\ledsignaling\\TARGET_WD_CORE\\TARGET_WD_CORE_G1\\TESTS\\ledsignaling
    As you might see WdIoT.Firmware.Lib\\util\\ledsignaling\\TARGET_WD_CORE\\TARGET_WD_CORE_G1\\TESTS\\ledsignaling\\ledutils gets concatenated twice. This doesnt happen if i use mbed cli only.

    #29184
    LukasK
    Participant

    Okay sorry again. I just realized I used mbed-cli in the WSL… Thats why the path length was not a problem…

    #29188
    support
    Keymaster

    No problem. That said, incorrect concatenation should normally not happen. Please try checking the VisualGDB Build window for the mbed-cli command line (it will be shown in cyan). You can right-click on it and select “Dump command line to a batch file” to save the exact command line (including the working directory and all environment) to an editable .bat file.

    You can then try playing around with the .bat file (e.g. replacing forward slashes with backward slashes, or using relative paths instead of absolute paths) to see if there is any workaround to the broken mbed-cli behavior. If you can find a specific parameter that triggers the issue, we will be happy to update VisualGDB to work around it.

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