Sysprogs forums › Forums › VisualGDB › Memory Exhausted Error
Tagged: cmake, GCC, Link, Memory Exhausted
- This topic has 19 replies, 3 voices, and was last updated 1 year, 6 months ago by 
Noah.
 
- 
		AuthorPosts
 - 
		
			
				
April 9, 2024 at 09:36 #35509
Noah
ParticipantThanks for the response. I tried two different workarounds:
- I added an empty “nulltoolchain.cmake” file and pointed VisualGDB at it using the “Use Existing Toolchain” setting.
 - I tried your suggestion of changing the DisableToolchainFile field in the project file.
 
Both of these worked.
I do not have an existing toolchain file that is meaningful (hence the reason for not pointing VisualGDB at it in the first place). The toolchain file is handled by Zephyr as part of the build system.
I think automatic handling of the toolchain file should be opt-in only since it adds build flags in an opaque way. If this is not possible, then there should at least be a way to disable automatic handling of the toolchain file via the UI, perhaps in the form of a checkbox under “Use Existing Toolchain File.”
April 9, 2024 at 09:55 #35510support
KeymasterThe toolchain.cmake file generated by VisualGDB normally just points CMake to the toolchain executables. Unless you manually edit toolchain definition files, it would not inject any implicit flags there.
You can try completely deleting and reinstalling both VisualGDB and the toolchain and creating a new project from scratch. If the toolchain.cmake file generated by VisualGDB still contains optimization flags after it, feel free to attach it here and we will investigate.
April 9, 2024 at 10:34 #35511Noah
ParticipantI have tried this on two different machines with the same behavior.
I have attached the generated toolchain file.
On line 55 of the toolchain file, it includes
root.cmakewhich is a file located inC:\Program Files (x86)\Sysprogs\VisualGDB\CMake\embedded. Thisroot.cmakefile adds the unwanted compile flags on line 12.- 
		This reply was modified 1 year, 6 months ago by 
Noah.
 
Attachments:
You must be logged in to view attached files.April 11, 2024 at 21:26 #35543support
KeymasterHi,
OK, we rechecked everything again. If you check the “existing toolchain.cmake” checkbox in the wizard, but do not specify a file, VisualGDB will ask whether you want to proceed without using a toolchain file at all (equivalent to setting DisableToolchainFile to true). However, the VisualGDB Project Projecties window indeed did not allow enabling this mode.
We have updated it to allow selecting any of the 3 options (existing file, generated file, no file) in this build: VisualGDB-6.0.101.5173.msi
We will also look into decoupling generated toolchain files from the reference to the VisualGDB’s embedded project framework (that adds commands like find_bsp() and also changes some build flags).
April 15, 2024 at 08:02 #35554Noah
ParticipantPerfect, thank you!
 - 
		AuthorPosts
 
- You must be logged in to reply to this topic.