Sysprogs forums › Forums › VisualGDB › How to use copied libraries?
- This topic has 9 replies, 2 voices, and was last updated 7 years, 10 months ago by support.
-
AuthorPosts
-
December 6, 2016 at 22:03 #9714bmcdonnell_psiParticipant
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:
- Copy all used libraries into the project folder
- 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.
December 7, 2016 at 05:35 #9720supportKeymasterHi,
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.
December 7, 2016 at 16:59 #9723bmcdonnell_psiParticipantyou 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”)?
December 7, 2016 at 22:05 #9731supportKeymasterHi,
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.
December 7, 2016 at 23:40 #9735bmcdonnell_psiParticipantThe 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?
December 8, 2016 at 02:28 #9736supportKeymasterHi,
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.
December 8, 2016 at 16:10 #9749bmcdonnell_psiParticipantAre 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?
December 9, 2016 at 20:16 #9764supportKeymasterHi,
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>
December 12, 2016 at 19:13 #9781bmcdonnell_psiParticipantWell, 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).
December 13, 2016 at 07:17 #9784supportKeymasterHi,
We do have a tutorial for that: http://visualgdb.com/tutorials/arm/standalone/
-
AuthorPosts
- You must be logged in to reply to this topic.