How to use copied libraries?

Sysprogs forums Forums VisualGDB How to use copied libraries?

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #9714
    bmcdonnell_psi
    Participant

    TL,DR: How can I create a project for an STM32 in VisualGDB which uses the copied libraries from STM32CubeMX? i.e. Using either of the first two options from step 7 of VisualGDB STM32CubeMX tutorial, as pictured below. Those options are:

    1. Copy all used libraries into the project folder
    2. Copy only the necessary library files

    Details:

    I followed the tutorial, and I had a project working, which I had generated using MxCube version 4.17.0 (MxDb.Version DB.4.0.170). Today I upgraded to MXCube version 4.18.0 (MxDB.Version 4.0.180), and it broke my project.

    I’ve been wanting to change over to having the libraries in my project (not as references) anyway, so that I can put them in source control, and make it more portable.

    I tried manually editing the HAL file paths in the .vcxproj and .vcxproj.filter files with a text editor, to make them point to the local paths, but when I build, it’s still looking in VisualGDB’s AppData folder for the HAL files.

    #9720
    support
    Keymaster

    Hi,

    If you are using the Custom edition of VisualGDB, it can do this automatically for you if you convert the project to a stand-alone one via VisualGDB Project Properties. You could also just relocate the BSP files into a location under source control so that they will be shared between several projects.

    If you are using a lower edition, you can remove the reference to the STM32 HAL framework via VisualGDB Project Properties and add the source files from CubeMX manually.

    #9723
    bmcdonnell_psi
    Participant

    you can remove the reference to the STM32 HAL framework via VisualGDB Project Properties and add the source files from CubeMX manually.

    I tried that, but it was still looking in the AppData VisualGDB folders, and I was getting build errors. Is it because I used a filter with the same name (“HAL”)?

    #9731
    support
    Keymaster

    Hi,

    The only files VisualGDB will use from APPDATA in this case would be the startup file and the linker script as they should be compatible with all versions of HAL.

    If this is not acceptable, you can also create the project by selecting “Enter flags manually” in the wizard and entering the preprocessor macros, includes and linker script manually and then adding the HAL files to the project. This will produce the same result as converting the project to a stand-alone one automatically.

    #9735
    bmcdonnell_psi
    Participant

    The only files VisualGDB will use from APPDATA in this case would be the startup file and the linker script as they should be compatible with all versions of HAL.

    As I described above, that’s not what happened. It continued to look for all of the HAL files in APPDATA, despite me having changed the paths in the project files. When I’d put the cursor on a HAL function call, and press F12 (go to definition), it would open up the file from APPDATA, not from the path I had changed it to. Why isn’t this working?

    #9736
    support
    Keymaster

    Hi,

    Are you sure you have removed the reference to the HAL framework on the Embedded Frameworks page of VisualGDB Project Properties?

    If yes, please send us your .vxcproj and the nrf5x.xml file so that we could check this.

    #9749
    bmcdonnell_psi
    Participant

    Are you sure you have removed the reference to the HAL framework on the Embedded Frameworks page of VisualGDB Project Properties?

    Yes, as pictured below.

    please send us your .vxcproj and the nrf5x.xml file

    Where do I find that XML file?

     

    #9764
    support
    Keymaster

    Hi,

    Yes, the embedded frameworks look correct. The nRF5x.xml file should be located in your project directory. If you are not sure about it, the EmbeddedProfile element in your .vgdbsettings file should contain the relative path to that file:

        <EmbeddedProfileFile>MCU.xml</EmbeddedProfileFile>
    #9781
    bmcdonnell_psi
    Participant

    Well, I never figured out how to change my existing project to using copied libraries, but I created a new project that does, and got that to work.

    Please add instructions on how to use copied libraries to your tutorial (linked in OP).

    #9784
    support
    Keymaster

    Hi,

    We do have a tutorial for that: http://visualgdb.com/tutorials/arm/standalone/

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